Class SelectColumnFactory

java.lang.Object
com.illumon.iris.db.tables.select.SelectColumnFactory

public class SelectColumnFactory extends Object
A factory to create SelectColumns from an input expression. There are two types of supported expressions
  • By Existing column - Simply the name of an existing column in the table
  • ResultColumn = <Expression> - Where the expression may simply identify a column from the source, or be something more sophisticated.
  • Constructor Details

    • SelectColumnFactory

      public SelectColumnFactory()
  • Method Details

    • ofAlwaysUpdate

      @ScriptApi @NotNull public static SelectColumn ofAlwaysUpdate(@NotNull String expression)
      Create a SelectColumn that will always be updated during an update cycle, regardless of the engine's determined set of modified columns.
      Parameters:
      expression - the expression to convert.
      Returns:
      a new SelectColumn based upon the expression.
    • getExpression

      @ScriptApi @NotNull public static SelectColumn getExpression(@NotNull String expression)
      Create a SelectColumn based on the expression.
      Parameters:
      expression - the expression to convert.
      Returns:
      a new SelectColumn based upon the expression.
    • getExpressions

      @NotNull public static SelectColumn[] getExpressions(String... expressions)
      Convert all the supplied expressions into SelectColumns.
      Parameters:
      expressions - an array of expressions to convert.
      Returns:
      an array of SelectColumns, one for each expression.
    • getExpressions

      public static SelectColumn[] getExpressions(Collection<String> expressions)
      Convert all the supplied expressions into SelectColumns.
      Parameters:
      expressions - a collection of expressions to convert.
      Returns:
      an array of SelectColumns, one for each expression.
    • getFormatExpression

      public static SelectColumn getFormatExpression(String expression)
    • getFormatExpressions

      public static DhFormulaColumn[] getFormatExpressions(String... expressions)
    • getFormatBaseColumn

      public static String getFormatBaseColumn(SelectColumn selectColumn)
      Returns the base column-name used to create a formatting column via getFormatExpression(String) method
      Parameters:
      selectColumn - a SelectColumn returned from the getFormatExpression(String) method
      Returns:
      the baseColumn used to define the provided selectColumn