Class PropertyMetaData

  extended by org.datanucleus.metadata.MetaData
      extended by org.datanucleus.metadata.AbstractMemberMetaData
          extended by org.datanucleus.metadata.PropertyMetaData
All Implemented Interfaces:, java.lang.Comparable, ColumnMetaDataContainer

public class PropertyMetaData
extends AbstractMemberMetaData
implements java.lang.Comparable, ColumnMetaDataContainer

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
protected  java.lang.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, cascadeDelete, cascadePersist, cascadeRefresh, cascadeUpdate, catalog, className, column, columnMetaData, columns, container, DEFAULT_RECURSION_DEPTH, defaultFetchGroup, dependent, elementMetaData, embedded, embeddedMetaData, fieldId, fieldTypes, foreignKeyMetaData, fullFieldName, indexed, indexMetaData, jdoFieldFlag, joinMetaData, keyMetaData, loadFetchGroup, mappedBy, memberRepresented, name, nullValue, ordered, orderMetaData, persistenceModifier, primaryKey, recursionDepth, relatedMemberMetaData, relationType, schema, sequence, serialized, storeInLob, table, targetClassName, type, UNDEFINED_RECURSION_DEPTH, uniqueConstraint, uniqueMetaData, valueGeneratorName, valueMetaData, valueStrategy
Fields inherited from class org.datanucleus.metadata.MetaData
Constructor Summary
PropertyMetaData(MetaData parent, PropertyMetaData fmd)
          Convenience constructor to copy the specification from the passed field.
PropertyMetaData(MetaData parent, java.lang.String name)
Method Summary
 java.lang.String getFieldName()
          Accessor for the field name if a concrete implementation of the interface is generated the field name for this property.
 PropertyMetaData setFieldName(java.lang.String name)
          Method to set the field name that this property wraps (persistent interface implementation)
 java.lang.String toString(java.lang.String prefix, java.lang.String indent)
          Returns a string representation of the object using a prefix This can be used as part of a facility to output a MetaData file.
Methods inherited from class org.datanucleus.metadata.AbstractMemberMetaData
addColumn, calcIsSecondClassMutable, compareTo, fieldBelongsToClass, getAbsoluteFieldNumber, getAbstractClassMetaData, getArray, getCatalog, getClassName, getClassName, getCollection, getColumn, getColumnMetaData, getContainer, getDefaultFieldPersistenceModifier, getElementMetaData, getEmbeddedMetaData, getFieldId, getFieldTypes, getForeignKeyMetaData, getFullFieldName, getIndexed, getIndexMetaData, getJdoFieldFlag, getJoinMetaData, getKeyMetaData, getLoadFetchGroup, getMap, getMappedBy, getMemberRepresented, getName, getNullValue, getOrderMetaData, getOverallParentClassMetaData, getPersistenceModifier, getRecursionDepth, getRelatedMemberMetaData, getRelatedMemberMetaDataForObject, getRelationType, getSchema, getSequence, getTable, getType, getTypeName, getUniqueMetaData, getValueGeneratorName, getValueMetaData, getValueStrategy, hasArray, hasCollection, hasContainer, hasMap, initialise, isAbstract, isCacheable, isCascadeDelete, isCascadePersist, isCascadeRefresh, isCascadeUpdate, isDefaultFetchGroup, isDependent, isEmbedded, isFieldArrayTypePersistable, isFieldTypePersistable, isFinal, isJdoField, isPersistentInterface, isPrimaryKey, isPrivate, isProtected, isPublic, isRelationOwner, isSerialized, isStatic, isTransient, isUnique, newArrayMetaData, newCollectionMetaData, newColumnMetaData, newElementMetaData, newEmbeddedMetaData, newForeignKeyMetaData, newIndexMetaData, newJoinMetadata, newJoinMetaData, newKeyMetaData, newMapMetaData, newOrderMetaData, newUniqueMetaData, newValueMetaData, populate, setCacheable, setCascadeDelete, setCascadePersist, setCascadeRefresh, setCascadeUpdate, setCatalog, setColumn, setContainer, setDefaultFetchGroup, setDefaultFetchGroup, setDeleteAction, setDependent, setDependent, setElementMetaData, setEmbedded, setEmbedded, setEmbeddedMetaData, setFieldTypes, setForeignKeyMetaData, setIndexed, setIndexMetaData, setJoinMetaData, setKeyMetaData, setLoadFetchGroup, setMappedBy, setNotPersistent, setNullValue, setOrdered, setOrderMetaData, setPersistenceModifier, setPrimaryKey, setPrimaryKey, setRecursionDepth, setRecursionDepth, setRelation, setSchema, setSequence, setSerialised, setSerialised, setStoreInLob, setTable, setTargetClassName, setTransactional, setUnique, setUnique, setUniqueMetaData, setValueGeneratorName, setValueMetaData, setValueStrategy, setValueStrategy
Methods inherited from class org.datanucleus.metadata.MetaData
addExtension, addExtension, assertIfInitialised, getExtensions, getNoOfExtensions, getParent, getValueForExtension, getValuesForExtension, hasExtension, isInitialised, isPopulated, isUsed, newExtensionMetaData, removeExtension, setParent, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Comparable
Methods inherited from interface org.datanucleus.metadata.ColumnMetaDataContainer
addColumn, getColumnMetaData

Field Detail


protected java.lang.String fieldName
Name of the field that this property is wrapping (when part of a persistent class).

Constructor Detail


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.

parent - The parent
fmd - The field to copy


public PropertyMetaData(MetaData parent,
                        java.lang.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.

parent - parent MetaData instance
name - field/property name
Method Detail


public java.lang.String getFieldName()
Accessor for the field name if a concrete implementation of the interface is generated the field name for this property.

field name. null if no field name is set, or if this is a property in a concrete class.


public PropertyMetaData setFieldName(java.lang.String name)
Method to set the field name that this property wraps (persistent interface implementation)

name - Field name


public java.lang.String toString(java.lang.String prefix,
                                 java.lang.String indent)
Returns a string representation of the object using a prefix This can be used as part of a facility to output a MetaData file.

toString in class AbstractMemberMetaData
prefix - prefix string
indent - indent string
a string representation of the object.

Copyright © 2010. All Rights Reserved.