Package org.apache.cayenne.lifecycle.id
Class StringIdQuery
java.lang.Object
org.apache.cayenne.lifecycle.id.StringIdQuery
- All Implemented Interfaces:
Serializable,Query
A query that allows to fetch objects based on one or more String IDs. The returned
objects do not have to be of the same type, be related via inheritance, or come from
the same DB table. Note that if you expect multiple types of objects, use
ObjectContext.performGenericQuery(Query). The returned QueryResponse will
contain separate lists of DataRows for each type in no particular order.
As of this writing, a limitation of this query is that it returns DataRows that need to
be manually converted to objects if needed. In that it is similar to QueryChain.
- Since:
- 3.1
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStringIdQuery(String... stringIds) StringIdQuery(Collection<String> stringIds) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStringIds(String... ids) createSQLAction(SQLActionVisitor visitor) protected Map<String, ObjectSelect> getIdQueriesByEntity(EntityResolver resolver) getMetaData(EntityResolver resolver) voidroute(QueryRouter router, EntityResolver resolver, Query substitutedQuery)
-
Field Details
-
stringIds
-
idQueriesByEntity
-
-
Constructor Details
-
StringIdQuery
-
StringIdQuery
-
-
Method Details
-
getStringIds
-
addStringIds
-
getIdQueriesByEntity
-
getMetaData
- Specified by:
getMetaDatain interfaceQuery
-
route
-
createSQLAction
- Specified by:
createSQLActionin interfaceQuery
-