public static class CompositeJoinQuery.Clause extends Object
CompositeJoinQuery
.Modifier and Type | Class and Description |
---|---|
protected static class |
QueryComponent.Parameter
Linked list of parameters.
|
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_FACET
Default value for
AbstractJoinClause.isFacet() . |
protected QueryComponent.Parameter |
parameters |
Modifier and Type | Method and Description |
---|---|
protected static void |
addParameter(StringBuilder buffer,
String name,
Object value)
Add "\"
name \"=\"value \"" to buffer . |
protected void |
addParameters(StringBuilder buffer,
boolean compact)
Append all parameters for this query to
buffer . |
protected static void |
appendParameter(StringBuilder buffer,
String name,
Object value)
Add ", \"
name \"=\"value \"" to buffer . |
protected void |
appendParameters(StringBuilder buffer,
boolean compact)
Append all
parameters to buffer . |
CompositeJoinQuery.Clause |
clone() |
boolean |
containsParameter(String name)
Returns true if the specified parameter exists for this Query object.
|
boolean |
containsParameters() |
boolean |
equals(Object other) |
protected boolean |
equals(Object other,
Map<String,Object> defaults,
Set<String> ignore)
Checks whether
query equals this Query object. |
protected static void |
escape(StringBuilder buffer,
Object value) |
protected void |
escape(StringBuilder buffer,
String value,
boolean quote)
Helper method to escape a string for toString() .
|
String |
getAlias()
Get the name for this clause.
|
int |
getBoost()
Gets the boost for this clause.
|
String |
getForeignKey()
Experimental
|
protected Object |
getInternalParameter(String name) |
JoinMode |
getMode()
Gets the mode for joining.
|
Object |
getParameter(String name)
Returns a named property for this Query object.
|
boolean |
getParameter(String name,
boolean defaultValue)
Gets a boolean parameter.
|
double |
getParameter(String name,
double defaultValue)
Gets a double parameter.
|
float |
getParameter(String name,
float defaultValue)
Gets a float parameter.
|
int |
getParameter(String name,
int defaultValue)
Gets an integer parameter.
|
long |
getParameter(String name,
long defaultValue)
Gets a long parameter.
|
Object |
getParameter(String name,
Object defaultValue)
Gets a parameter.
|
String |
getParameter(String name,
String defaultValue)
Gets a String parameter.
|
Query |
getQuery()
Gets the query for this clause.
|
int |
getRollupLimit()
Get the maximum number of child documents to collect for this clause per parent document.
|
int |
getRollupLimit(int defaultValue)
Get the maximum number of child documents to collect for this clause per parent document.
|
int |
hashCode() |
protected static StringBuilder |
indent(StringBuilder buffer,
int indent)
Support method to indent a "line" in a StringBuilder.
|
protected boolean |
isCompactParameter(String key,
Object value)
Check if parameter should be included in compact representation.
|
boolean |
isFacet()
true if documents for this clause should be used in facet document collection. |
Iterator<Map.Entry<String,Object>> |
parameters()
Get an iterator for returning all custom parameters.
|
protected static int |
parseIntParameter(Object value,
int defaultValue) |
String |
prettyFormat()
Returns a hierarchical representation of this query as a string.
|
protected void |
prettyFormat(StringBuilder buffer,
int indent)
Support prettyFormat on JoinQuery.
|
protected void |
prettyFormatParameters(StringBuilder buffer,
int indent) |
void |
prettyPrint()
Sends a hierarchical representation of this query to standard out.
|
void |
prettyPrint(PrintStream out)
Sends a hierarchical representation of this query specified PrintStream.
|
Object |
removeParameter(String name)
Remove the value for a parameter for this Query object.
|
void |
setAlias(String value)
Set the name for this clause.
|
protected void |
setBooleanParameter(String key,
Object value)
Internal method for setting a boolean parameter.
|
void |
setBoost(int value)
Sets the boost for this clause.
|
protected void |
setEnumParameter(String key,
Object value,
String... enumValues)
Internal method for setting an object parameter.
|
void |
setFacet(boolean value)
Set if documents for this clause should be used in facet document collection.
|
void |
setForeignKey(String value)
Experimental
|
protected void |
setIntegerParameter(String key,
Object value)
Internal method for setting an integer parameter.
|
void |
setMode(JoinMode value) |
void |
setParameter(String parameter,
Object value) |
void |
setParameters(Map<String,Object> value) |
void |
setParameters(Map<String,Object> params,
boolean override)
Copies parameters from a Map into this Query.
|
void |
setQuery(Query value)
Sets the query for this clause.
|
void |
setRollupLimit(int value)
Set the maximum number of child documents to collect for this clause per parent document.
|
protected void |
setRollupParameter(String key,
Object value) |
protected void |
setStringParameter(String key,
Object value)
Internal method for setting a string parameter.
|
protected void |
setUnsignedParameter(String key,
Object value)
Internal method for setting an integer parameter.
|
String |
toString() |
String |
toString(boolean compact) |
protected void |
toString(StringBuilder buffer,
boolean compact)
Write the String representation of this query to
buffer . |
public static final boolean DEFAULT_FACET
AbstractJoinClause.isFacet()
.protected QueryComponent.Parameter parameters
public String getForeignKey()
public void setForeignKey(String value)
public JoinMode getMode()
public void setMode(JoinMode value)
public CompositeJoinQuery.Clause clone()
public int hashCode()
protected void appendParameters(StringBuilder buffer, boolean compact)
parameters
to buffer
.protected boolean equals(Object other, Map<String,Object> defaults, Set<String> ignore)
query
equals this Query object.other
- the query to compare todefaults
- map of default values for query parametersignore
- set of query parameters to ignore during equality check.public String getAlias()
This name can be used for selecting fields for child documents generated by this clause.
Use ClauseContext
to identify fields that should be
returned only for this clause.
public void setAlias(String value)
public Query getQuery()
public void setQuery(Query value)
public int getRollupLimit()
public int getRollupLimit(int defaultValue)
public void setRollupLimit(int value)
public boolean isFacet()
true
if documents for this clause should be used in facet document collection.public void setFacet(boolean value)
public int getBoost()
public void setBoost(int value)
protected void toString(StringBuilder buffer, boolean compact)
buffer
.protected void prettyFormat(StringBuilder buffer, int indent)
buffer
- buffer to write pretty formated parameters to.indent
- the indentation levelpublic Iterator<Map.Entry<String,Object>> parameters()
public boolean containsParameters()
public boolean containsParameter(String name)
name
- parameter name.public final Object getParameter(String name)
name
- parameter name.public final String getParameter(String name, String defaultValue)
name
- parameter name.defaultValue
- default value to return if not set.public final boolean getParameter(String name, boolean defaultValue)
name
- parameter name.defaultValue
- default value to return if not set.public final int getParameter(String name, int defaultValue)
name
- parameter name.defaultValue
- default value to return if not set.public final long getParameter(String name, long defaultValue)
name
- parameter name.defaultValue
- default value to return if not set.public final float getParameter(String name, float defaultValue)
name
- parameter name.defaultValue
- default value to return if not set.public final double getParameter(String name, double defaultValue)
name
- parameter name.defaultValue
- default value to return if not set.public Object getParameter(String name, Object defaultValue)
name
- name of parameter to return.defaultValue
- default value to return if not set.public void setParameters(Map<String,Object> params, boolean override)
params
- the parameters to copy into this Query instance.override
- indicates if parameters from params should overwrite existing parameters in this Queryprotected static int parseIntParameter(Object value, int defaultValue)
public Object removeParameter(String name)
name
- the parameter to remove.protected final void setEnumParameter(String key, Object value, String... enumValues)
NOTE: enumValues must contain lower case strings.
protected final void setStringParameter(String key, Object value)
protected final void setIntegerParameter(String key, Object value)
protected final void setUnsignedParameter(String key, Object value)
protected final void setBooleanParameter(String key, Object value)
protected boolean isCompactParameter(String key, Object value)
protected void addParameters(StringBuilder buffer, boolean compact)
buffer
.protected void prettyFormatParameters(StringBuilder buffer, int indent)
protected static void appendParameter(StringBuilder buffer, String name, Object value)
name
\"=\"value
\"" to buffer
.protected static void addParameter(StringBuilder buffer, String name, Object value)
name
\"=\"value
\"" to buffer
.protected static void escape(StringBuilder buffer, Object value)
protected void escape(StringBuilder buffer, String value, boolean quote)
buffer
- buffer to write escaped value tovalue
- the value to escapequote
- if true, escaped value will be wrapped in double quotes.public final String toString(boolean compact)
public final void prettyPrint()
public final void prettyPrint(PrintStream out)
out
- stream to output query representation topublic final String prettyFormat()
protected static StringBuilder indent(StringBuilder buffer, int indent)
Copyright © 2018 Attivio, Inc. All Rights Reserved.
PATENT NOTICE: Attivio, Inc. Software Related Patents. With respect to the Attivio software product(s) being used, the following patents apply: Querying Joined Data Within A Search Engine Index: United States Patent No.(s): 8,073,840. Ordered Processing of Groups of Messages: U.S. Patent No.(s) 8,495,656. Signal processing approach to sentiment analysis for entities in documents: U.S. Patent No.(s) 8,725,494. Other U.S. and International Patents Pending.