|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cayenne.query.QueryChain
public class QueryChain
A Query decorator for a collection of other queries. Note that QueryChain will always return DataRows (that is if it returns data), as it has no way of knowing how to convert the results to objects.
| Field Summary | |
|---|---|
protected Collection<Query> |
chain
|
protected DataMap |
dataMap
|
protected String |
name
|
| Constructor Summary | |
|---|---|
QueryChain()
Creates an empty QueryChain. |
|
QueryChain(Collection<Query> queries)
Creates a new QueryChain with a collection of Queries. |
|
QueryChain(Query[] queries)
Creates a new QueryChain out of an array of queries. |
|
| Method Summary | ||
|---|---|---|
|
acceptVisitor(ConfigurationNodeVisitor<T> visitor)
|
|
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. |
|
DataMap |
getDataMap()
|
|
QueryMetadata |
getMetaData(EntityResolver resolver)
Returns default metadata. |
|
String |
getName()
Returns a symbolic name of the query. |
|
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. |
|
void |
setDataMap(DataMap dataMap)
|
|
void |
setName(String name)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Collection<Query> chain
protected String name
protected DataMap dataMap
| Constructor Detail |
|---|
public QueryChain()
public QueryChain(Query[] queries)
public QueryChain(Collection<Query> queries)
| Method Detail |
|---|
public <T> T acceptVisitor(ConfigurationNodeVisitor<T> visitor)
acceptVisitor in interface ConfigurationNodepublic void addQuery(Query query)
public boolean removeQuery(Query query)
public boolean isEmpty()
public void route(QueryRouter router,
EntityResolver resolver,
Query substitutedQuery)
route in interface Querypublic SQLAction createSQLAction(SQLActionVisitor visitor)
createSQLAction in interface Querypublic String getName()
Query
getName in interface Querypublic void setName(String name)
public DataMap getDataMap()
getDataMap in interface Querypublic void setDataMap(DataMap dataMap)
public QueryMetadata getMetaData(EntityResolver resolver)
getMetaData in interface Query
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||