java.lang.Object
com.appiancorp.suiteapi.process.analytics2.Column
All Implemented Interfaces:
DeepCloneable, Serializable, Cloneable

public class Column extends Object implements Serializable, DeepCloneable

The Column bean contains information necessary to retrieve a column of data from the backend and display it properly. The main components of a Column are the expression field which defines the value to be returned for the Column, the formatToken which defines how the value is displayed, and the drillPath field which defines how the data links to more information (if any).

Results in a Column can be grouped together using the group field. When at least one Column is grouped, then the data in any ungrouped Column must be aggregated. Columns can be aggregated based on several functions, each of which is represented as one of the COL_AGGREGATION_XXX constants in this class. If no aggregation function is set, COL_AGGREGATION_COUNT will be used. The aggregation functions are only used for ungrouped columns in reports that contain grouping.

See Also:
  • Field Details

    • LOG

      protected static final org.apache.log4j.Logger LOG
    • COL_AGGREGATION_SUM

      public static final int COL_AGGREGATION_SUM
      A constant indicating that the column aggregation function is SUM (Sum). Nulls are excluded.
      See Also:
    • COL_AGGREGATION_AVG

      public static final int COL_AGGREGATION_AVG
      A constant indicating that the column aggregation function is AVG (Average). Nulls are excluded.
      See Also:
    • COL_AGGREGATION_COUNT

      public static final int COL_AGGREGATION_COUNT
      A constant indicating that the column aggregation function is COUNT (Count).
      See Also:
    • COL_AGGREGATION_SUM_EXCLUDE_NULL

      @Deprecated public static final int COL_AGGREGATION_SUM_EXCLUDE_NULL
      Deprecated.
      use COL_AGGREGATION_SUM
      A constant indicating that the column aggregation function is SUM, excluding any null values encountered.
      See Also:
    • COL_AGGREGATION_AVG_EXCLUDE_NULL

      @Deprecated public static final int COL_AGGREGATION_AVG_EXCLUDE_NULL
      Deprecated.
      use COL_AGGREGATION_AVG
      A constant indicating that the column aggregation function is AVG, excluding any null values encountered.
      See Also:
    • COL_AGGREGATION_GEOMEAN

      public static final int COL_AGGREGATION_GEOMEAN
      A constant indicating that the column aggregation function is GEOMEAN (Geometric Mean).
      See Also:
    • COL_AGGREGATION_MAX

      public static final int COL_AGGREGATION_MAX
      A constant indicating that the column aggregation function is MAX (Maximum).
      See Also:
    • COL_AGGREGATION_MIN

      public static final int COL_AGGREGATION_MIN
      A constant indicating that the column aggregation function is MIN (Minimum).
      See Also:
    • COL_AGGREGATION_MEDIAN

      @Deprecated public static final int COL_AGGREGATION_MEDIAN
      Deprecated.
      no longer used
      A constant indicating that the column aggregation function is MEDIAN (Median).
      See Also:
    • COL_AGGREGATION_MODE

      @Deprecated public static final int COL_AGGREGATION_MODE
      Deprecated.
      no longer used
      A constant indicating that the column aggregation function is MODE (Mode).
      See Also:
    • COL_AGGREGATION_STDDEV

      public static final int COL_AGGREGATION_STDDEV
      A constant indicating that the column aggregation function is STDDEV (Standard Deviation).
      See Also:
    • COL_AGGREGATION_VAR

      public static final int COL_AGGREGATION_VAR
      A constant indicating that the column aggregation function is VAR (Variance).
      See Also:
    • COL_AGGREGATION_PERCENT_TRUE

      public static final int COL_AGGREGATION_PERCENT_TRUE
      A constant indicating that the column aggregation function is PERCENT_TRUE (The percent of all values which are true).
      See Also:
    • COL_AGGREGATION_PERCENT_FALSE

      public static final int COL_AGGREGATION_PERCENT_FALSE
      A constant indicating that the column aggregation function is PERCENT_FALSE (The percent of all values which are false).
      See Also:
    • COL_AGGREGATION_CONCATENATE

      public static final int COL_AGGREGATION_CONCATENATE
      A constant indicating that the column aggregation function is CONCATENATE. All column values will be returned as a List unless the values are Strings, in which case one string will be returned.
      See Also:
    • COL_AGGREGATION_CONCATENATE_WO_REPEAT

      public static final int COL_AGGREGATION_CONCATENATE_WO_REPEAT
      A constant indicating that the column aggregation function is CONCATENATE_WO_REPEAT. All column values will be returned as a List (or one String if the values are a String), with duplicate values removed.
      See Also:
    • COL_AGGREGATION_TYPES

      public static final List<Integer> COL_AGGREGATION_TYPES
  • Constructor Details

    • Column

      public Column()
    • Column

      public Column(Integer localId, String name, String expression, boolean show, String formatToken)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object obj_)
      Is this DrillPath equal to the given object?
      Overrides:
      equals in class Object
    • hashCode

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

      public Object clone()
      Description copied from interface: DeepCloneable
      Clone this object using deep-copy semantics.
      Specified by:
      clone in interface DeepCloneable
      Overrides:
      clone in class Object
      Returns:
    • getColumnAggregationFunction

      public Integer getColumnAggregationFunction()
      Gets the column aggregation function which will be applied to this Column.
      Returns:
      An Integer representing the column aggregation function, which will be one of the COL_AGGREGATION_XXX constants in this class.
      See Also:
    • setColumnAggregationFunction

      public void setColumnAggregationFunction(Integer columnAggregationFunction_)
      Applies a column aggregation function to this Column.
      Parameters:
      columnAggregationFunction_ - An Integer representing the column aggregation function to be applied. This will be one of the COL_AGGREGATION_XXX constants in this class.
      See Also:
    • getExpression

      public String getExpression()
      Get the expression which defines the value of this Column.
      Returns:
      An expression String
      See Also:
    • setExpression

      public void setExpression(String expression_)
      Sets the expression which defines the value of this Column.
      Parameters:
      expression_ - The expressiong String to set.
      See Also:
    • getGroup

      public boolean getGroup()
      Gets whether or not the report is grouped by this Column. If any Column in the report is set to group by, then all other Columns that are not also grouped must have a Column Aggregation set.
      Returns:
      A boolean value which is true if the report is grouped by this column.
      See Also:
    • setGroup

      public void setGroup(boolean group_)
      Sets whether or not the report is grouped by this Column.
      Parameters:
      group_ - Set to true if the report is to be grouped by this column.
      See Also:
    • getName

      public String getName()
      Gets the display name of this Column.
      Returns:
      The name of this Column.
      See Also:
    • setName

      public void setName(String name_)
      Sets the display name of this Column.
      Parameters:
      name_ - The name of this Column to set.
      See Also:
    • getShow

      public boolean getShow()
      Gets whether or not this Column is displayed in the report results.
      Returns:
      A value of true indicates that this Column is displayed in the report.
      See Also:
    • setShow

      public void setShow(boolean show_)
      Sets whether or not this Column is displayed in the report results.
      Parameters:
      show_ - A value of true indicates that this Column should be displayed in the report.
      See Also:
    • getStringId

      public String getStringId()
      Gets the string ID of this Column, which is simply the String "c" concatenated with the localId.
      Returns:
      The string ID of this Column.
    • getStringId

      public static String getStringId(int colId)
    • getLocalId

      public Integer getLocalId()
      Gets the localId of this Column, which uniquely identifies it in this report.
      Returns:
      The localId of this Column.
      See Also:
    • setLocalId

      public void setLocalId(Integer localId_)
      Sets the localId of this Column, which uniquely identifies it in this report.
      Parameters:
      localId_ - The localId of this Column to set.
      See Also:
    • getFormatToken

      public String getFormatToken()
      Gets the token which determines how the data returned for this Column is formatted and displayed in the report results. The value returned is a token name, which corresponds to a Java class. This mapping is handled by the TokenDisplay component.
      Returns:
      The format token for this Column.
      See Also:
    • setFormatToken

      public void setFormatToken(String formatToken_)
      Sets the token which determines how the data returned for this Column is formatted and displayed in the report results.
      Parameters:
      formatToken_ - The format token to set for this Column.
      See Also:
    • getDrillPath

      public DrillPath getDrillPath()
      Gets the DrillPath bean which defines how the column data links to further information (if any).
      Returns:
      The DrillPath bean defining the link to further information.
      See Also:
    • setDrillPath

      public void setDrillPath(DrillPath drillPath_)
      Sets the DrillPath bean which defines how the column data links to further information (if any).
      Parameters:
      drillPath_ - The DrillPath bean which will define the link to further information.
      See Also:
    • getDrillPathExpression

      public String getDrillPathExpression()
      Gets the expression which defines the value that the DrillPath uses to navigate to the proper destination. For example, if drilling to Task Details the expression will define the task ID. This value is retrieved from the DrillPath object itself.
      Returns:
      The DrillPath expression.
    • getLastFormatToken

      public String getLastFormatToken()
      Gets the previously set format token. When a Column is given a Column Aggregation the format token is automatically changed to support the new return type. If the Column Aggregation is removed, then the previous format token is used. This field is ignored by the back-end and will not affect API calls.
      Returns:
      The previously set format token.
      See Also:
    • setLastFormatToken

      public void setLastFormatToken(String lastFormatToken_)
      Sets the previously set format token.
      Parameters:
      lastFormatToken_ - The previous format token to set.
      See Also:
    • getLastAggregateToken

      public String getLastAggregateToken()
      Gets the previously set Column Aggregation token. When a Column is unaggregated, the format token is automatically changed back to _lastFormatToken. However, the aggregation is enabled again, then the previous aggregation token will be used. This field is ignored by the back-end and will not affect API calls.
      Returns:
      The last Column Aggregation token.
      See Also:
    • setLastAggregateToken

      public void setLastAggregateToken(String lastAggregateToken_)
      Sets the previously set Column Aggregation token. This field is ignored by the back-end and will not affect API calls.
      Parameters:
      lastAggregateToken_ - The last Column Aggregation token to set.
      See Also:
    • getIcon

      public String getIcon()
      Returns icon value.
      Returns:
      the icon value
      See Also:
    • setIcon

      public void setIcon(String icon)
      Specifies the icon value.
      Parameters:
      icon - the icon value
      See Also: