|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.gen.ClassGenerationAction
org.apache.cayenne.gen.ClassGenerationAction1_1
public class ClassGenerationAction1_1
A backwards compatible class generation action that delegates to the deprecated
DefaultClassGenerator
.
Field Summary | |
---|---|
protected List<ObjEntity> |
entities
Deprecated. |
protected DefaultClassGenerator |
generator
Deprecated. |
protected org.apache.commons.logging.Log |
logger
Deprecated. |
static String |
SINGLE_CLASS_TEMPLATE
Deprecated. |
static String |
SUBCLASS_TEMPLATE
Deprecated. |
static String |
SUPERCLASS_TEMPLATE
Deprecated. |
Constructor Summary | |
---|---|
ClassGenerationAction1_1()
Deprecated. |
Method Summary | |
---|---|
void |
addEmbeddables(Collection<Embeddable> embeddables)
Deprecated. |
void |
addEntities(Collection<ObjEntity> entities)
Deprecated. Adds entities to the internal entity list. |
protected String |
customTemplateName(TemplateType type)
Deprecated. |
protected String |
defaultTemplateName(TemplateType type)
Deprecated. |
void |
execute()
Deprecated. Executes class generation once per each artifact. |
protected void |
execute(Artifact artifact)
Deprecated. Executes class generation for a single artifact. |
protected File |
fileForClass()
Deprecated. Returns a target file where a generated class must be saved. |
protected File |
fileForSuperclass()
Deprecated. Returns a target file where a generated superclass must be saved. |
protected String |
getSuperclassPrefix()
Deprecated. Returns a String used to prefix class name to create a generated superclass. |
protected org.apache.velocity.Template |
getTemplate(TemplateType type)
Deprecated. |
protected boolean |
isOld(File file)
Deprecated. Returns true if file parameter is older than internal timestamp of
this class generator. |
protected File |
mkpath(File dest,
String pkgName)
Deprecated. Returns a File object corresponding to a directory where files that belong to pkgName package should reside. |
protected Writer |
openWriter(TemplateType templateType)
Deprecated. Opens a Writer to write generated output. |
protected void |
resetContextForArtifact(Artifact artifact)
Deprecated. VelocityContext initialization method called once per artifact. |
void |
setArtifactsGenerationMode(String mode)
Deprecated. |
void |
setContext(org.apache.velocity.VelocityContext context)
Deprecated. Sets an optional shared VelocityContext. |
void |
setDataMap(DataMap dataMap)
Deprecated. |
void |
setDestDir(File destDir)
Deprecated. Sets the destDir. |
void |
setEmbeddableSuperTemplate(String embeddableSuperTemplate)
Deprecated. |
void |
setEmbeddableTemplate(String embeddableTemplate)
Deprecated. |
void |
setEncoding(String encoding)
Deprecated. Sets file encoding. |
void |
setLogger(org.apache.commons.logging.Log logger)
Deprecated. Injects an optional logger that will be used to trace generated files at the info level. |
void |
setMakePairs(boolean makePairs)
Deprecated. Sets makepairs property. |
void |
setOutputPattern(String outputPattern)
Deprecated. Sets outputPattern property. |
void |
setOverwrite(boolean overwrite)
Deprecated. Sets overwrite property. |
void |
setSuperPkg(String superPkg)
Deprecated. Sets "superPkg" property value. |
void |
setSuperTemplate(String superTemplate)
Deprecated. Sets superTemplate property. |
void |
setTemplate(String template)
Deprecated. Sets template property. |
void |
setTimestamp(long timestamp)
Deprecated. |
void |
setUsePkgPath(boolean usePkgPath)
Deprecated. Sets usepkgpath property. |
protected void |
validateAttributes()
Deprecated. Validates the state of this class generator. |
Methods inherited from class org.apache.cayenne.gen.ClassGenerationAction |
---|
addQueries, resetContextForArtifactTemplate, setQuerySuperTemplate, setQueryTemplate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SINGLE_CLASS_TEMPLATE
public static final String SUBCLASS_TEMPLATE
public static final String SUPERCLASS_TEMPLATE
protected DefaultClassGenerator generator
protected List<ObjEntity> entities
protected org.apache.commons.logging.Log logger
Constructor Detail |
---|
public ClassGenerationAction1_1()
Method Detail |
---|
public void addEmbeddables(Collection<Embeddable> embeddables)
addEmbeddables
in class ClassGenerationAction
public void addEntities(Collection<ObjEntity> entities)
ClassGenerationAction
addEntities
in class ClassGenerationAction
protected String customTemplateName(TemplateType type)
customTemplateName
in class ClassGenerationAction
protected String defaultTemplateName(TemplateType type)
defaultTemplateName
in class ClassGenerationAction
public void execute() throws Exception
ClassGenerationAction
execute
in class ClassGenerationAction
Exception
protected void execute(Artifact artifact) throws Exception
ClassGenerationAction
execute
in class ClassGenerationAction
Exception
protected File fileForClass() throws Exception
ClassGenerationAction
fileForClass
in class ClassGenerationAction
Exception
protected File fileForSuperclass() throws Exception
ClassGenerationAction
fileForSuperclass
in class ClassGenerationAction
Exception
protected String getSuperclassPrefix()
ClassGenerationAction
getSuperclassPrefix
in class ClassGenerationAction
protected org.apache.velocity.Template getTemplate(TemplateType type) throws Exception
getTemplate
in class ClassGenerationAction
Exception
protected void resetContextForArtifact(Artifact artifact)
ClassGenerationAction
resetContextForArtifact
in class ClassGenerationAction
protected boolean isOld(File file)
ClassGenerationAction
file
parameter is older than internal timestamp of
this class generator.
isOld
in class ClassGenerationAction
protected File mkpath(File dest, String pkgName) throws Exception
ClassGenerationAction
pkgName
package should reside. Creates any missing diectories below
dest
.
mkpath
in class ClassGenerationAction
Exception
protected Writer openWriter(TemplateType templateType) throws Exception
ClassGenerationAction
openWriter
in class ClassGenerationAction
Exception
public void setArtifactsGenerationMode(String mode)
setArtifactsGenerationMode
in class ClassGenerationAction
public void setContext(org.apache.velocity.VelocityContext context)
ClassGenerationAction
setContext
in class ClassGenerationAction
public void setDataMap(DataMap dataMap)
setDataMap
in class ClassGenerationAction
dataMap
- The dataMap to set.public void setDestDir(File destDir)
ClassGenerationAction
setDestDir
in class ClassGenerationAction
public void setEmbeddableSuperTemplate(String embeddableSuperTemplate)
setEmbeddableSuperTemplate
in class ClassGenerationAction
public void setEmbeddableTemplate(String embeddableTemplate)
setEmbeddableTemplate
in class ClassGenerationAction
public void setEncoding(String encoding)
ClassGenerationAction
setEncoding
in class ClassGenerationAction
public void setLogger(org.apache.commons.logging.Log logger)
ClassGenerationAction
setLogger
in class ClassGenerationAction
public void setMakePairs(boolean makePairs)
ClassGenerationAction
makepairs
property.
setMakePairs
in class ClassGenerationAction
public void setOutputPattern(String outputPattern)
ClassGenerationAction
outputPattern
property.
setOutputPattern
in class ClassGenerationAction
public void setOverwrite(boolean overwrite)
ClassGenerationAction
overwrite
property.
setOverwrite
in class ClassGenerationAction
public void setSuperPkg(String superPkg)
ClassGenerationAction
setSuperPkg
in class ClassGenerationAction
public void setSuperTemplate(String superTemplate)
ClassGenerationAction
superTemplate
property.
setSuperTemplate
in class ClassGenerationAction
public void setTemplate(String template)
ClassGenerationAction
template
property.
setTemplate
in class ClassGenerationAction
public void setTimestamp(long timestamp)
setTimestamp
in class ClassGenerationAction
public void setUsePkgPath(boolean usePkgPath)
ClassGenerationAction
usepkgpath
property.
setUsePkgPath
in class ClassGenerationAction
protected void validateAttributes()
ClassGenerationAction
validateAttributes
in class ClassGenerationAction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |