Package com.appiancorp.common.query
Class ColumnAlias
java.lang.Object
com.appiancorp.common.query.ColumnAlias
- Direct Known Subclasses:
Column
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 Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
Initializes a newly createdColumnAlias
objectCopy constructorprotected
ColumnAlias
(String field, String alias) Constructs a newColumnAlias
for a field with the given alias name -
Method Summary
Modifier and TypeMethodDescriptionprotected static StringBuilder
appendForToString
(StringBuilder sb, String field, String alias) Helper function which appends the alias info to a givenStringBuilder
protected boolean
Checks if this instance can compare against the given object.boolean
getAlias()
Returns the column's alias namegetField()
Returns the field nameint
hashCode()
toString()
-
Field Details
-
LOCAL_PART
- See Also:
-
QNAME
-
-
Constructor Details
-
ColumnAlias
protected ColumnAlias()Initializes a newly createdColumnAlias
object -
ColumnAlias
Constructs a newColumnAlias
for a field with the given alias name- Parameters:
field
- a field namealias
- an alias name for this column
-
ColumnAlias
Copy constructor- Parameters:
ca
- aColumnAlias
-
-
Method Details
-
getField
Returns the field name- Returns:
- the field name
-
getAlias
Returns the column's alias name- Returns:
- the column's alias name
-
hashCode
public int hashCode() -
equals
-
canEquals
Checks if this instance can compare against the given object.- Parameters:
obj
- anObject
- Returns:
- true if the given object is an
instanceof
this class.
-
toString
-
appendForToString
Helper function which appends the alias info to a givenStringBuilder
- Parameters:
sb
- aStringBuilder
field
- a field namealias
- an alias name- Returns:
- the same
StringBuilder
by appending the alias info
-