Package org.apache.cayenne.query

Defines standard queries supported by Cayenne and extension mechanism to create custom queries. Many of the queries in this package are used by the framework internally. Normally users would only care about these general query classes:
  • SelectQuery
  • SQLTemplate
  • ProcedureQuery
and sometimes - these specialized queries:
  • QueryChain
  • RelationshipQuery
  • SingleObjectQuery

Cayenne can "execute" any object as a query as long as it implements Query interface and provides meaningful implementation of either Query.route(...) and/or Query.createSQLAction(SQLActionVisitor)} methods. So users can extend/customize queries if they need to. Custom implementations would normally either create a query from a standard Cayenne set and delegate the execution to it (acting as a sort of "query builder"), or can implement its own non-standard SQLAction.