org.exolab.castor.persist

Class FieldMolder

public class FieldMolder extends Object

FieldMolder represents a field of a data object class. It is used by ClassMolder to set and get the value from a field of a data object.

Author: Thomas Yip

Nested Class Summary
static classFieldMolder.CollectionInfo
Field Summary
static shortMANY_TO_MANY
static shortONE_TO_MANY
static shortPERSISTANCECAPABLE
static shortPRIMITIVE
static shortSERIALIZABLE
Constructor Summary
FieldMolder(DatingService ds, ClassMolder eMold, FieldMapping fieldMap, String manyTable, String[] idSQL, int[] idType, TypeConvertor[] idTo, TypeConvertor[] idFrom, String[] idParam, String[] relatedIdSQL, int[] relatedIdType, TypeConvertor[] ridTo, TypeConvertor[] ridFrom, String[] ridParam)
Creates a single field descriptor.
FieldMolder(DatingService ds, ClassMolder eMold, FieldMapping fieldMap)
Method Summary
voidaddValue(Object object, Object value, ClassLoader loader)
ClassgetCollectionType()
protected ClassgetCollectionType(String coll, boolean lazy)
ClassMoldergetEnclosingClassMolder()
ClassMoldergetFieldClassMolder()
LockEnginegetFieldLockEngine()
shortgetFieldType()
StringgetName()
SQLRelationLoadergetRelationLoader()
ObjectgetValue(Object object, ClassLoader loader)
booleanisAddable()
booleanisCheckDirty()
booleanisDefault(Object value)
Check if the specified value is the default value of the Field represented by this FieldMolder
booleanisDependent()
booleanisLazy()
booleanisManyToMany()
booleanisMulti()
booleanisPersistanceCapable()
booleanisReadonly()
booleanisSerializable()
booleanisStored()
booleanisTransient()
voidsetFieldClassMolder(ClassMolder fMold)
voidsetValue(Object object, Object value, ClassLoader loader)
StringtoString()

Field Detail

MANY_TO_MANY

public static final short MANY_TO_MANY

ONE_TO_MANY

public static final short ONE_TO_MANY

PERSISTANCECAPABLE

public static final short PERSISTANCECAPABLE

PRIMITIVE

public static final short PRIMITIVE

SERIALIZABLE

public static final short SERIALIZABLE

Constructor Detail

FieldMolder

public FieldMolder(DatingService ds, ClassMolder eMold, FieldMapping fieldMap, String manyTable, String[] idSQL, int[] idType, TypeConvertor[] idTo, TypeConvertor[] idFrom, String[] idParam, String[] relatedIdSQL, int[] relatedIdType, TypeConvertor[] ridTo, TypeConvertor[] ridFrom, String[] ridParam)
Creates a single field descriptor. The field mapping is used to create a new stock FieldMolder. Implementations may extend this class to create a more suitable descriptor.

Parameters: eMold The ClassMolder to which the field belongs fieldMap The field mapping information

Throws: MappingException The field or its accessor methods are not found, not accessible, not of the specified type, etc

FieldMolder

public FieldMolder(DatingService ds, ClassMolder eMold, FieldMapping fieldMap)

Method Detail

addValue

public void addValue(Object object, Object value, ClassLoader loader)

getCollectionType

public Class getCollectionType()

getCollectionType

protected Class getCollectionType(String coll, boolean lazy)

getEnclosingClassMolder

public ClassMolder getEnclosingClassMolder()

getFieldClassMolder

public ClassMolder getFieldClassMolder()

getFieldLockEngine

public LockEngine getFieldLockEngine()

getFieldType

public short getFieldType()

getName

public String getName()

getRelationLoader

public SQLRelationLoader getRelationLoader()

getValue

public Object getValue(Object object, ClassLoader loader)

isAddable

public boolean isAddable()

isCheckDirty

public boolean isCheckDirty()

isDefault

public boolean isDefault(Object value)
Check if the specified value is the default value of the Field represented by this FieldMolder

isDependent

public boolean isDependent()

isLazy

public boolean isLazy()

isManyToMany

public boolean isManyToMany()

isMulti

public boolean isMulti()

isPersistanceCapable

public boolean isPersistanceCapable()

isReadonly

public boolean isReadonly()

isSerializable

public boolean isSerializable()

isStored

public boolean isStored()

isTransient

public boolean isTransient()

setFieldClassMolder

void setFieldClassMolder(ClassMolder fMold)

setValue

public void setValue(Object object, Object value, ClassLoader loader)

toString

public String toString()
Intalio Inc. (C) 1999-2004. All rights reserved http://www.intalio.com