Package com.appiancorp.common.query
Class Column
java.lang.Object
com.appiancorp.common.query.ColumnAlias
com.appiancorp.common.query.Column
- Direct Known Subclasses:
AggregationColumn
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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static StringBuilder
appendForToString
(StringBuilder sb, boolean isVisible) Helper function which appends the visibility string translation to a givenStringBuilder
protected boolean
Checks if this instance can compare against the given object.boolean
getAliasToFieldPathMap
(Projection<? extends Column> proj) int
hashCode()
boolean
Returnstrue
if this column is visible.toString()
Methods inherited from class com.appiancorp.common.query.ColumnAlias
appendForToString, getAlias, getField
-
Field Details
-
LOCAL_PART
- See Also:
-
QNAME
-
-
Constructor Details
-
Column
protected Column()Initializes a newly createdColumn
object -
Column
Constructs a newColumn
for a field with the given field name- Parameters:
field
- a field namealias
- an alias name for this columnvisible
- determines if this column will be visible or not.
-
Column
Copy constructor- Parameters:
column
- aColumn
-
-
Method Details
-
isVisible
public boolean isVisible()Returnstrue
if this column is visible.- Returns:
true
if this column is visible; otherwisefalse
-
hashCode
public int hashCode()- Overrides:
hashCode
in classColumnAlias
-
equals
- Overrides:
equals
in classColumnAlias
-
canEquals
Description copied from class:ColumnAlias
Checks if this instance can compare against the given object.- Overrides:
canEquals
in classColumnAlias
- Parameters:
obj
- anObject
- Returns:
- true if the given object is an
instanceof
this class.
-
toString
- Overrides:
toString
in classColumnAlias
-
appendForToString
Helper function which appends the visibility string translation to a givenStringBuilder
- Parameters:
sb
- aStringBuilder
isVisible
- boolean value indicating the visibility of the columns- Returns:
- the same
StringBuilder
by appending the visibility
-
getAliasToFieldPathMap
- Parameters:
proj
- aProjection
- Returns:
- alias to field path
Map
-