org.ow2.jonas.generators.genic
Class VcField
java.lang.Object
org.ow2.jonas.generators.genic.VcField
public class VcField
- extends Object
This class is the "Velocity context" for a container managed persistence bean's field
used in the Velocity Template.
- Author:
- Helene Joanin : Initial developer
VcField
public VcField(String mName,
Class fType,
FieldDesc fd,
boolean isCmp1)
- VcField constructor
- Parameters:
mName
- name of the cmp fieldfType
- type of the cmp fieldfd
- field descriptor of the cmp fieldisCmp1
- true if it's a cmp version 1 field, false if it's a cmp version 2 field.
getName
public String getName()
- Returns:
- the name of the cmp field
getNameUpperFirst
public String getNameUpperFirst()
- Returns:
- the name, with the first letter capitalized, of the cmp field
jormGetter
public String jormGetter()
jormSetter
public String jormSetter()
getGetterName
public String getGetterName()
- Returns:
- the name of the getter method of the cmp field
getSetterName
public String getSetterName()
- Returns:
- the name of the setter method of the cmp field
getTypeName
public String getTypeName()
- Returns:
- the type name of the cmp field
isPrimaryKey
public boolean isPrimaryKey()
- Returns:
- true if the cmp field composes the primary key
getDefaultValue
public String getDefaultValue()
- Returns:
- the string representation of the java default value for the cmp field (ie "0 "for int, "null" for object ...)
getSqlTypeName
public String getSqlTypeName()
- Returns:
- the SQL type name of the cmp field
getSqlGetMethod
public String getSqlGetMethod()
- Returns:
- the SQL getter method name for the cmp field
getSqlSetMethod
public String getSqlSetMethod()
- Returns:
- the SQL setter method name for the cmp field
hasNotPrimitiveType
public boolean hasNotPrimitiveType()
- Returns:
- true if the type of the cmp field is not a java primitive type
hasBigIntegerType
public boolean hasBigIntegerType()
- Returns:
- true if the type of the cmp field is java.math.BigInteger
hasSerializableType
public boolean hasSerializableType()
- Returns:
- true of the type of the cmp field is Serializable
hasJavaLangTypeExceptString
public boolean hasJavaLangTypeExceptString()
- Returns:
- true if the type of the cmp type is a java.lag type except java.lang.String
getJormTypeName
public String getJormTypeName()
- Returns:
- the JORM type name of the cmp field
isMustBeConvert
public boolean isMustBeConvert()
- Returns:
- true if a conversion must be dome between the memory representation and the storage representation for the cmp field
getConvertClassName
public String getConvertClassName()
- Returns:
- the class name of for the convertion between the memory representation and the storage representation for the cmp field
toString
public String toString()
- Overrides:
toString
in class Object
- Returns:
- a string representation of the VcField for debug use
Copyright © 2010 OW2 Consortium. All Rights Reserved.