Package com.attivio.sdk.search.fields
Class ClauseContext
- java.lang.Object
-
- com.attivio.sdk.search.fields.FieldExpression
-
- com.attivio.sdk.search.fields.UnaryFieldExpression
-
- com.attivio.sdk.search.fields.ClauseContext
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
public class ClauseContext extends UnaryFieldExpression
Selects a clause that fields should be extracted for.Clauses can be named by setting the alias on a
JoinClause. When clauses are named, fields for child documents from those clauses can be selected by wrapping aFieldExpressionwith a ClauseContext.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.attivio.sdk.search.fields.FieldExpression
FieldExpression.StringMode
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringALL_CONTEXTContext to request field from all clauses.static java.lang.StringDEFAULT_CLAUSE_CONTEXTDefault context name for clauses.static java.lang.StringROOT_CONTEXTContext for root clause.-
Fields inherited from class com.attivio.sdk.search.fields.UnaryFieldExpression
expression
-
Fields inherited from class com.attivio.sdk.search.fields.FieldExpression
EMPTY_ARRAY
-
-
Constructor Summary
Constructors Constructor Description ClauseContext(FieldExpression expression, java.lang.String clause)ClauseContext(java.lang.String field, java.lang.String clause)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ClauseContextclone()booleanequals(java.lang.Object other)java.lang.StringgetClauseName()Get the name of the clause to select fields for.SchemaField.TypegetType(Schema schema)Resolve the type for this expression.inthashCode()booleanisConstant()Returnstrueif this field expression evaluates to a constant value.voidsetClauseName(java.lang.String value)Set the name of the clause to select fields for.protected voidtoString(java.lang.StringBuilder buffer, FieldExpression.StringMode mode)Writes the string representation of this field expression tobuffer.static ClauseContextvalueOf(StringParser reader)-
Methods inherited from class com.attivio.sdk.search.fields.UnaryFieldExpression
clone, forEachField, getExpression, getFieldName, hasChildren, rewrite, setExpression
-
Methods inherited from class com.attivio.sdk.search.fields.FieldExpression
apply, copyOf, forEachPhrase, forEachQuery, getDefaultName, isConstant, parse, quote, rewrite, rewriteChildren, toString, toString, valueOf
-
-
-
-
Field Detail
-
ROOT_CONTEXT
public static final java.lang.String ROOT_CONTEXT
Context for root clause.- See Also:
- Constant Field Values
-
DEFAULT_CLAUSE_CONTEXT
public static final java.lang.String DEFAULT_CLAUSE_CONTEXT
Default context name for clauses.- See Also:
- Constant Field Values
-
ALL_CONTEXT
public static final java.lang.String ALL_CONTEXT
Context to request field from all clauses.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ClauseContext
public ClauseContext(java.lang.String field, java.lang.String clause)
-
ClauseContext
public ClauseContext(FieldExpression expression, java.lang.String clause)
-
-
Method Detail
-
isConstant
public boolean isConstant()
Returnstrueif this field expression evaluates to a constant value.- Overrides:
isConstantin classUnaryFieldExpression
-
getClauseName
public java.lang.String getClauseName()
Get the name of the clause to select fields for.A clause name of
*ornullwill select fields for all clauses.
-
setClauseName
public void setClauseName(java.lang.String value)
Set the name of the clause to select fields for.
-
getType
public SchemaField.Type getType(Schema schema)
Resolve the type for this expression.- Specified by:
getTypein classFieldExpression
-
toString
protected void toString(java.lang.StringBuilder buffer, FieldExpression.StringMode mode)Writes the string representation of this field expression tobuffer.- Specified by:
toStringin classFieldExpression
-
hashCode
public int hashCode()
- Overrides:
hashCodein classUnaryFieldExpression
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classUnaryFieldExpression
-
clone
public ClauseContext clone()
- Overrides:
clonein classUnaryFieldExpression
-
valueOf
public static ClauseContext valueOf(StringParser reader)
-
-