public class QueryChain extends Object implements Query
Modifier and Type | Field and Description |
---|---|
protected Collection<Query> |
chain |
Constructor and Description |
---|
QueryChain()
Creates an empty QueryChain.
|
QueryChain(Collection<? extends Query> queries)
Creates a new QueryChain with a collection of Queries.
|
QueryChain(Query[] queries)
Creates a new QueryChain out of an array of queries.
|
Modifier and Type | Method and Description |
---|---|
void |
addQuery(Query query)
Adds a query to the chain.
|
SQLAction |
createSQLAction(SQLActionVisitor visitor)
Throws an exception as execution should've been delegated to the queries contained
in the chain.
|
QueryMetadata |
getMetaData(EntityResolver resolver)
Returns default metadata.
|
boolean |
isEmpty() |
boolean |
removeQuery(Query query)
Removes a query from the chain, returning true if the query was indeed present in
the chain and was removed.
|
void |
route(QueryRouter router,
EntityResolver resolver,
Query substitutedQuery)
Delegates routing to each individual query in the chain.
|
protected Collection<Query> chain
public QueryChain()
public QueryChain(Query[] queries)
public QueryChain(Collection<? extends Query> queries)
public void addQuery(Query query)
public boolean removeQuery(Query query)
public boolean isEmpty()
public void route(QueryRouter router, EntityResolver resolver, Query substitutedQuery)
public SQLAction createSQLAction(SQLActionVisitor visitor)
createSQLAction
in interface Query
public QueryMetadata getMetaData(EntityResolver resolver)
getMetaData
in interface Query
Copyright © 2001–2019 Apache Cayenne. All rights reserved.