Package com.saperion.ngc.resultset
Class ResultSetColumn
- java.lang.Object
-
- com.saperion.ngc.resultset.ResultSetColumn
-
- All Implemented Interfaces:
java.lang.Comparable<ResultSetColumn>
public class ResultSetColumn extends java.lang.Object implements java.lang.Comparable<ResultSetColumn>
This class represents the columns of the result set including all relevant attributes (ID, sorting,...).- Author:
- mak
-
-
Constructor Summary
Constructors Constructor Description ResultSetColumn(java.lang.String colName)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(ResultSetColumn o)
boolean
equals(java.lang.Object obj)
static ResultSetColumn
fromColumnType(com.saperion.ngc.iform.xml.ColumnType type, com.saperion.ngc.iform.xml.FontType font)
Creates aResultSetColumn
based on aColumnType
.java.lang.String
getAlignment()
com.saperion.ngc.iform.xml.ColumnType
getCol(com.saperion.ngc.iform.xml.FontType font)
java.lang.String
getDisplayName()
Returns the display name.int
getId()
java.lang.String
getName()
SortDirection
getSortDirection()
java.lang.String
getWidth()
int
getWidthAsInt()
int
hashCode()
void
setAlignment(java.lang.String align)
void
setDisplayName(java.lang.String dispName)
void
setId(int colId)
void
setName(java.lang.String colName)
void
setSortDirection(java.lang.String sortDir)
void
setWidth(int colWidth)
-
-
-
Method Detail
-
setId
public void setId(int colId)
- Parameters:
colId
- the id to set
-
setDisplayName
public void setDisplayName(java.lang.String dispName)
- Parameters:
dispName
- the displayName to set
-
setName
public void setName(java.lang.String colName)
- Parameters:
colName
- the name to set
-
setAlignment
public void setAlignment(java.lang.String align)
- Parameters:
align
- the alignment to set
-
setWidth
public void setWidth(int colWidth)
- Parameters:
colWidth
- the width to set
-
setSortDirection
public void setSortDirection(java.lang.String sortDir)
- Parameters:
sortDir
- the sortDirection to set
-
getId
public int getId()
- Returns:
- the id
-
getDisplayName
public java.lang.String getDisplayName()
Returns the display name.- Returns:
- the displayName
-
getName
public java.lang.String getName()
- Returns:
- the name
-
getAlignment
public java.lang.String getAlignment()
- Returns:
- the alignment
-
getWidth
public java.lang.String getWidth()
- Returns:
- the width
-
getWidthAsInt
public int getWidthAsInt()
- Returns:
- the width as int
-
getSortDirection
public SortDirection getSortDirection()
- Returns:
- the sortDirection
-
compareTo
public int compareTo(ResultSetColumn o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<ResultSetColumn>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
getCol
public com.saperion.ngc.iform.xml.ColumnType getCol(com.saperion.ngc.iform.xml.FontType font)
- Parameters:
font
- Font- Returns:
- Column type object
-
fromColumnType
public static ResultSetColumn fromColumnType(com.saperion.ngc.iform.xml.ColumnType type, com.saperion.ngc.iform.xml.FontType font)
Creates aResultSetColumn
based on aColumnType
.- Parameters:
type
- type to use to configure the new ResultSetColumnfont
- FontType used to calculate width of column. If null, no width will be set.- Returns:
- new ResultSetColumn with settings from type
-
-