- java.lang.Object
-
- org.datanucleus.metadata.MetaData
-
- org.datanucleus.metadata.AbstractMemberMetaData
-
- org.datanucleus.metadata.PropertyMetaData
-
- All Implemented Interfaces:
Serializable
,Comparable
,ColumnMetaDataContainer
public class PropertyMetaData extends AbstractMemberMetaData
The property element declares mapping between a virtual field of an implemented interface and the corresponding persistent field of a persistence-capable class. The name attribute is required, and declares the name for the property. The naming conventions for JavaBeans property names is used: the property name is the same as the corresponding get method for the property with the get removed and the resulting name lower-cased. The field-name attribute is required; it associates a persistent field with the named property.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
fieldName
Name of the field that this property is wrapping (when part of a persistent class).-
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, 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_FETCH_FK_ONLY, 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 PropertyMetaData(MetaData parent, String name)
Constructor.PropertyMetaData(MetaData parent, PropertyMetaData 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
getFieldName()
Accessor for the field name if a concrete implementation of the interface is generated the field name for this property.PropertyMetaData
setFieldName(String name)
Method to set the field name that this property wraps (persistent interface implementation)String
toString()
-
Methods inherited from class org.datanucleus.metadata.AbstractMemberMetaData
addColumn, calcIsSecondClassMutable, clearColumns, compareTo, fetchFKOnly, 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, 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
addExtension, addExtensions, getExtensions, getMetaDataManager, getNoOfExtensions, getParent, getValueForExtension, getValuesForExtension, hasExtension, isInitialised, isPopulated, isUsed, removeExtension, setExtensions, setParent
-
-
-
-
Field Detail
-
fieldName
protected String fieldName
Name of the field that this property is wrapping (when part of a persistent class).
-
-
Constructor Detail
-
PropertyMetaData
public PropertyMetaData(MetaData parent, PropertyMetaData 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
-
PropertyMetaData
public PropertyMetaData(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/property name
-
-
Method Detail
-
getFieldName
public String getFieldName()
Accessor for the field name if a concrete implementation of the interface is generated the field name for this property.- Returns:
- field name. null if no field name is set, or if this is a property in a concrete class.
-
setFieldName
public PropertyMetaData setFieldName(String name)
Method to set the field name that this property wraps (persistent interface implementation)- Parameters:
name
- Field name- Returns:
- This metadata
-
-