|
|||||||||
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 java.util.Collection |
chain
|
protected java.lang.String |
name
|
Constructor Summary | |
---|---|
QueryChain()
Creates an empty QueryChain. |
|
QueryChain(java.util.Collection 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 | |
---|---|
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. |
java.lang.String |
getName()
Returns a symbolic name of the query. |
java.lang.Object |
getRoot()
Deprecated. since 1.2 |
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 |
setName(java.lang.String name)
Sets a symbolic name of the query. |
void |
setRoot(java.lang.Object root)
Deprecated. since 1.2 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Collection chain
protected java.lang.String name
Constructor Detail |
---|
public QueryChain()
public QueryChain(Query[] queries)
public QueryChain(java.util.Collection queries)
Method Detail |
---|
public void addQuery(Query query)
public boolean removeQuery(Query query)
public boolean isEmpty()
public void route(QueryRouter router, EntityResolver resolver, Query substitutedQuery)
route
in interface Query
public SQLAction createSQLAction(SQLActionVisitor visitor)
createSQLAction
in interface Query
public java.lang.String getName()
Query
getName
in interface Query
public void setName(java.lang.String name)
Query
setName
in interface Query
public QueryMetadata getMetaData(EntityResolver resolver)
getMetaData
in interface Query
public java.lang.Object getRoot()
Query
getRoot
in interface Query
public void setRoot(java.lang.Object root)
Query
setRoot
in interface Query
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |