Class FieldMolder

java.lang.Object
org.exolab.castor.persist.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
  • Constructor Details

  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getName

      public String getName()
    • getComparator

      public String getComparator()
      Returns the java.util.Comparator instance to be used with SortedSets; null, if not specified.
      Returns:
      the java.util.Comparator instance to be used with SortedSets
    • getFieldPertsistenceType

      public FieldPersistenceType getFieldPertsistenceType()
    • getRelationLoader

      public SQLRelationLoader getRelationLoader()
    • isStored

      public boolean isStored()
    • isManyToMany

      public boolean isManyToMany()
    • isDependent

      public boolean isDependent()
    • isMulti

      public boolean isMulti()
    • isPersistanceCapable

      public boolean isPersistanceCapable()
    • isSerializable

      public boolean isSerializable()
    • isCheckDirty

      public boolean isCheckDirty()
    • isLazy

      public boolean isLazy()
    • isAddable

      public boolean isAddable()
    • isTransient

      public boolean isTransient()
    • setFieldClassMolder

      void setFieldClassMolder(ClassMolder fMold)
    • getEnclosingClassMolder

      public ClassMolder getEnclosingClassMolder()
    • getFieldClassMolder

      public ClassMolder getFieldClassMolder()
    • getFieldLockEngine

      public LockEngine getFieldLockEngine()
    • isReadonly

      public boolean isReadonly()
    • getCollectionType

      public Class<?> getCollectionType()
    • getCascading

      public EnumSet<CascadingType> getCascading()
      Returns the 'cascading operations' defined for this field.
      Returns:
      the 'cascading operations' defined.
    • getValue

      public Object getValue(Object object, ClassLoader loader)
    • addValue

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

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

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

      protected Class<?> getCollectionType(String coll, boolean lazy)
    • findAccessor

      public static final Method findAccessor(Class<?> javaClass, String methodName, Class<?> fieldType, boolean getMethod) throws MappingException
      Returns the named accessor. Uses reflection to return the named accessor and check the return value or parameter type, if specified.
      Parameters:
      javaClass - The class to which the field belongs.
      methodName - The name of the accessor method.
      fieldType - The type of the field if known, or null.
      getMethod - True if get method, false if set method.
      Returns:
      The method, null if not found.
      Throws:
      MappingException - The method is not accessible or is not of the specified type.