Class SQLTemplateDescriptor
java.lang.Object
org.apache.cayenne.map.QueryDescriptor
org.apache.cayenne.map.SQLTemplateDescriptor
- All Implemented Interfaces:
ProjectNode, XMLSerializable
- Since:
- 4.0
-
Field Summary
FieldsFields inherited from class QueryDescriptor
cacheGroup, cacheStrategy, DATA_MAP_ROOT, dataMap, DB_ENTITY_ROOT, fetchingDataRows, JAVA_CLASS_ROOT, name, OBJ_ENTITY_ROOT, pageSize, PROCEDURE_ROOT, root, statementFetchSize -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPrefetch(String prefetchPath, int semantics) Adds single prefetch path with semantics to this query.SQLTemplate<?> Assembles Cayenne query instance of appropriate type from this descriptor.SQLTemplate<?> buildQuery(Map<String, ?> parameters) Assembles Cayenne query instance of appropriate type from this descriptor, applying a map of named parameters to it.voidencodeAsXML(XMLEncoder encoder, ProjectNodeVisitor<?> delegate) Prints itself as XML to the provided XMLEncoder.Returns map of db adapter specific SQL statements.Returns the capitalization strategy applied to the column names of the query result, or null if none is set.Returns map of prefetch paths with semantics for this query.getSql()Returns default SQL statement for this query.voidremovePrefetch(String prefetchPath) Removes single prefetch path from this query.voidsetAdapterSql(Map<String, String> adapterSql) Sets a map db adapter specific SQL statements for this query.voidsetColumnNamesCapitalization(CapsStrategy columnNamesCapitalization) voidsetPrefetchesMap(HashMap<String, Integer> prefetchesMap) Sets map of prefetch paths with semantics for this query.voidSets default SQL statement for this query.Methods inherited from class QueryDescriptor
acceptVisitor, getCacheGroup, getCacheStrategy, getDataMap, getName, getPageSize, getRoot, getStatementFetchSize, isFetchingDataRows, setCacheGroup, setCacheStrategy, setDataMap, setFetchingDataRows, setName, setPageSize, setRoot, setStatementFetchSize
-
Field Details
-
sql
-
prefetchesMap
-
adapterSql
-
columnNamesCapitalization
-
-
Constructor Details
-
SQLTemplateDescriptor
public SQLTemplateDescriptor()
-
-
Method Details
-
getSql
Returns default SQL statement for this query. -
setSql
Sets default SQL statement for this query. -
getAdapterSql
-
setAdapterSql
-
getColumnNamesCapitalization
Returns the capitalization strategy applied to the column names of the query result, or null if none is set.- Since:
- 5.0
-
setColumnNamesCapitalization
- Since:
- 5.0
-
getPrefetchesMap
-
setPrefetchesMap
-
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:QueryDescriptorAssembles Cayenne query instance of appropriate type from this descriptor.- Specified by:
buildQueryin classQueryDescriptor
-
buildQuery
Description copied from class:QueryDescriptorAssembles Cayenne query instance of appropriate type from this descriptor, applying a map of named parameters to it.- Specified by:
buildQueryin classQueryDescriptor- Since:
- 5.0
-
encodeAsXML
Description copied from interface:XMLSerializablePrints itself as XML to the provided XMLEncoder.
-