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 TypeMethodDescriptionint
boolean
static ResultSetColumn
fromColumnType
(com.saperion.ngc.iform.xml.ColumnType type, com.saperion.ngc.iform.xml.FontType font) Creates aResultSetColumn
based on aColumnType
.com.saperion.ngc.iform.xml.ColumnType
getCol
(com.saperion.ngc.iform.xml.FontType font) Returns the display name.int
getId()
getName()
getWidth()
int
int
hashCode()
void
setAlignment
(String align) void
setDisplayName
(String dispName) void
setId
(int colId) void
void
setSortDirection
(String sortDir) void
setWidth
(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:
compareTo
in 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 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
-