public class DataMapArtifact extends Object implements Artifact
Artifact facade for a DataMap.| Modifier and Type | Field and Description |
|---|---|
protected DataMap |
dataMap |
static String |
DATAMAP_UTILS_KEY |
protected Collection<EJBQLQuery> |
ejbqlQueries |
protected Collection<ProcedureQuery> |
procedureQueries |
protected Collection<String> |
queryNames |
protected Collection<SelectQuery> |
selectQueries |
protected Collection<SQLTemplate> |
sqlTemplateQueries |
BASE_CLASS_KEY, BASE_PACKAGE_KEY, IMPORT_UTILS_KEY, OBJECT_KEY, STRING_UTILS_KEY, SUB_CLASS_KEY, SUB_PACKAGE_KEY, SUPER_CLASS_KEY, SUPER_PACKAGE_KEY| Constructor and Description |
|---|
DataMapArtifact(DataMap dataMap,
Collection<Query> queries) |
| Modifier and Type | Method and Description |
|---|---|
DataMap |
getDataMap() |
Object |
getObject()
Returns a mapping metadata object for this artifact.
|
String |
getQualifiedBaseClassName() |
String |
getQualifiedClassName() |
Collection<String> |
getQueryNames() |
Collection<SelectQuery> |
getSelectQueries() |
TemplateType[] |
getTemplateTypes(ArtifactGenerationMode mode) |
boolean |
hasQueryNames() |
boolean |
hasSelectQueries() |
void |
postInitContext(org.apache.velocity.VelocityContext context)
A callback method that allows each artifact to add its own special keys to the
context.
|
public static final String DATAMAP_UTILS_KEY
protected DataMap dataMap
protected Collection<SelectQuery> selectQueries
protected Collection<SQLTemplate> sqlTemplateQueries
protected Collection<ProcedureQuery> procedureQueries
protected Collection<EJBQLQuery> ejbqlQueries
protected Collection<String> queryNames
public DataMapArtifact(DataMap dataMap, Collection<Query> queries)
public String getQualifiedBaseClassName()
getQualifiedBaseClassName in interface Artifactpublic String getQualifiedClassName()
getQualifiedClassName in interface Artifactpublic Object getObject()
Artifactpublic void postInitContext(org.apache.velocity.VelocityContext context)
ArtifactClassGenerationAction.resetContextForArtifactTemplate(Artifact, TemplateType),
after the context is initialized by code generator, so this method can use
predefined keys from the context.postInitContext in interface Artifactpublic TemplateType[] getTemplateTypes(ArtifactGenerationMode mode)
getTemplateTypes in interface Artifactpublic Collection<SelectQuery> getSelectQueries()
public boolean hasSelectQueries()
public boolean hasQueryNames()
public Collection<String> getQueryNames()
public DataMap getDataMap()
Copyright © 2001–2015 Apache Cayenne. All rights reserved.