Package org.datanucleus.metadata
Class FieldMetaData
- java.lang.Object
-
- org.datanucleus.metadata.MetaData
-
- org.datanucleus.metadata.AbstractMemberMetaData
-
- org.datanucleus.metadata.FieldMetaData
-
- All Implemented Interfaces:
Serializable
,Comparable
,ColumnMetaDataContainer
public class FieldMetaData extends AbstractMemberMetaData
Representation of the Meta-Data for a field of a class.Lifecycle state
An object of this type has 2 lifecycle states. The first is the raw constructed object which represents pure MetaData (maybe from a MetaData file). The second is a "populated" object which represents MetaData for a Field of a class with the metadata aligned to be appropriate for that Field.Containers
Each field can represent a container. The container can be an array, a Collection or a Map. The field type must be of the correct type to represent these.Field Management
Each field can be managed by us or not. The class provides a method for identifying if a field is managed by us (isJdoField()). If a field is managed by us, it will have a field "id" (within its class). In a class the field "id" will start at 0 (for the first field, in alphabetical order).- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.datanucleus.metadata.AbstractMemberMetaData
cacheable, cascadeAttach, cascadeDelete, cascadeDetach, cascadePersist, cascadeRefresh, cascadeRemoveOrphans, catalog, className, column, columnMetaData, columns, containerMetaData, defaultFetchGroup, dependent, elementMetaData, embedded, embeddedMetaData, EXTENSION_MEMBER_FETCH_FK_ONLY, fieldId, foreignKeyMetaData, fullFieldName, indexed, indexMetaData, joinMetaData, keyMetaData, loadFetchGroup, mappedBy, mapsIdAttribute, memberRepresented, name, nullValue, ordered, orderMetaData, PERSIST_FINAL, PERSIST_STATIC, PERSIST_TRANSIENT, persistenceFlags, persistenceModifier, primaryKey, recursionDepth, relatedMemberMetaData, relationType, relationTypeString, schema, sequence, serialized, storeInLob, table, targetClassName, type, uniqueConstraint, uniqueMetaData, valueGeneratorName, valueMetaData, valueStrategy
-
Fields inherited from class org.datanucleus.metadata.MetaData
EXTENSION_CLASS_CREATETIMESTAMP, EXTENSION_CLASS_CREATETIMESTAMP_COLUMN_NAME, EXTENSION_CLASS_CREATEUSER, EXTENSION_CLASS_CREATEUSER_COLUMN_LENGTH, EXTENSION_CLASS_CREATEUSER_COLUMN_NAME, EXTENSION_CLASS_MULTITENANCY_COLUMN_LENGTH, EXTENSION_CLASS_MULTITENANCY_COLUMN_NAME, EXTENSION_CLASS_MULTITENANCY_JDBC_TYPE, EXTENSION_CLASS_MULTITENANT, EXTENSION_CLASS_READ_ONLY, EXTENSION_CLASS_SOFTDELETE, EXTENSION_CLASS_SOFTDELETE_COLUMN_NAME, EXTENSION_CLASS_UPDATETIMESTAMP, EXTENSION_CLASS_UPDATETIMESTAMP_COLUMN_NAME, EXTENSION_CLASS_UPDATEUSER, EXTENSION_CLASS_UPDATEUSER_COLUMN_LENGTH, EXTENSION_CLASS_UPDATEUSER_COLUMN_NAME, EXTENSION_CLASS_VERSION_FIELD_NAME, EXTENSION_CLASS_VIEW_DEFINITION, EXTENSION_CLASS_VIEW_IMPORTS, EXTENSION_INDEX_COLUMN_ORDERING, EXTENSION_MEMBER_CACHEABLE, EXTENSION_MEMBER_CALENDAR_ONE_COLUMN, EXTENSION_MEMBER_CASCADE_ATTACH, EXTENSION_MEMBER_CASCADE_DETACH, EXTENSION_MEMBER_CASCADE_PERSIST, EXTENSION_MEMBER_CASCADE_REFRESH, EXTENSION_MEMBER_COMPARATOR_NAME, EXTENSION_MEMBER_CONTAINER_ALLOW_NULLS, EXTENSION_MEMBER_CREATE_TIMESTAMP, EXTENSION_MEMBER_CREATE_USER, EXTENSION_MEMBER_ENUM_VALUE_GETTER, EXTENSION_MEMBER_IMPLEMENTATION_CLASSES, EXTENSION_MEMBER_INSERTABLE, EXTENSION_MEMBER_KEY_IMPLEMENTATION_CLASSES, EXTENSION_MEMBER_LIST_ORDERING, EXTENSION_MEMBER_RELATION_DISCRIM_COLUMN, EXTENSION_MEMBER_RELATION_DISCRIM_PK, EXTENSION_MEMBER_RELATION_DISCRIM_VALUE, EXTENSION_MEMBER_STRATEGY_WHEN_NOTNULL, EXTENSION_MEMBER_TYPE_CONVERTER_DISABLED, EXTENSION_MEMBER_TYPE_CONVERTER_NAME, EXTENSION_MEMBER_UPDATE_TIMESTAMP, EXTENSION_MEMBER_UPDATE_USER, EXTENSION_MEMBER_UPDATEABLE, EXTENSION_MEMBER_VALUE_IMPLEMENTATION_CLASSES, EXTENSION_VERSION_NUMBER_INITIAL_VALUE, extensions, metaDataState, parent, VENDOR_NAME
-
-
Constructor Summary
Constructors Constructor Description FieldMetaData(MetaData parent, String name)
Constructor.FieldMetaData(MetaData parent, AbstractMemberMetaData fmd)
Convenience constructor to copy the specification from the passed field.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
toString()
-
Methods inherited from class org.datanucleus.metadata.AbstractMemberMetaData
addColumn, addExtension, addExtensions, calcIsSecondClassMutable, clearColumns, compareTo, fieldBelongsToClass, getAbsoluteFieldNumber, getAbstractClassMetaData, getArray, getCatalog, getClassName, getClassName, getCollection, getColumnMetaData, getContainer, getDefaultFieldPersistenceModifier, getElementMetaData, getEmbeddedMetaData, getFieldId, getFieldTypes, getForeignKeyMetaData, getFullFieldName, getIndexed, getIndexMetaData, getJoinMetaData, getKeyMetaData, getLoadFetchGroup, getMap, getMappedBy, getMapsIdAttribute, getMemberRepresented, getName, getNullValue, getOrderMetaData, getOverallParentClassMetaData, getPackageName, getPersistenceFlags, getPersistenceModifier, getRecursionDepth, getRelatedMemberMetaData, getRelatedMemberMetaDataForObject, getRelationType, getRelationTypeString, getSchema, getSequence, getTable, getTargetClassName, getType, getTypeConverterName, getTypeName, getUniqueMetaData, getValueGeneratorName, getValueMetaData, getValueStrategy, hasArray, hasCollection, hasContainer, hasMap, initialise, isAbstract, isCacheable, isCascadeAttach, isCascadeDelete, isCascadeDetach, isCascadePersist, isCascadeRefresh, isCascadeRemoveOrphans, isCreateTimestamp, isCreateUser, isDefaultFetchGroup, isDependent, isEmbedded, isFieldArrayTypePersistable, isFieldToBePersisted, isFinal, isInsertable, isOrdered, isPersistentInterface, isPrimaryKey, isPrivate, isProtected, isPublic, isRelationOwner, isSerialized, isSingleCollection, isStatic, isTransient, isTypeConversionDisabled, isUnique, isUpdateable, isUpdateTimestamp, isUpdateUser, newArrayMetaData, newCollectionMetaData, newColumnMetaData, newElementMetaData, newEmbeddedMetaData, newForeignKeyMetaData, newIndexMetaData, newJoinMetaData, newKeyMetaData, newMapMetaData, newOrderMetaData, newUniqueMetaData, newValueMetaData, populate, setCacheable, setCascadeAttach, setCascadeDelete, setCascadeDetach, setCascadePersist, setCascadeRefresh, setCascadeRemoveOrphans, setCatalog, setColumn, setContainer, setDefaultFetchGroup, setDeleteAction, setDependent, setElementMetaData, setEmbedded, setEmbeddedMetaData, setExtensions, setFieldTypes, setForeignKeyMetaData, setIndexed, setIndexMetaData, setJoinMetaData, setKeyMetaData, setLoadFetchGroup, setMappedBy, setMapsIdAttribute, setNotPersistent, setNullValue, setOrdered, setOrderMetaData, setPersistenceModifier, setPrimaryKey, setRecursionDepth, setRecursionDepth, setRelation, setRelationTypeString, setSchema, setSequence, setSerialised, setStoreInLob, setTable, setTargetClassName, setTransactional, setTypeConverterDisabled, setTypeConverterName, setUnique, setUnique, setUniqueMetaData, setValueGeneratorName, setValueMetaData, setValueStrategy, setValueStrategy
-
Methods inherited from class org.datanucleus.metadata.MetaData
getExtensions, getMetaDataManager, getNoOfExtensions, getParent, getValueForExtension, getValuesForExtension, hasExtension, isInitialised, isPopulated, isUsed, removeExtension, setParent
-
-
-
-
Constructor Detail
-
FieldMetaData
public FieldMetaData(MetaData parent, AbstractMemberMetaData fmd)
Convenience constructor to copy the specification from the passed field. This is used when we have an overriding field and we make a copy of the baseline field as a starting point.- Parameters:
parent
- The parentfmd
- The field to copy
-
FieldMetaData
public FieldMetaData(MetaData parent, String name)
Constructor. Saves the MetaData with the specified values. The object is then in an "unpopulated" state. It can become "populated" by calling the populate() method which compares it against the field it is to represent and updates any unset attributes and flags up any errors.- Parameters:
parent
- parent MetaData instancename
- field name
-
-