Class ColumnAlias

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

@GwtCompatible public class ColumnAlias extends Object

Immutable bean representing the column dot notation and it's alias.

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

  • Field Details

  • Constructor Details

    • ColumnAlias

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

      protected ColumnAlias(String field, String alias)
      Constructs a new ColumnAlias for a field with the given alias name
      Parameters:
      field - a field name
      alias - an alias name for this column
    • ColumnAlias

      public ColumnAlias(ColumnAlias ca)
      Copy constructor
      Parameters:
      ca - a ColumnAlias
  • Method Details

    • getField

      public String getField()
      Returns the field name
      Returns:
      the field name
    • getAlias

      public String getAlias()
      Returns the column's alias name
      Returns:
      the column's alias name
    • hashCode

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

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

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

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

      protected static StringBuilder appendForToString(StringBuilder sb, String field, String alias)
      Helper function which appends the alias info to a given StringBuilder
      Parameters:
      sb - a StringBuilder
      field - a field name
      alias - an alias name
      Returns:
      the same StringBuilder by appending the alias info