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
public class SQLTemplateDescriptor extends QueryDescriptor
- Since:
- 4.0
- See Also:
- Serialized Form
- 
Field SummaryFields Modifier and Type Field Description protected Map<String,String>adapterSqlprotected Map<String,Integer>prefetchesMapprotected StringsqlFields inherited from class org.apache.cayenne.map.QueryDescriptorDATA_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 SummaryConstructors Constructor Description SQLTemplateDescriptor()
- 
Method SummaryModifier and Type Method Description voidaddPrefetch(String prefetchPath, int semantics)Adds single prefetch path with semantics to this query.SQLTemplatebuildQuery()Assembles Cayenne query instance of appropriate type from this descriptor.voidencodeAsXML(XMLEncoder encoder, ConfigurationNodeVisitor delegate)Prints itself as XML to the provided XMLEncoder.Map<String,String>getAdapterSql()Returns map of db adapter specific SQL statements.Map<String,Integer>getPrefetchesMap()Returns map of prefetch paths with semantics for this query.StringgetSql()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.voidsetPrefetchesMap(HashMap<String,Integer> prefetchesMap)Sets map of prefetch paths with semantics for this query.voidsetSql(String sql)Sets default SQL statement for this query.Methods inherited from class org.apache.cayenne.map.QueryDescriptoracceptVisitor, descriptor, ejbqlQueryDescriptor, getDataMap, getName, getProperties, getProperty, getRoot, getType, procedureQueryDescriptor, selectQueryDescriptor, setDataMap, setName, setProperties, setProperty, setRoot, setType, sqlTemplateDescriptor
- 
Field Details- 
sql
- 
prefetchesMap
- 
adapterSql
 
- 
- 
Constructor Details- 
SQLTemplateDescriptorpublic SQLTemplateDescriptor()
 
- 
- 
Method Details- 
getSqlReturns default SQL statement for this query.
- 
setSqlSets default SQL statement for this query.
- 
getAdapterSqlReturns map of db adapter specific SQL statements.
- 
setAdapterSqlSets a map db adapter specific SQL statements for this query.
- 
getPrefetchesMapReturns map of prefetch paths with semantics for this query.- Since:
- 4.1
 
- 
setPrefetchesMapSets map of prefetch paths with semantics for this query.- Since:
- 4.1
 
- 
addPrefetchAdds single prefetch path with semantics to this query.- Since:
- 4.1
 
- 
removePrefetchRemoves single prefetch path from this query.- Since:
- 4.1
 
- 
buildQueryDescription copied from class:QueryDescriptorAssembles Cayenne query instance of appropriate type from this descriptor.- Overrides:
- buildQueryin class- QueryDescriptor
 
- 
encodeAsXMLDescription copied from interface:XMLSerializablePrints itself as XML to the provided XMLEncoder.- Specified by:
- encodeAsXMLin interface- XMLSerializable
- Overrides:
- encodeAsXMLin class- QueryDescriptor
 
 
-