Class Column

java.lang.Object
com.appiancorp.common.query.ColumnAlias
com.appiancorp.common.query.Column
Direct Known Subclasses:
AggregationColumn

@GwtCompatible public class Column extends ColumnAlias

Immutable bean representing the column dot notation, its alias and its visibility (if it should be shown to the client or not).

An instance can only be obtain by using the helper class QueryBuilder.Selector

  • Field Details

  • Constructor Details

    • Column

      protected Column()
      Initializes a newly created Column object
    • Column

      protected Column(String field, String alias, boolean visible)
      Constructs a new Column for a field with the given field name
      Parameters:
      field - a field name
      alias - an alias name for this column
      visible - determines if this column will be visible or not.
    • Column

      public Column(Column column)
      Copy constructor
      Parameters:
      column - a Column
  • Method Details

    • isVisible

      public boolean isVisible()
      Returns true if this column is visible.
      Returns:
      true if this column is visible; otherwise false
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class ColumnAlias
    • canEquals

      protected boolean canEquals(Object obj)
      Description copied from class: ColumnAlias
      Checks if this instance can compare against the given object.
      Overrides:
      canEquals in class ColumnAlias
      Parameters:
      obj - an Object
      Returns:
      true if the given object is an instanceof this class.
    • toString

      public String toString()
      Overrides:
      toString in class ColumnAlias
    • appendForToString

      protected static StringBuilder appendForToString(StringBuilder sb, boolean isVisible)
      Helper function which appends the visibility string translation to a given StringBuilder
      Parameters:
      sb - a StringBuilder
      isVisible - boolean value indicating the visibility of the columns
      Returns:
      the same StringBuilder by appending the visibility
    • getAliasToFieldPathMap

      public static Map<String,String> getAliasToFieldPathMap(Projection<? extends Column> proj)
      Gets a Map from alias to field path for the Column instances of the given Projection.
      Parameters:
      proj - a Projection
      Returns:
      alias to field path Map