Class ResultSetColumn

java.lang.Object
com.saperion.ngc.resultset.ResultSetColumn
All Implemented Interfaces:
Comparable<ResultSetColumn>

public class ResultSetColumn extends Object implements Comparable<ResultSetColumn>
This class represents the columns of the result set including all relevant attributes (ID, sorting,...).
Author:
mak
  • Constructor Details

    • ResultSetColumn

      public ResultSetColumn(String colName)
      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

      public void setDisplayName(String dispName)
      Parameters:
      dispName - the displayName to set
    • setName

      public void setName(String colName)
      Parameters:
      colName - the name to set
    • setAlignment

      public void setAlignment(String align)
      Parameters:
      align - the alignment to set
    • setWidth

      public void setWidth(int colWidth)
      Parameters:
      colWidth - the width to set
    • setSortDirection

      public void setSortDirection(String sortDir)
      Parameters:
      sortDir - the sortDirection to set
    • getId

      public int getId()
      Returns:
      the id
    • getDisplayName

      public String getDisplayName()
      Returns the display name.
      Returns:
      the displayName
    • getName

      public String getName()
      Returns:
      the name
    • getAlignment

      public String getAlignment()
      Returns:
      the alignment
    • getWidth

      public 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 interface Comparable<ResultSetColumn>
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class 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