|
||||||||||
| 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 ClassGenerationActionpublic void addEntities(Collection<ObjEntity> entities)
ClassGenerationAction
addEntities in class ClassGenerationActionprotected String customTemplateName(TemplateType type)
customTemplateName in class ClassGenerationActionprotected String defaultTemplateName(TemplateType type)
defaultTemplateName in class ClassGenerationAction
public void execute()
throws Exception
ClassGenerationAction
execute in class ClassGenerationActionException
protected void execute(Artifact artifact)
throws Exception
ClassGenerationAction
execute in class ClassGenerationActionException
protected File fileForClass()
throws Exception
ClassGenerationAction
fileForClass in class ClassGenerationActionException
protected File fileForSuperclass()
throws Exception
ClassGenerationAction
fileForSuperclass in class ClassGenerationActionExceptionprotected String getSuperclassPrefix()
ClassGenerationAction
getSuperclassPrefix in class ClassGenerationAction
protected org.apache.velocity.Template getTemplate(TemplateType type)
throws Exception
getTemplate in class ClassGenerationActionExceptionprotected void resetContextForArtifact(Artifact artifact)
ClassGenerationAction
resetContextForArtifact in class ClassGenerationActionprotected boolean isOld(File file)
ClassGenerationActionfile parameter is older than internal timestamp of
this class generator.
isOld in class ClassGenerationAction
protected File mkpath(File dest,
String pkgName)
throws Exception
ClassGenerationActionpkgName package should reside. Creates any missing diectories below
dest.
mkpath in class ClassGenerationActionException
protected Writer openWriter(TemplateType templateType)
throws Exception
ClassGenerationAction
openWriter in class ClassGenerationActionExceptionpublic void setArtifactsGenerationMode(String mode)
setArtifactsGenerationMode in class ClassGenerationActionpublic void setContext(org.apache.velocity.VelocityContext context)
ClassGenerationAction
setContext in class ClassGenerationActionpublic void setDataMap(DataMap dataMap)
setDataMap in class ClassGenerationActiondataMap - The dataMap to set.public void setDestDir(File destDir)
ClassGenerationAction
setDestDir in class ClassGenerationActionpublic void setEmbeddableSuperTemplate(String embeddableSuperTemplate)
setEmbeddableSuperTemplate in class ClassGenerationActionpublic void setEmbeddableTemplate(String embeddableTemplate)
setEmbeddableTemplate in class ClassGenerationActionpublic void setEncoding(String encoding)
ClassGenerationAction
setEncoding in class ClassGenerationActionpublic void setLogger(org.apache.commons.logging.Log logger)
ClassGenerationAction
setLogger in class ClassGenerationActionpublic void setMakePairs(boolean makePairs)
ClassGenerationActionmakepairs property.
setMakePairs in class ClassGenerationActionpublic void setOutputPattern(String outputPattern)
ClassGenerationActionoutputPattern property.
setOutputPattern in class ClassGenerationActionpublic void setOverwrite(boolean overwrite)
ClassGenerationActionoverwrite property.
setOverwrite in class ClassGenerationActionpublic void setSuperPkg(String superPkg)
ClassGenerationAction
setSuperPkg in class ClassGenerationActionpublic void setSuperTemplate(String superTemplate)
ClassGenerationActionsuperTemplate property.
setSuperTemplate in class ClassGenerationActionpublic void setTemplate(String template)
ClassGenerationActiontemplate property.
setTemplate in class ClassGenerationActionpublic void setTimestamp(long timestamp)
setTimestamp in class ClassGenerationActionpublic void setUsePkgPath(boolean usePkgPath)
ClassGenerationActionusepkgpath property.
setUsePkgPath in class ClassGenerationActionprotected void validateAttributes()
ClassGenerationAction
validateAttributes in class ClassGenerationAction
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||