Class AbstractStatementBuilder<T extends Statement>
java.lang.Object
com.tangosol.coherence.dslquery.statement.AbstractStatementBuilder<T>
- All Implemented Interfaces:
 StatementBuilder<T>
- Direct Known Subclasses:
 ArchiveSnapshotStatementBuilder,BackupStatementBuilder,CreateCacheStatementBuilder,CreateIndexStatementBuilder,CreateSnapshotStatementBuilder,DeleteStatementBuilder,DropCacheStatementBuilder,DropIndexStatementBuilder,ForceRecoveryStatementBuilder,InsertStatementBuilder,ListArchiverStatementBuilder,ListServicesStatementBuilder,ListSnapshotsStatementBuilder,QueryRecorderStatementBuilder,RecoverSnapshotStatementBuilder,RemoveSnapshotStatementBuilder,RestoreStatementBuilder,ResumeServiceStatementBuilder,RetrieveSnapshotStatementBuilder,SelectStatementBuilder,SourceStatementBuilder,SuspendServiceStatementBuilder,TruncateCacheStatementBuilder,UpdateStatementBuilder,ValidateSnapshotStatementBuilder
public abstract class AbstractStatementBuilder<T extends Statement>
extends Object
implements StatementBuilder<T>
A base class for 
StatementBuilder implementations.- Since:
 - Coherence 12.2.1
 - Author:
 - jk 2013.12.09
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected static StringReturn a String that is the value of the given Term.protected static FilterensureFilter(NodeTerm termWhere, String sCacheName, String sAlias, List listBindVars, ParameterResolver namedBindVars, ExecutionContext ctx) Build aFilterfor the given cache using the given where clause, alias and bind environments.protected static StringReturn the String that represents the cache name alias from the given AST node by looking for the "alias" term in the AST.protected static StringgetCacheName(NodeTerm sn) Return the String that represents the cache name from the given AST node by looking for the "from" term AST.protected static TermgetExtractor(NodeTerm sn) Return the AST node that represents the extractor for an index from the given AST node.protected static NodeTermReturn the AST node that represents the fields to select from the given AST node.protected static StringReturn the String that represents the filename from the given AST node by looking for the "file" term in the AST.protected static NodeTermgetGroupBy(NodeTerm sn) Return the AST node that represents the group by fields from the given AST node.protected static TermgetInsertKey(NodeTerm sn) Return the AST node that represents the key to insert from the given AST node.protected static TermReturn the AST node that represents the value to insert from the given AST node.protected static booleanReturn the boolean that indicates whether distinctness in indicated in the given AST node.protected static TermgetSetList(NodeTerm sn) Return the AST node that represents the list of "Set statements" from the given AST node.protected static NodeTermReturn the AST node that represents the where clause from the given AST node.protected static booleanheadsMatch(NodeTerm fieldList, NodeTerm groupByList) Test to see if the AST for the group-by is equal to the head of the list from the select clause AST.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.tangosol.coherence.dslquery.StatementBuilder
getDescription, getSyntax, realize 
- 
Constructor Details
- 
AbstractStatementBuilder
public AbstractStatementBuilder() 
 - 
 - 
Method Details
- 
ensureFilter
protected static Filter ensureFilter(NodeTerm termWhere, String sCacheName, String sAlias, List listBindVars, ParameterResolver namedBindVars, ExecutionContext ctx) Build aFilterfor the given cache using the given where clause, alias and bind environments.- Parameters:
 termWhere- theNodeTermcontaining the where clausesCacheName- the name of the cache that the filter will be built forsAlias- the table/cache alias used in the where clause, may be nulllistBindVars- bind variables to be used to replace any numeric bind variables in the where clausenamedBindVars- named bind variables to be used to replace any named bind variables in the where clausectx- theExecutionContextto use- Returns:
 - a 
Filtercreated from the given where clause 
 - 
atomicStringValueOf
Return a String that is the value of the given Term.- Parameters:
 t- the Term that is atomic- Returns:
 - return the String found in the AtomicTerm
 
 - 
getCacheName
Return the String that represents the cache name from the given AST node by looking for the "from" term AST.- Parameters:
 sn- the syntax node- Returns:
 - return the String found in the AST node
 
 - 
getAlias
Return the String that represents the cache name alias from the given AST node by looking for the "alias" term in the AST.- Parameters:
 sn- the syntax node- Returns:
 - return the String found in the AST node
 
 - 
getFile
Return the String that represents the filename from the given AST node by looking for the "file" term in the AST.- Parameters:
 sn- the syntax node- Returns:
 - return the String found in the AST node
 
 - 
getIsDistinct
Return the boolean that indicates whether distinctness in indicated in the given AST node.- Parameters:
 sn- the syntax node- Returns:
 - return the boolean result of testing the node
 
 - 
getWhere
Return the AST node that represents the where clause from the given AST node.- Parameters:
 sn- the syntax node- Returns:
 - return the AST node found in the parent AST node
 
 - 
getFields
Return the AST node that represents the fields to select from the given AST node.- Parameters:
 sn- the syntax node- Returns:
 - return the AST node found in the parent AST node
 
 - 
getInsertKey
Return the AST node that represents the key to insert from the given AST node.- Parameters:
 sn- the syntax node- Returns:
 - return the AST node found in the parent AST node
 
 - 
getInsertValue
Return the AST node that represents the value to insert from the given AST node.- Parameters:
 sn- the syntax node- Returns:
 - return the AST node found in the parent AST node
 
 - 
getGroupBy
Return the AST node that represents the group by fields from the given AST node.- Parameters:
 sn- the syntax node- Returns:
 - return the AST node found in the parent AST node
 
 - 
getSetList
Return the AST node that represents the list of "Set statements" from the given AST node.- Parameters:
 sn- the syntax node- Returns:
 - return the AST node found in the parent AST node
 
 - 
getExtractor
Return the AST node that represents the extractor for an index from the given AST node.- Parameters:
 sn- the syntax node- Returns:
 - return the AST node found in the parent AST node
 
 - 
headsMatch
Test to see if the AST for the group-by is equal to the head of the list from the select clause AST.- Parameters:
 fieldList- the list of fields in a select listgroupByList- the list of fields in a group by clause- Returns:
 - return the results of matching
 
 
 -