Package org.apache.cayenne.map
Class SQLTemplateDescriptor
java.lang.Object
org.apache.cayenne.map.QueryDescriptor
org.apache.cayenne.map.SQLTemplateDescriptor
- All Implemented Interfaces:
Serializable
,ConfigurationNode
,XMLSerializable
- Since:
- 4.0
- See Also:
-
Field Summary
Fields inherited from class org.apache.cayenne.map.QueryDescriptor
DATA_MAP_ROOT, dataMap, DB_ENTITY_ROOT, EJBQL_QUERY, JAVA_CLASS_ROOT, name, OBJ_ENTITY_ROOT, PROCEDURE_QUERY, PROCEDURE_ROOT, properties, root, SELECT_QUERY, SQL_TEMPLATE, type
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPrefetch
(String prefetchPath, int semantics) Adds single prefetch path with semantics to this query.Assembles Cayenne query instance of appropriate type from this descriptor.void
encodeAsXML
(XMLEncoder encoder, ConfigurationNodeVisitor delegate) Prints itself as XML to the provided XMLEncoder.Returns map of db adapter specific SQL statements.Returns map of prefetch paths with semantics for this query.getSql()
Returns default SQL statement for this query.void
removePrefetch
(String prefetchPath) Removes single prefetch path from this query.void
setAdapterSql
(Map<String, String> adapterSql) Sets a map db adapter specific SQL statements for this query.void
setPrefetchesMap
(HashMap<String, Integer> prefetchesMap) Sets map of prefetch paths with semantics for this query.void
Sets default SQL statement for this query.Methods inherited from class org.apache.cayenne.map.QueryDescriptor
acceptVisitor, descriptor, ejbqlQueryDescriptor, getDataMap, getName, getProperties, getProperty, getRoot, getType, procedureQueryDescriptor, selectQueryDescriptor, setDataMap, setName, setProperties, setProperty, setRoot, setType, sqlTemplateDescriptor
-
Field Details
-
sql
-
prefetchesMap
-
adapterSql
-
-
Constructor Details
-
SQLTemplateDescriptor
public SQLTemplateDescriptor()
-
-
Method Details
-
getSql
Returns default SQL statement for this query. -
setSql
Sets default SQL statement for this query. -
getAdapterSql
Returns map of db adapter specific SQL statements. -
setAdapterSql
Sets a map db adapter specific SQL statements for this query. -
getPrefetchesMap
Returns map of prefetch paths with semantics for this query.- Since:
- 4.1
-
setPrefetchesMap
Sets map of prefetch paths with semantics for this query.- Since:
- 4.1
-
addPrefetch
Adds single prefetch path with semantics to this query.- Since:
- 4.1
-
removePrefetch
Removes single prefetch path from this query.- Since:
- 4.1
-
buildQuery
Description copied from class:QueryDescriptor
Assembles Cayenne query instance of appropriate type from this descriptor.- Overrides:
buildQuery
in classQueryDescriptor
-
encodeAsXML
Description copied from interface:XMLSerializable
Prints itself as XML to the provided XMLEncoder.- Specified by:
encodeAsXML
in interfaceXMLSerializable
- Overrides:
encodeAsXML
in classQueryDescriptor
-