| java.lang.Object org.jpox.metadata.MetaData org.jpox.metadata.AbstractMemberMetaData org.jpox.metadata.PropertyMetaData
PropertyMetaData | public class PropertyMetaData extends AbstractMemberMetaData implements Comparable,ColumnMetaDataContainer(Code) | | 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 lowercased.
The field-name attribute is required; it associates a persistent field with the
named property.
MetaData Element
The MetaData Element represented here is as follows
version: $Revision: 1.17 $ |
Field Summary | |
final protected String | fieldName Name of the field that this property is wrapping (when part of a persistent class). |
Constructor Summary | |
public | PropertyMetaData(MetaData parent, String name) | public | PropertyMetaData(MetaData parent, PropertyMetaData fmd) Convenience constructor to copy the specification from the passed field. | public | PropertyMetaData(MetaData parent, String name, String pk, String modifier, String defaultFetchGroup, String nullValue, String embedded, String serialized, String dependent, String mappedBy, String column, String table, String catalog, String schema, String deleteAction, String indexed, String unique, String recursionDepth, String loadFetchGroup, String valueStrategy, String sequence, String fieldType, String fieldName) Constructor. |
Method Summary | |
public int | compareTo(Object o) Comparator method. | public String | getFieldName() Accessor for the field name
if a concrete implementation of the interface is generated the field name for this property.
field name. | public boolean | isProperty() | public String | toString(String prefix, 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. |
fieldName | final protected String fieldName(Code) | | Name of the field that this property is wrapping (when part of a persistent class).
|
PropertyMetaData | public PropertyMetaData(MetaData parent, String name)(Code) | | Convenience constructor taking defaults
Parameters: parent - Parent component Parameters: name - Name of the field |
PropertyMetaData | public PropertyMetaData(MetaData parent, PropertyMetaData fmd)(Code) | | 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 parent Parameters: fmd - The field to copy |
PropertyMetaData | public PropertyMetaData(MetaData parent, String name, String pk, String modifier, String defaultFetchGroup, String nullValue, String embedded, String serialized, String dependent, String mappedBy, String column, String table, String catalog, String schema, String deleteAction, String indexed, String unique, String recursionDepth, String loadFetchGroup, String valueStrategy, String sequence, String fieldType, String fieldName)(Code) | | 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 instance Parameters: name - field name Parameters: pk - attribute primary-key value Parameters: modifier - attribute persistence-modifier value Parameters: defaultFetchGroup - attribute default-fetch-group value Parameters: nullValue - attribute null-value value Parameters: embedded - attribute embedded value Parameters: serialized - attribute serialized value Parameters: dependent - attribute dependent value Parameters: mappedBy - attribute mapped-by value Parameters: column - attribute column value Parameters: table - attribute table value Parameters: catalog - attribute catalog value Parameters: schema - attribute schema value Parameters: deleteAction - attribute delete-action value Parameters: indexed - Whether this is indexed Parameters: unique - Apply a unique constraint Parameters: recursionDepth - The depth of fetch to use when recursing Parameters: loadFetchGroup - Name of the additional fetch group to use when loading Parameters: valueStrategy - attribute value-strategy value Parameters: sequence - attribute sequence value Parameters: fieldType - Implementation type(s) for field. Parameters: fieldName - field name |
compareTo | public int compareTo(Object o)(Code) | | Comparator method. This allows the ClassMetaData to search for a
PropertyMetaData with a particular name.
Parameters: o - The object to compare against The comparison result |
getFieldName | public String getFieldName()(Code) | | 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. |
isProperty | public boolean isProperty()(Code) | | Whether this uses getter/setter accessors (Property) or
used field based access (Field)
true if this is a property |
toString | public String toString(String prefix, String indent)(Code) | | Returns a string representation of the object using a prefix
This can be used as part of a facility to output a MetaData file.
Parameters: prefix - prefix string Parameters: indent - indent string a string representation of the object. |
|
|