Class 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 Detail

      • ResultSetColumn

        public ResultSetColumn​(java.lang.String colName)
        Constructor.
        Parameters:
        colName - name of the column as specified in the ddc.
    • 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.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 a ResultSetColumn based on a ColumnType.
        Parameters:
        type - type to use to configure the new ResultSetColumn
        font - FontType used to calculate width of column. If null, no width will be set.
        Returns:
        new ResultSetColumn with settings from type