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

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

Specialization of metadata for relational databases.
Fields inherited from org.apache.openjpa.meta.FieldMetaData:
NULL_UNSET,  NULL_NONE,  NULL_DEFAULT,  NULL_EXCEPTION,  MANAGE_PERSISTENT,  MANAGE_TRANSACTIONAL,  MANAGE_NONE
Fields inherited from org.apache.openjpa.meta.Extensions:
OPENJPA
Constructor:
 public FieldMapping(String name,
    Class type,
    ClassMapping owner) 
    Constructor.
Method from org.apache.openjpa.jdbc.meta.FieldMapping Summary:
appendIsEmpty,   appendIsNotEmpty,   appendIsNotNull,   appendIsNull,   appendSize,   clearMapping,   copy,   copyMappingInfo,   copyMappingInfo,   customDelete,   customInsert,   customUpdate,   delete,   deleteRow,   getAlias,   getColumnIO,   getColumns,   getDeclaredTypeMapping,   getDeclaringMapping,   getDefiningMapping,   getEagerFetchMode,   getElementMapping,   getEmbeddedMapping,   getFieldMapping,   getForeignKey,   getForeignKey,   getHandler,   getIndependentTypeMappings,   getInverseMappings,   getJoinColumnIO,   getJoinDirection,   getJoinForeignKey,   getJoinIndex,   getJoinUnique,   getKeyMapping,   getMappedByMapping,   getMappingInfo,   getMappingRepository,   getOrderColumn,   getOrderColumnIO,   getPolymorphic,   getRow,   getSelectSubclasses,   getStrategy,   getTable,   getTypeMapping,   getUseClassCriteria,   getValueIndex,   getValueInfo,   getValueMappedByMapping,   getValueMapping,   getValueUnique,   initialize,   insert,   isCustomDelete,   isCustomInsert,   isCustomUpdate,   isEagerSelectToMany,   isJoinOuter,   isMapped,   isVersionable,   join,   join,   join,   joinKey,   joinKeyRelation,   joinRelation,   load,   load,   loadEagerJoin,   loadEagerParallel,   loadKeyProjection,   loadProjection,   map,   mapConstraints,   mapJoin,   mapPrimaryKey,   orderLocal,   orderRelation,   refSchemaComponents,   resolve,   select,   selectEagerJoin,   selectEagerParallel,   setColumnIO,   setColumns,   setEagerFetchMode,   setFieldMapping,   setForeignKey,   setForeignKey,   setHandler,   setJoinColumnIO,   setJoinDirection,   setJoinForeignKey,   setJoinIndex,   setJoinOuter,   setJoinUnique,   setOrderColumn,   setOrderColumnIO,   setPolymorphic,   setStrategy,   setUseClassCriteria,   setValueIndex,   setValueUnique,   supportsSelect,   syncMappingInfo,   toDataStoreValue,   toKeyDataStoreValue,   update,   validateDataStoreExtensionPrefix,   where,   whereForeignKey,   wherePrimaryKey
Methods from org.apache.openjpa.meta.FieldMetaData:
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.jdbc.meta.FieldMapping Detail:
 public  void appendIsEmpty(SQLBuffer sql,
    Select sel,
    Joins joins) 
 public  void appendIsNotEmpty(SQLBuffer sql,
    Select sel,
    Joins joins) 
 public  void appendIsNotNull(SQLBuffer sql,
    Select sel,
    Joins joins) 
 public  void appendIsNull(SQLBuffer sql,
    Select sel,
    Joins joins) 
 public  void appendSize(SQLBuffer sql,
    Select sel,
    Joins joins) 
 public  void clearMapping() 
    Clear mapping information, including strategy.
 public  void copy(FieldMetaData fmd) 
 public  void copyMappingInfo(FieldMapping fm) 
    Copy mapping info from the given instance to this one.
 public  void copyMappingInfo(ValueMapping vm) 
 public  void customDelete(OpenJPAStateManager sm,
    JDBCStore store) throws SQLException 
 public  void customInsert(OpenJPAStateManager sm,
    JDBCStore store) throws SQLException 
 public  void customUpdate(OpenJPAStateManager sm,
    JDBCStore store) throws SQLException 
 public  void delete(OpenJPAStateManager sm,
    JDBCStore store,
    RowManager rm) throws SQLException 
 public  void deleteRow(OpenJPAStateManager sm,
    JDBCStore store,
    RowManager rm) throws SQLException 
    Delete the row for this object if the reference foreign key exists. Utility method for use by mapping strategies.
 public String getAlias() 
 public ColumnIO getColumnIO() 
 public Column[] getColumns() 
 public ClassMapping getDeclaredTypeMapping() 
 public ClassMapping getDeclaringMapping() 
 public ClassMapping getDefiningMapping() 
 public int getEagerFetchMode() 
 public ValueMapping getElementMapping() 
 public ClassMapping getEmbeddedMapping() 
 public FieldMapping getFieldMapping() 
 public ForeignKey getForeignKey() 
 public ForeignKey getForeignKey(ClassMapping target) 
 public ValueHandler getHandler() 
 public ClassMapping[] getIndependentTypeMappings() 
 public FieldMapping[] getInverseMappings() 
 public ColumnIO getJoinColumnIO() 
    I/O information on the join columns.
 public int getJoinDirection() 
 public ForeignKey getJoinForeignKey() 
    Foreign key linking the field table to the class' primary table.
 public Index getJoinIndex() 
    Index on join foreign key columns.
 public Unique getJoinUnique() 
    Unique constraint on join foreign key columns.
 public ValueMapping getKeyMapping() 
 public FieldMapping getMappedByMapping() 
 public FieldMappingInfo getMappingInfo() 
    Raw mapping data about field's join to parent table, as well as miscellaneous specialized columns like order column.
 public MappingRepository getMappingRepository() 
 public Column getOrderColumn() 
    Field order column, if any.
 public ColumnIO getOrderColumnIO() 
    I/O information for order column.
 public int getPolymorphic() 
 public Row getRow(OpenJPAStateManager sm,
    JDBCStore store,
    RowManager rm,
    int action) throws SQLException 
    Return the row to use for this field. This method is meant only for single-value fields that might reside in a table that is joined to the primary table through the join foreign key. It is not meant for multi-valued fields like collections and maps. The method checks whether we're using an outer join and if so it deletes the field's previous value, then if the field is non-null returns an insert row for the new value. The join foreign key will already be set on the returned row; mapping strategies just need to set their own values. Utility method for use by mapping strategies.
 public int getSelectSubclasses() 
 public FieldStrategy getStrategy() 
    The strategy used to map this mapping.
 public Table getTable() 
    The mapping's primary table.
 public ClassMapping getTypeMapping() 
 public boolean getUseClassCriteria() 
 public Index getValueIndex() 
 public ValueMappingInfo getValueInfo() 
 public FieldMapping getValueMappedByMapping() 
 public ValueMapping getValueMapping() 
 public Unique getValueUnique() 
 public  void initialize() 
 public  void insert(OpenJPAStateManager sm,
    JDBCStore store,
    RowManager rm) throws SQLException 
 public Boolean isCustomDelete(OpenJPAStateManager sm,
    JDBCStore store) 
 public Boolean isCustomInsert(OpenJPAStateManager sm,
    JDBCStore store) 
 public Boolean isCustomUpdate(OpenJPAStateManager sm,
    JDBCStore store) 
 public boolean isEagerSelectToMany() 
 public boolean isJoinOuter() 
    Whether to use an outer join from the class' primary table.
 public boolean isMapped() 
    Returns true if field class does not use the "none" strategy (including if it has a null strategy, and therefore is probably in the process of being mapped).
 public boolean isVersionable() 
 public Joins join(Select sel) 
    Return any joins needed to get from the primary table to this table.
 public Joins join(Joins joins,
    boolean forceOuter) 
 public Joins join(Joins joins,
    boolean forceOuter,
    boolean toMany) 
    Joins from the owning class' table to the table where this field lies using the join foreign key. Utility method for use by mapping strategies.
 public Joins joinKey(Joins joins,
    boolean forceOuter) 
 public Joins joinKeyRelation(Joins joins,
    boolean forceOuter,
    boolean traverse) 
 public Joins joinRelation(Joins joins,
    boolean forceOuter,
    boolean traverse) 
 public  void load(OpenJPAStateManager sm,
    JDBCStore store,
    JDBCFetchConfiguration fetch) throws SQLException 
 public  void load(OpenJPAStateManager sm,
    JDBCStore store,
    JDBCFetchConfiguration fetch,
    Result res) throws SQLException 
 public  void loadEagerJoin(OpenJPAStateManager sm,
    JDBCStore store,
    JDBCFetchConfiguration fetch,
    Result res) throws SQLException 
 public Object loadEagerParallel(OpenJPAStateManager sm,
    JDBCStore store,
    JDBCFetchConfiguration fetch,
    Object res) throws SQLException 
 public Object loadKeyProjection(JDBCStore store,
    JDBCFetchConfiguration fetch,
    Result res,
    Joins joins) throws SQLException 
 public Object loadProjection(JDBCStore store,
    JDBCFetchConfiguration fetch,
    Result res,
    Joins joins) throws SQLException 
 public  void map(boolean adapt) 
 public  void mapConstraints(String name,
    boolean adapt) 
 public  void mapJoin(boolean adapt,
    boolean joinRequired) 
    Map this field to its table, optionally requiring that it be in another table. Utility method for use by mapping strategies.
 public  void mapPrimaryKey(boolean adapt) 
    Maps the primary key on the secondary table for this field, if the user's defaults create one. This must be called after this field is mapped so that it's table has its columns set.
 public  void orderLocal(Select sel,
    ClassMapping elem,
    Joins joins) 
    Add ordering to the given select for all non-relation order values, including the synthetic order column, if any.
 public  void orderRelation(Select sel,
    ClassMapping elem,
    Joins joins) 
    Add ordering to the given select for all relation-based values.
 public  void refSchemaComponents() 
    Increment the reference count of used schema components.
 public boolean resolve(int mode) 
 public int select(Select sel,
    OpenJPAStateManager sm,
    JDBCStore store,
    JDBCFetchConfiguration fetch,
    int eagerMode) 
 public  void selectEagerJoin(Select sel,
    OpenJPAStateManager sm,
    JDBCStore store,
    JDBCFetchConfiguration fetch,
    int eagerMode) 
 public  void selectEagerParallel(SelectExecutor sel,
    OpenJPAStateManager sm,
    JDBCStore store,
    JDBCFetchConfiguration fetch,
    int eagerMode) 
 public  void setColumnIO(ColumnIO io) 
 public  void setColumns(Column[] cols) 
 public  void setEagerFetchMode(int mode) 
 public  void setFieldMapping(FieldMapping owner) 
 public  void setForeignKey(ForeignKey fk) 
 public  void setForeignKey(Row row,
    OpenJPAStateManager sm) throws SQLException 
 public  void setHandler(ValueHandler handler) 
 public  void setJoinColumnIO(ColumnIO io) 
    I/O information on the join columns.
 public  void setJoinDirection(int direction) 
 public  void setJoinForeignKey(ForeignKey fk) 
    Foreign key linking the field table to the class' primary table.
 public  void setJoinIndex(Index idx) 
    Index on join foreign key columns.
 public  void setJoinOuter(boolean outer) 
    Whether to use an outer join from the class' primary table.
 public  void setJoinUnique(Unique unq) 
    Unique constraint on join foreign key columns.
 public  void setOrderColumn(Column order) 
    Field order column, if any.
 public  void setOrderColumnIO(ColumnIO io) 
    I/O information for order column.
 public  void setPolymorphic(int poly) 
 public  void setStrategy(FieldStrategy strategy,
    Boolean adapt) 
    The strategy used to map this mapping. The adapt parameter determines whether to adapt when mapping the strategy; use null if the strategy should not be mapped.
 public  void setUseClassCriteria(boolean criteria) 
 public  void setValueIndex(Index idx) 
 public  void setValueUnique(Unique unq) 
 public int supportsSelect(Select sel,
    int type,
    OpenJPAStateManager sm,
    JDBCStore store,
    JDBCFetchConfiguration fetch) 
 public  void syncMappingInfo() 
    Update MappingInfo with our current mapping information.
 public Object toDataStoreValue(Object val,
    JDBCStore store) 
 public Object toKeyDataStoreValue(Object val,
    JDBCStore store) 
 public  void update(OpenJPAStateManager sm,
    JDBCStore store,
    RowManager rm) throws SQLException 
 protected boolean validateDataStoreExtensionPrefix(String prefix) 
 public  void where(OpenJPAStateManager sm,
    JDBCStore store,
    RowManager rm,
    Object prevValue) throws SQLException 
 public  void whereForeignKey(Row row,
    OpenJPAStateManager sm) throws SQLException 
 public  void wherePrimaryKey(Select sel,
    OpenJPAStateManager sm,
    JDBCStore store) 
    Add a wherePrimaryKey or whereForeignKey condition to the given select, depending on whether we have a join foreign key.