|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.gen.ClassGenerationInfo
public class ClassGenerationInfo
Class generation engine for ObjEntities based on Velocity templates . Instance of ClassGenerationInfo is available inside Velocity template under the key "classGen".
Field Summary | |
---|---|
protected String |
className
|
protected ObjEntity |
entity
|
protected String |
packageName
|
protected String |
prop
|
protected String |
superClassName
|
protected String |
superPackageName
|
protected String |
superPrefix
|
Constructor Summary | |
---|---|
ClassGenerationInfo()
|
Method Summary | |
---|---|
String |
capitalized(String name)
Capitalizes the first letter of the property name. |
String |
capitalizedAsConstant(String name)
Converts property name to Java constants naming convention. |
String |
formatJavaType(String type)
|
String |
formatVariableName(String variableName)
|
String |
getCappedProp()
Returns current property name with capitalized first letter |
String |
getClassName()
Returns class name (without a package) of the class associated with this generator. |
ObjEntity |
getEntity()
Returns entity for the class associated with this generator. |
String |
getPackageName()
Returns Java package name of the class associated with this generator. |
String |
getProp()
|
String |
getPropAsConstantName()
|
String |
getSuperClassName()
Returns the fully qualified super class of the data object class associated with this generator |
String |
getSuperPackageName()
Returns superPackageName property that defines a
superclass's package name. |
String |
getSuperPrefix()
Returns prefix used to distinguish between superclass and subclass when generating classes in pairs. |
boolean |
isContainingDeclaredListProperties()
Returns true if current entity contains at least one Declared List property. |
boolean |
isContainingListProperties()
Returns true if current entity contains at least one List property. |
boolean |
isUsingPackage()
Returns true if a class associated with this generator is
located in a package. |
boolean |
isUsingSuperPackage()
Returns true if a superclass class associated with this
generator is located in a package. |
protected void |
setClassName(String className)
Sets class name of the class associated with this generator. |
protected void |
setObjEntity(ObjEntity entity)
|
protected void |
setPackageName(String packageName)
Sets Java package name of the class associated with this generator. |
void |
setProp(String prop)
Sets current class property name. |
protected void |
setSuperClassName(String value)
Sets the fully qualified super class of the data object class associated with this generator |
protected void |
setSuperPackageName(String superPackageName)
Sets superPackageName property that defines a superclass's
package name. |
protected void |
setSuperPrefix(String superPrefix)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ObjEntity entity
protected String packageName
protected String className
protected String superPrefix
protected String prop
protected String superPackageName
protected String superClassName
Constructor Detail |
---|
public ClassGenerationInfo()
Method Detail |
---|
public String getPackageName()
protected void setPackageName(String packageName)
public String getSuperPackageName()
superPackageName
property that defines a
superclass's package name.
protected void setSuperPackageName(String superPackageName)
superPackageName
property that defines a superclass's
package name.
public String getClassName()
protected void setClassName(String className)
protected void setSuperPrefix(String superPrefix)
public String formatJavaType(String type)
public String formatVariableName(String variableName)
public String getSuperPrefix()
public void setProp(String prop)
public String getProp()
public String capitalized(String name)
public String capitalizedAsConstant(String name)
public String getCappedProp()
public String getPropAsConstantName()
public boolean isContainingDeclaredListProperties()
public boolean isContainingListProperties()
public boolean isUsingPackage()
true
if a class associated with this generator is
located in a package.
public boolean isUsingSuperPackage()
true
if a superclass class associated with this
generator is located in a package.
public ObjEntity getEntity()
protected void setObjEntity(ObjEntity entity)
entity
- The entity to set.public String getSuperClassName()
protected void setSuperClassName(String value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |