Save This Page
Home » apache-openjpa-1.1.0-source » org.apache.openjpa » meta » [javadoc | source]
org.apache.openjpa.meta
public class: FieldMetaData [javadoc | source]
java.lang.Object
   org.apache.openjpa.meta.Extensions
      org.apache.openjpa.meta.FieldMetaData

All Implemented Interfaces:
    Commentable, ValueMetaData, MetaDataModes, MetaDataContext, Serializable

Direct Known Subclasses:
    FieldMapping

Metadata for a managed class field.
Nested Class Summary:
public static class  FieldMetaData.MemberProvider  Serializable wrapper around a {@link Method} or {@link Field}. For space considerations, this does not support {@link Constructor}s. 
Field Summary
public static final  int NULL_UNSET    Constant specifying that no null-value was given. 
public static final  int NULL_NONE    Constant specifying to use a datastore null to persist null values in object fields. 
public static final  int NULL_DEFAULT    Constant specifying to use a datastore default value to persist null values in object fields. 
public static final  int NULL_EXCEPTION    Constant specifying to throw an exception when attempting to persist null values in object fields. 
public static final  int MANAGE_PERSISTENT    Constant specifying the management level of a field. 
public static final  int MANAGE_TRANSACTIONAL    Constant specifying the management level of a field. 
public static final  int MANAGE_NONE    Constant specifying the management level of a field. 
Fields inherited from org.apache.openjpa.meta.Extensions:
OPENJPA
Constructor:
 protected FieldMetaData(String name,
    Class type,
    ClassMetaData owner) 
    Constructor.
    Parameters:
    name - the field name
    type - the field type
    owner - the owning class metadata
Method from org.apache.openjpa.meta.FieldMetaData Summary:
addEmbeddedMetaData,   addExtensionKeys,   backingMember,   compareTo,   copy,   copy,   equals,   getBackingMember,   getCascadeAttach,   getCascadeDelete,   getCascadePersist,   getCascadeRefresh,   getComments,   getCustomFetchGroups,   getDeclaredIndex,   getDeclaredType,   getDeclaredTypeCode,   getDeclaredTypeMetaData,   getDeclaringMetaData,   getDeclaringType,   getDefiningMetaData,   getElement,   getEmbeddedMetaData,   getExternalValue,   getExternalValueMap,   getExternalValues,   getExternalizer,   getExternalizerMethod,   getFactory,   getFactoryMethod,   getFieldMetaData,   getFieldValue,   getFieldValueMap,   getFullName,   getFullName,   getIndex,   getInitializer,   getInverse,   getInverseMetaDatas,   getKey,   getListingIndex,   getLoadFetchGroup,   getManagement,   getMappedBy,   getMappedByMetaData,   getName,   getNullValue,   getObjectIdFieldType,   getObjectIdFieldTypeCode,   getOrderDeclaration,   getOrders,   getPrimaryKeyIndex,   getProxyType,   getRepository,   getResolve,   getType,   getTypeCode,   getTypeMetaData,   getTypeOverride,   getUpdateStrategy,   getValue,   getValueMappedBy,   getValueMappedByMetaData,   getValueSequenceMetaData,   getValueSequenceName,   getValueStrategy,   hashCode,   isDeclaredTypePC,   isDefaultFetchGroupExplicit,   isEmbedded,   isEmbeddedPC,   isExplicit,   isExternalized,   isInDefaultFetchGroup,   isInFetchGroup,   isLRS,   isMapped,   isPrimaryKey,   isSerialized,   isStream,   isTransient,   isTypePC,   isUsedInOrderBy,   isValueGenerated,   isVersion,   order,   resolve,   setCascadeAttach,   setCascadeDelete,   setCascadePersist,   setCascadeRefresh,   setComments,   setDeclaredIndex,   setDeclaredType,   setDeclaredTypeCode,   setDeclaringType,   setDefaultFetchGroupExplicit,   setEmbedded,   setExplicit,   setExternalValues,   setExternalizer,   setFactory,   setInDefaultFetchGroup,   setInFetchGroup,   setIndex,   setInitializer,   setInverse,   setLRS,   setListingIndex,   setLoadFetchGroup,   setManagement,   setMappedBy,   setNullValue,   setOrderDeclaration,   setOrders,   setPrimaryKey,   setPrimaryKeyIndex,   setProxyType,   setResolve,   setResolve,   setSerialized,   setStream,   setTransient,   setType,   setTypeCode,   setTypeOverride,   setUpdateStrategy,   setUsedInOrderBy,   setUsesImplData,   setUsesIntermediate,   setValueGenerated,   setValueMappedBy,   setValueSequenceName,   setValueStrategy,   setVersion,   toString,   usesImplData,   usesIntermediate
Methods from org.apache.openjpa.meta.Extensions:
addExtension,   addExtension,   addExtensionKeys,   copy,   getBooleanExtension,   getBooleanExtension,   getDoubleExtension,   getDoubleExtension,   getEmbeddedExtensions,   getEmbeddedExtensions,   getExtensionKeys,   getExtensionKeys,   getExtensionVendors,   getIntExtension,   getIntExtension,   getObjectExtension,   getObjectExtension,   getRepository,   getStringExtension,   getStringExtension,   hasExtension,   hasExtension,   isEmpty,   removeEmbeddedExtensions,   removeEmbeddedExtensions,   removeExtension,   removeExtension,   validateDataStoreExtensionPrefix,   validateExtensionKeys
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.openjpa.meta.FieldMetaData Detail:
 public ClassMetaData addEmbeddedMetaData() 
 protected  void addExtensionKeys(Collection exts) 
 public  void backingMember(Member member) 
    Supply the backing member object; this allows us to utilize parameterized type information if available.
 public int compareTo(Object other) 
 public  void copy(FieldMetaData field) 
    Copy state from the given field to this one. Do not copy mapping information.
 public  void copy(ValueMetaData vmd) 
 public boolean equals(Object other) 
 public Member getBackingMember() 
 public int getCascadeAttach() 
 public int getCascadeDelete() 
 public int getCascadePersist() 
 public int getCascadeRefresh() 
 public String[] getComments() 
 public String[] getCustomFetchGroups() 
    Gets the name of the custom fetch groups those are associated to this receiver. This does not include the "default" and "all" fetch groups.
 public int getDeclaredIndex() 
    The relative index of this persistent/transactional field.
 public Class getDeclaredType() 
 public int getDeclaredTypeCode() 
 public ClassMetaData getDeclaredTypeMetaData() 
 public ClassMetaData getDeclaringMetaData() 
    The declaring class.
 public Class getDeclaringType() 
    The declaring class.
 public ClassMetaData getDefiningMetaData() 
    The class that defines the metadata for this field.
 public ValueMetaData getElement() 
    Metadata about the element value.
 public ClassMetaData getEmbeddedMetaData() 
 public Object getExternalValue(Object val,
    StoreContext ctx) 
    Convert the given field value to its external value through the provided externalizer, or return the value as-is if no externalizer.
 public Map getExternalValueMap() 
    Return the mapping of field values to external values.
 public String getExternalValues() 
    Properties string mapping field values to external values.
 public String getExternalizer() 
    The name of this field's externalizer, or null if none.
 public Method getExternalizerMethod() 
    The externalizer method.
 public String getFactory() 
    The name of this field's factory, or null if none.
 public Member getFactoryMethod() 
    The factory method or constructor.
 public FieldMetaData getFieldMetaData() 
 public Object getFieldValue(Object val,
    StoreContext ctx) 
    Return the result of passing the given external value through the factory to get the field value. If no factory is present, the given value is returned as-is.
 public Map getFieldValueMap() 
    Return the mapping of external values to field values.
 public String getFullName() 
Deprecated! Use - getFullName(boolean) instead.

    The field name, qualified by the owning class.
 public String getFullName(boolean embedOwner) 
    The field name, qualified by the owning class and optionally the embedding owner's name (if any).
 public int getIndex() 
    The absolute index of this persistent/transactional field.
 public Object getInitializer() 
    The initializer used by the field, or null if none. This is additional information for initializing the field, such as a custom Comparator used by a Set or a TimeZone used by a Calendar .
 public String getInverse() 
    Logical inverse field.
 public FieldMetaData[] getInverseMetaDatas() 
    Return all inverses of this field.
 public ValueMetaData getKey() 
    Metadata about the key value.
 public int getListingIndex() 
    The index in which this field was listed in the metadata. Defaults to -1 if this field was not listed in the metadata.
 public String getLoadFetchGroup() 
    The fetch group that is to be loaded when this receiver is loaded, or null if none set.
 public int getManagement() 
 public String getMappedBy() 
    The field that this field shares a mapping with.
 public FieldMetaData getMappedByMetaData() 
    The field that this field shares a mapping with.
 public String getName() 
    The field name.
 public int getNullValue() 
    How the data store should treat null values for this field: Defaults to #NULL_UNSET .
 public Class getObjectIdFieldType() 
    For a primary key field, return the type of the corresponding object id class field.
 public int getObjectIdFieldTypeCode() 
    For a primary key field, return the type of the corresponding object id class field.
 public String getOrderDeclaration() 
    String declaring the orderings for this field to be applied on load, or null. The string is of the form:
    orderable[ asc|desc][, ...]
    The orderable #element is used to denote the value of the field's elements.
 public Order[] getOrders() 
    The orderings for this field to be applied on load, or empty array.
 public int getPrimaryKeyIndex() 
    The absolute primary key index for this field, or -1 if not a primary key. The first primary key field has index 0, the second index 1, etc.
 public Class getProxyType() 
    The type this field was initialized with, and therefore the type to use for proxies when loading data into this field.
 public MetaDataRepository getRepository() 
    The metadata repository.
 public int getResolve() 
    Resolve mode for this field.
 public Class getType() 
 public int getTypeCode() 
 public ClassMetaData getTypeMetaData() 
 public Class getTypeOverride() 
 public int getUpdateStrategy() 
    The strategy to use when updating the field.
 public ValueMetaData getValue() 
    MetaData about the field value.
 public String getValueMappedBy() 
 public FieldMetaData getValueMappedByMetaData() 
 public SequenceMetaData getValueSequenceMetaData() 
    Metadata for the value sequence.
 public String getValueSequenceName() 
    The value sequence name, or null for none.
 public int getValueStrategy() 
    The strategy to use for insert value generation. One of the constants from ValueStrategies .
 public int hashCode() 
 public boolean isDeclaredTypePC() 
 public boolean isDefaultFetchGroupExplicit() 
    Whether the default fetch group setting is explicit.
 public boolean isEmbedded() 
 public boolean isEmbeddedPC() 
 public boolean isExplicit() 
    Whether this field is explicitly declared in the metadata.
 public boolean isExternalized() 
    Whether the field is externalized.
 public boolean isInDefaultFetchGroup() 
    Whether this field is in the default fetch group.
 public boolean isInFetchGroup(String fg) 
    Whether this field is in the given fetch group.
 public boolean isLRS() 
    Whether this field is backed by a large result set.
 public boolean isMapped() 
    Return whether this field is mapped to the datastore. By default, returns true for all persistent fields whose defining class is mapped.
 public boolean isPrimaryKey() 
    Whether this is a primary key field.
 public boolean isSerialized() 
 public boolean isStream() 
    Whether this field is backed by a stream.
 public boolean isTransient() 
    Return whether this is a transient field.
 public boolean isTypePC() 
 public boolean isUsedInOrderBy() 
    Check if this field is used by other field as "order by" value.
 public boolean isValueGenerated() 
 public boolean isVersion() 
    Whether this field holds optimistic version information.
 public Object order(Object val) 
    Order this field value when it is loaded.
 public boolean resolve(int mode) 
    Resolve and validate metadata. Return true if already resolved.
 public  void setCascadeAttach(int attach) 
 public  void setCascadeDelete(int delete) 
 public  void setCascadePersist(int persist) 
 public  void setCascadeRefresh(int refresh) 
 public  void setComments(String[] comments) 
 public  void setDeclaredIndex(int index) 
    The relative index of this persistent/transactional field.
 public  void setDeclaredType(Class type) 
 public  void setDeclaredTypeCode(int type) 
 public  void setDeclaringType(Class cls) 
    The declaring class.
 public  void setDefaultFetchGroupExplicit(boolean explicit) 
    Whether the default fetch group setting is explicit. Allow setting for testing.
 public  void setEmbedded(boolean embedded) 
 public  void setExplicit(boolean explicit) 
    Whether this field is explicitly declared in the metadata.
 public  void setExternalValues(String values) 
    Properties string mapping field values to external values.
 public  void setExternalizer(String externalizer) 
    The name of this field's externalizer, or null if none.
 public  void setFactory(String factory) 
    The name of this field's factory, or null if none.
 public  void setInDefaultFetchGroup(boolean dfg) 
    Whether this field is in the default fetch group.
 public  void setInFetchGroup(String fg,
    boolean in) 
    Set whether this field is in the given fetch group.
 public  void setIndex(int index) 
    The absolute index of this persistent/transactional field.
 public  void setInitializer(Object initializer) 
    The initializer used by the field, or null if none. This is additional information for initializing the field, such as a custom Comparator used by a Set or a TimeZone used by a Calendar .
 public  void setInverse(String inverse) 
    Logical inverse field.
 public  void setLRS(boolean lrs) 
    Whether this field is backed by a large result set.
 public  void setListingIndex(int index) 
    The index in which this field was listed in the metadata. Defaults to -1 if this field was not listed in the metadata.
 public  void setLoadFetchGroup(String lfg) 
    The fetch group that is to be loaded when this receiver is loaded, or null if none set.
 public  void setManagement(int manage) 
 public  void setMappedBy(String mapped) 
    The field that this field shares a mapping with.
 public  void setNullValue(int nullValue) 
    How the data store should treat null values for this field: Defaults to #NULL_UNSET .
 public  void setOrderDeclaration(String dec) 
    String declaring the orderings for this field to be applied on load, or null. The string is of the form:
    orderable[ asc|desc][, ...]
    The orderable #element is used to denote the value of the field's elements.
 public  void setOrders(Order[] orders) 
    The orderings for this field to be applied on load.
 public  void setPrimaryKey(boolean primKey) 
    Whether this is a primary key field.
 public  void setPrimaryKeyIndex(int index) 
    The absolute primary key index for this field, or -1 if not a primary key. The first primary key field has index 0, the second index 1, etc.
 public  void setProxyType(Class type) 
    The type this field was initialized with, and therefore the type to use for proxies when loading data into this field.
 public  void setResolve(int mode) 
    Resolve mode for this field.
 public  void setResolve(int mode,
    boolean on) 
    Resolve mode for this field.
 public  void setSerialized(boolean serialized) 
 public  void setStream(boolean stream) 
    Whether this field is backed by a stream.
 public  void setTransient(boolean trans) 
    Return whether this is a transient field.
 public  void setType(Class type) 
 public  void setTypeCode(int code) 
 public  void setTypeOverride(Class type) 
 public  void setUpdateStrategy(int strategy) 
    Set the update strategy.
 public  void setUsedInOrderBy(boolean isUsed) 
    Whether this field is used by other field as "order by" value .
 public  void setUsesImplData(Boolean implData) 
    Whether this field uses impl data in conjunction with standard field data when acting on a OpenJPAStateManager .
 public  void setUsesIntermediate(boolean intermediate) 
    Whether this field uses intermediate data when loading/storing information through a OpenJPAStateManager . Defaults to true.
 public  void setValueGenerated(boolean generated) 
 public  void setValueMappedBy(String mapped) 
 public  void setValueSequenceName(String seqName) 
    The value sequence name, or null for none.
 public  void setValueStrategy(int strategy) 
    The strategy to use for insert value generation. One of the constants from ValueStrategies .
 public  void setVersion(boolean version) 
    Whether this field holds optimistic version information.
 public String toString() 
 public Boolean usesImplData() 
    Whether this field uses impl data in conjunction with standard field data when acting on a OpenJPAStateManager . Defaults to Boolean#TRUE (non-cachable impl data).
 public boolean usesIntermediate() 
    Whether this field uses intermediate data when loading/storing information through a OpenJPAStateManager . Defaults to true.