Package com.saperion.ngc.resultset
Class ResultSetColumn
java.lang.Object
com.saperion.ngc.resultset.ResultSetColumn
- All Implemented Interfaces:
Comparable<ResultSetColumn>
This class represents the columns of the result set including all relevant attributes (ID,
sorting,...).
- Author:
- mak
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanstatic ResultSetColumnfromColumnType(com.saperion.ngc.iform.xml.ColumnType type, com.saperion.ngc.iform.xml.FontType font) Creates aResultSetColumnbased on aColumnType.com.saperion.ngc.iform.xml.ColumnTypegetCol(com.saperion.ngc.iform.xml.FontType font) Returns the display name.intgetId()getName()getWidth()intinthashCode()voidsetAlignment(String align) voidsetDisplayName(String dispName) voidsetId(int colId) voidvoidsetSortDirection(String sortDir) voidsetWidth(int colWidth)
-
Constructor Details
-
ResultSetColumn
Constructor.- Parameters:
colName- name of the column as specified in the ddc.
-
-
Method Details
-
setId
public void setId(int colId) - Parameters:
colId- the id to set
-
setDisplayName
- Parameters:
dispName- the displayName to set
-
setName
- Parameters:
colName- the name to set
-
setAlignment
- Parameters:
align- the alignment to set
-
setWidth
public void setWidth(int colWidth) - Parameters:
colWidth- the width to set
-
setSortDirection
- Parameters:
sortDir- the sortDirection to set
-
getId
public int getId()- Returns:
- the id
-
getDisplayName
Returns the display name.- Returns:
- the displayName
-
getName
- Returns:
- the name
-
getAlignment
- Returns:
- the alignment
-
getWidth
- Returns:
- the width
-
getWidthAsInt
public int getWidthAsInt()- Returns:
- the width as int
-
getSortDirection
- Returns:
- the sortDirection
-
compareTo
- Specified by:
compareToin interfaceComparable<ResultSetColumn>
-
hashCode
public int hashCode() -
equals
-
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 aResultSetColumnbased 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
-