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

All Implemented Interfaces:
    ClassStrategy, Commentable, SourceTracker, MetaDataModes, MetaDataContext, Comparable, Serializable

Specialization of metadata for relational databases.
Field Summary
public static final  ClassMapping[] EMPTY_MAPPINGS     
Fields inherited from org.apache.openjpa.meta.ClassMetaData:
ID_UNKNOWN,  ID_DATASTORE,  ID_APPLICATION,  ACCESS_UNKNOWN,  ACCESS_FIELD,  ACCESS_PROPERTY,  SYNTHETIC,  DEFAULT_STRING
Fields inherited from org.apache.openjpa.meta.Extensions:
OPENJPA
Constructor:
 protected ClassMapping(ValueMetaData vmd) 
    Embedded constructor. Supply embedding value and owning repository.
 protected ClassMapping(Class type,
    MappingRepository repos) 
    Constructor. Supply described type and owning repository.
Method from org.apache.openjpa.jdbc.meta.ClassMapping Summary:
addDeclaredFieldMapping,   assertJoinable,   clearDefinedFieldCache,   clearMapping,   clearSubclassCache,   copy,   customDelete,   customInsert,   customLoad,   customLoad,   customLoad,   customUpdate,   delete,   getAlias,   getColumnIO,   getDeclaredFieldMapping,   getDeclaredFieldMapping,   getDeclaredFieldMappings,   getDeclaredUnmanagedFieldMappings,   getDefaultFetchGroupFieldMappings,   getDefinedFieldMappings,   getDefinedFieldMappingsInListingOrder,   getDiscriminator,   getEmbeddingMapping,   getFieldMapping,   getFieldMapping,   getFieldMappings,   getFieldMappingsInListingOrder,   getIndependentAssignableMappings,   getJoinForeignKey,   getJoinable,   getJoinablePCSubclassMappings,   getJoinablePCSuperclassMapping,   getMappedPCSubclassMappings,   getMappedPCSuperclassMapping,   getMappingInfo,   getMappingRepository,   getObjectId,   getPCSubclassMappings,   getPCSuperclassMapping,   getPrimaryKeyColumns,   getPrimaryKeyFieldMappings,   getStrategy,   getSubclassFetchMode,   getTable,   getVersion,   getVersionFieldMapping,   initialize,   initializeMapping,   insert,   isCustomDelete,   isCustomInsert,   isCustomUpdate,   isForeignKeyObjectId,   isMapped,   isPrimaryKeyObjectId,   joinSuperclass,   map,   refSchemaComponents,   resolveMapping,   resolveNonRelationMappings,   setClassMapping,   setColumnIO,   setDescribedType,   setJoinForeignKey,   setJoinable,   setPrimaryKeyColumns,   setStrategy,   setSubclassFetchMode,   setTable,   supportsEagerSelect,   syncMappingInfo,   toDataStoreValue,   update,   validateDataStoreExtensionPrefix
Methods from org.apache.openjpa.meta.ClassMetaData:
addDeclaredFetchGroup,   addDeclaredField,   addDeclaredInterface,   addDefinedSuperclassField,   addExtensionKeys,   clearAllFieldCache,   clearDefinedFieldCache,   clearExtraFieldDataTable,   clearFieldCache,   clearSubclassCache,   compareTo,   copy,   defineSuperclassFields,   equals,   getAccessType,   getComments,   getCustomFetchGroups,   getDataCache,   getDataCacheName,   getDataCacheTimeout,   getDeclaredFetchGroups,   getDeclaredField,   getDeclaredField,   getDeclaredFields,   getDeclaredInterfaces,   getDeclaredUnmanagedFields,   getDefaultFetchGroupFields,   getDefinedFields,   getDefinedFieldsInListingOrder,   getDefinedSuperclassField,   getDescribedType,   getDetachedState,   getDetachedStateField,   getEmbeddingMetaData,   getEnvClassLoader,   getExtraFieldDataIndex,   getExtraFieldDataLength,   getFetchGroup,   getField,   getField,   getFields,   getFieldsInListingOrder,   getIdentitySequenceMetaData,   getIdentitySequenceName,   getIdentityStrategy,   getIdentityType,   getInterfaceAliasedProperties,   getInterfaceImpl,   getInterfacePropertyAlias,   getLifecycleMetaData,   getListingIndex,   getMappedPCSubclassMetaDatas,   getMappedPCSuperclassMetaData,   getObjectIdType,   getPCSubclassMetaDatas,   getPCSubclasses,   getPCSuperclass,   getPCSuperclassMetaData,   getPrimaryKeyFields,   getRepository,   getRequiresExtent,   getResolve,   getResourceName,   getSourceFile,   getSourceMode,   getSourceScope,   getSourceType,   getSuperclassField,   getTypeAlias,   getVersionField,   hashCode,   initializeMapping,   isAccessibleField,   isDetachable,   isEmbeddedOnly,   isIntercepting,   isManagedInterface,   isMapped,   isObjectIdTypeShared,   isOpenJPAIdentity,   removeDeclaredFetchGroup,   removeDeclaredField,   removeDeclaredInterface,   removeDefinedSuperclassField,   resolve,   resolveMapping,   resolveMeta,   setAccessType,   setComments,   setDataCacheName,   setDataCacheTimeout,   setDescribedType,   setDetachable,   setDetachedState,   setEmbeddedOnly,   setEnvClassLoader,   setIdentitySequenceName,   setIdentityStrategy,   setIdentityType,   setIntercepting,   setInterfaceImpl,   setInterfacePropertyAlias,   setListingIndex,   setManagedInterface,   setObjectIdType,   setPCSuperclass,   setPCSuperclassMetaData,   setRequiresExtent,   setResolve,   setResolve,   setSource,   setSourceMode,   setSourceMode,   setTypeAlias,   toString,   usesDetachedState,   validateMapping,   validateMeta
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.ClassMapping Detail:
 public FieldMapping addDeclaredFieldMapping(String name,
    Class type) 
 public Joinable assertJoinable(Column col) 
    Return the joinable for the given column, or throw an exception if none is available.
 protected  void clearDefinedFieldCache() 
 public  void clearMapping() 
    Clear mapping information, including strategy.
 protected  void clearSubclassCache() 
 public  void copy(ClassMetaData cls) 
 public  void customDelete(OpenJPAStateManager sm,
    JDBCStore store) throws SQLException 
 public  void customInsert(OpenJPAStateManager sm,
    JDBCStore store) throws SQLException 
 public boolean customLoad(OpenJPAStateManager sm,
    JDBCStore store,
    PCState state,
    JDBCFetchConfiguration fetch) throws ClassNotFoundException, SQLException 
 public boolean customLoad(OpenJPAStateManager sm,
    JDBCStore store,
    JDBCFetchConfiguration fetch,
    Result result) throws SQLException 
 public ResultObjectProvider customLoad(JDBCStore store,
    boolean subclasses,
    JDBCFetchConfiguration fetch,
    long startIdx,
    long endIdx) throws SQLException 
 public  void customUpdate(OpenJPAStateManager sm,
    JDBCStore store) throws SQLException 
 public  void delete(OpenJPAStateManager sm,
    JDBCStore store,
    RowManager rm) throws SQLException 
 public String getAlias() 
 public ColumnIO getColumnIO() 
    I/O information on the key columns / join key.
 public FieldMapping getDeclaredFieldMapping(int index) 
 public FieldMapping getDeclaredFieldMapping(String name) 
 public FieldMapping[] getDeclaredFieldMappings() 
 public FieldMapping[] getDeclaredUnmanagedFieldMappings() 
 public FieldMapping[] getDefaultFetchGroupFieldMappings() 
 public FieldMapping[] getDefinedFieldMappings() 
 public FieldMapping[] getDefinedFieldMappingsInListingOrder() 
 public Discriminator getDiscriminator() 
    The class discriminator.
 public ValueMapping getEmbeddingMapping() 
 public FieldMapping getFieldMapping(int index) 
 public FieldMapping getFieldMapping(String name) 
 public FieldMapping[] getFieldMappings() 
 public FieldMapping[] getFieldMappingsInListingOrder() 
 public ClassMapping[] getIndependentAssignableMappings() 
    Returns the closest-derived list of non-inter-joinable mapped types assignable to this type. May return this mapping.
 public ForeignKey getJoinForeignKey() 
    Foreign key linking the primary key columns to the superclass table, or null if none.
 public Joinable getJoinable(Column col) 
    Return the Joinable for the given column. Any column that another mapping joins to must be controlled by a joinable.
 public ClassMapping[] getJoinablePCSubclassMappings() 
    Return mapped subclasses that are reachable via joins.
 public ClassMapping getJoinablePCSuperclassMapping() 
    Return the nearest mapped superclass that can join to this class.
 public ClassMapping[] getMappedPCSubclassMappings() 
 public ClassMapping getMappedPCSuperclassMapping() 
 public ClassMappingInfo getMappingInfo() 
    Raw mapping data.
 public MappingRepository getMappingRepository() 
 public Object getObjectId(JDBCStore store,
    Result res,
    ForeignKey fk,
    boolean subs,
    Joins joins) throws SQLException 
    Return the oid value stored in the result. This implementation will recurse until it finds an ancestor class who uses oid values for its primary key.
 public ClassMapping[] getPCSubclassMappings() 
 public ClassMapping getPCSuperclassMapping() 
 public Column[] getPrimaryKeyColumns() 
    The columns this mapping uses to uniquely identify an object. These will typically be the primary key columns or the columns this class uses to link to its superclass table.
 public FieldMapping[] getPrimaryKeyFieldMappings() 
 public ClassStrategy getStrategy() 
    The strategy used to map this mapping.
 public int getSubclassFetchMode() 
 public Table getTable() 
    The mapping's primary table.
 public Version getVersion() 
    The version indicator.
 public FieldMapping getVersionFieldMapping() 
 public  void initialize() 
 protected  void initializeMapping() 
 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 isForeignKeyObjectId(ForeignKey fk) 
    Return whether the columns of the given foreign key to this mapping can be used to construct an object id for this type. This is a relatively expensive operation; its results should be cached.
 public boolean isMapped() 
    Returns true if this 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 isPrimaryKeyObjectId(boolean hasAll) 
 public Joins joinSuperclass(Joins joins,
    boolean toThis) 
 public  void map(boolean adapt) 
 public  void refSchemaComponents() 
 protected  void resolveMapping(boolean runtime) 
  void resolveNonRelationMappings() 
    Resolve non-relation field mappings so that when we do relation mappings they can rely on them for joins.
 public  void setClassMapping(ClassMapping owner) 
 public  void setColumnIO(ColumnIO io) 
    I/O information on the key columns / join key.
 protected  void setDescribedType(Class type) 
 public  void setJoinForeignKey(ForeignKey fk) 
    Foreign key linking the primary key columns to the superclass table, or null if none.
 public  void setJoinable(Column col,
    Joinable joinable) 
    Add the given column-to-joinable mapping.
 public  void setPrimaryKeyColumns(Column[] cols) 
    The columns this mapping uses to uniquely identify an object. These will typically be the primary key columns or the columns this class uses to link to its superclass table.
 public  void setStrategy(ClassStrategy 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 setSubclassFetchMode(int mode) 
 public  void setTable(Table table) 
    The mapping's primary table.
 public boolean supportsEagerSelect(Select sel,
    OpenJPAStateManager sm,
    JDBCStore store,
    ClassMapping base,
    JDBCFetchConfiguration fetch) 
 public  void syncMappingInfo() 
    Update MappingInfo with our current mapping information.
 public Object toDataStoreValue(Object obj,
    Column[] cols,
    JDBCStore store) 
    Return the given column value(s) for the given object. The given columns will be primary key columns of this mapping, but may be in any order. If there is only one column, return its value. If there are multiple columns, return an object array of their values, in the same order the columns are given.
 public  void update(OpenJPAStateManager sm,
    JDBCStore store,
    RowManager rm) throws SQLException 
 protected boolean validateDataStoreExtensionPrefix(String prefix)