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
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedInitializes a newly createdColumnAliasobjectCopy constructorprotectedColumnAlias(String field, String alias) Constructs a newColumnAliasfor a field with the given alias name -
Method Summary
Modifier and TypeMethodDescriptionprotected static StringBuilderappendForToString(StringBuilder sb, String field, String alias) Helper function which appends the alias info to a givenStringBuilderprotected booleanChecks if this instance can compare against the given object.booleangetAlias()Returns the column's alias namegetField()Returns the field nameinthashCode()toString()
-
Field Details
-
LOCAL_PART
- See Also:
-
QNAME
-
-
Constructor Details
-
ColumnAlias
protected ColumnAlias()Initializes a newly createdColumnAliasobject -
ColumnAlias
Constructs a newColumnAliasfor 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
instanceofthis class.
-
toString
-
appendForToString
Helper function which appends the alias info to a givenStringBuilder- Parameters:
sb- aStringBuilderfield- a field namealias- an alias name- Returns:
- the same
StringBuilderby appending the alias info
-