org.objectweb.jonas_ejb.genic
Class VcField
java.lang.Object
org.objectweb.jonas_ejb.genic.VcField
public class VcField
- extends java.lang.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
Constructor Summary |
VcField(java.lang.String mName,
java.lang.Class fType,
FieldDesc fd,
boolean isCmp1)
VcField constructor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
VcField
public VcField(java.lang.String mName,
java.lang.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 java.lang.String getName()
- Returns:
- the name of the cmp field
getNameUpperFirst
public java.lang.String getNameUpperFirst()
- Returns:
- the name, with the first letter capitalized, of the cmp field
jormGetter
public java.lang.String jormGetter()
jormSetter
public java.lang.String jormSetter()
getGetterName
public java.lang.String getGetterName()
- Returns:
- the name of the getter method of the cmp field
getSetterName
public java.lang.String getSetterName()
- Returns:
- the name of the setter method of the cmp field
getTypeName
public java.lang.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 java.lang.String getDefaultValue()
- Returns:
- the string representation of the java default value for the cmp field (ie "0 "for int, "null" for object ...)
getSqlTypeName
public java.lang.String getSqlTypeName()
- Returns:
- the SQL type name of the cmp field
getSqlGetMethod
public java.lang.String getSqlGetMethod()
- Returns:
- the SQL getter method name for the cmp field
getSqlSetMethod
public java.lang.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 java.lang.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 java.lang.String getConvertClassName()
- Returns:
- the class name of for the convertion between the memory representation and the storage representation for the cmp field
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- Returns:
- a string representation of the VcField for debug use