Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.solarmetric.rd.kodo.impl.jdbc.meta
Class ClassMapping

    java.lang.Object
      |
      +--com.solarmetric.rd.kodo.impl.jdbc.meta.Mapping
            |
            +--com.solarmetric.rd.kodo.impl.jdbc.meta.ExtensionsMapping
                  |
                  +--com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping

All Implemented Interfaces:
  ClassMetaData, java.lang.Comparable, Extensions, SourceTracker

Direct Known Subclasses:
  BaseClassMapping, FlatClassMapping, VerticalClassMapping

public abstract class ClassMapping
extends com.solarmetric.rd.kodo.impl.jdbc.meta.ExtensionsMapping
implements ClassMetaData

Mapping from a class to a relational schema. All field operations inherited from `ClassMetaData` deal with the underlying field metadata. The underlying metadata is returned from field operations because these operations should include transactional non-persistent fields, for which no mappings are available. Note that this means field mappings and the superclass mapping must be explicitly added in addition to adding standard field metadata.

Field Summary
`static java.lang.String` | `REF_DELETE_ACTION` Extension key used to mark the foreign key delete action on vertically- mapped tables.
`static java.lang.String` | `USE_CLASS_IND` Extension key used to indicate the type of class indicator to use, or "none" for none.
`static java.lang.String` | `USE_CLASS_MAP` Extension key used to indicate the type of class mapping to use.
`static java.lang.String` | `USE_VERSION_IND` Extension key used to indicate the type of version indicator to use, or "none" for none.

Fields inherited from class com.solarmetric.rd.kodo.impl.jdbc.meta.Mapping
`DEFAULT, FALSE, LOB, TRUE, UNIQUE`

Fields inherited from interface com.solarmetric.rd.kodo.meta.ClassMetaData
`CAN_CACHE, ID_APPLICATION, ID_DATASTORE, ID_NONE`

Constructor Summary
`ClassMapping(com.solarmetric.rd.kodo.meta.ClassMetaData meta)` Constructor.

Method Summary
`void` | `addDeclaredField(com.solarmetric.rd.kodo.meta.FieldMetaData field)` Add a persistent or transactional field to this class.
`void` | `addDeclaredFieldMapping(com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping field)`
`void` | `addExtension(java.lang.String key, java.lang.Object value)` Add a `kodo` vendor extension to this entity.
`void` | `addExtension(java.lang.String vendor, java.lang.String key, java.lang.Object value)` Add a vendor extension to this entity.
`int` | `compareTo(java.lang.Object other)`
`protected com.solarmetric.rd.kodo.impl.jdbc.schema.Table` | `createTable(com.solarmetric.rd.kodo.impl.jdbc.schema.Schema schema)` Create a new table for this mapping.
`boolean` | `getBooleanExtension(java.lang.String key)` Get the value as a boolean.
`boolean` | `getBooleanExtension(java.lang.String vendor, java.lang.String key)` Get the value as a boolean.
`boolean` | `getCanCache()` Return true if the `ClassMetaData.CAN_CACHE` extension key is true.
`abstract com.solarmetric.rd.kodo.impl.jdbc.meta.ClassIndicator` | `getClassIndicator()` Return the class indicator for this class.
`java.lang.Object` | `getDataStoreValue(java.lang.Object oid)` Translate the given oid into primary key column values.
`com.solarmetric.rd.kodo.meta.FieldMetaData` | `getDeclaredField(int index)` Return the metadata for the persistent or transactional field with the given relative index.
`com.solarmetric.rd.kodo.meta.FieldMetaData` | `getDeclaredField(java.lang.String name)` Return the metadata for the persistent or transactional field with the given name, without including superclass fields.
`com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping` | `getDeclaredFieldMapping(int index)`
`com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping` | `getDeclaredFieldMapping(java.lang.String name)`
`com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping[]` | `getDeclaredFieldMappings()`
`com.solarmetric.rd.kodo.meta.FieldMetaData[]` | `getDeclaredFields()` Return only the fields for this class, without superclass fields.
`com.solarmetric.rd.kodo.meta.FieldMetaData[]` | `getDeclaredUnmanagedFields()` Return any fields that were added as non-managed.
`static com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping[]` | `getDefaults()` Return the default set of available class mappings.
`java.lang.Class` | `getDescribedType()` Return the persistence capable class described by this metadata.
`double` | `getDoubleExtension(java.lang.String key)` Get the value as a double.
`double` | `getDoubleExtension(java.lang.String vendor, java.lang.String key)` Get the value as a double.
`com.solarmetric.rd.kodo.meta.Extensions` | `getEmbeddedExtensions(java.lang.String key, boolean create)` Return the embedded extensions under the extension with the given key.
`com.solarmetric.rd.kodo.meta.Extensions` | `getEmbeddedExtensions(java.lang.String vendor, java.lang.String key, boolean create)` Return the embedded extensions under the extension with the given key.
`com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping` | `getEmbeddingMapping()` If this is an embedded mapping, return the owning field.
`java.lang.String[]` | `getExtensionKeys()` Return all extension keys for vendor `kodo`.
`java.lang.String[]` | `getExtensionKeys(java.lang.String vendor)` Return all extension keys for the given vendor.
`java.lang.String[]` | `getExtensionVendors()` Return all vendors who have extension keys at this level.
`com.solarmetric.rd.kodo.meta.FieldMetaData` | `getField(int index)` Return the metadata for the persistent or transactional field with the given absolute index.
`com.solarmetric.rd.kodo.meta.FieldMetaData` | `getField(java.lang.String name)` Return the metadata for the persistent or transactional field with the given name.
`com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping` | `getFieldMapping(int index)`
`com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping` | `getFieldMapping(java.lang.String name)`
`com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping[]` | `getFieldMappings()`
`abstract com.solarmetric.rd.kodo.impl.jdbc.schema.Column[]` | `getFieldOrderPrimaryKeyColumns()` Return the primary key columns of this mapping's table in the same order that the primary key fields are declared in the class.
`com.solarmetric.rd.kodo.meta.FieldMetaData[]` | `getFields()` Return all field metadatas, including superclass fields.
`int` | `getIdentityType()` Return the type of JDO identity being used.
`int` | `getIntExtension(java.lang.String key)` Get the value as an int.
`int` | `getIntExtension(java.lang.String vendor, java.lang.String key)` Get the value as an int.
`com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMappingInfo` | `getMappingInfo()` Return the mapping info that was used to create this mapping, if any.
`com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository` | `getMappingRepository()` Convenience method to make casting from `getRepository()` unnecessary.
`com.solarmetric.rd.kodo.meta.ClassMetaData` | `getMetaData()` Return the underlying metadata.
`java.lang.Object` | `getObjectExtension(java.lang.String key)` Get the value of a `kodo` extension.
`java.lang.Object` | `getObjectExtension(java.lang.String vendor, java.lang.String key)` Get the value of an extension.
`java.lang.Object` | `getObjectId(com.solarmetric.rd.kodo.impl.jdbc.runtime.Result res, com.solarmetric.rd.kodo.impl.jdbc.schema.Column[] cols)` Return the oid value stored in the given columns of the given result.
`java.lang.Class` | `getObjectIdClass()` Return the metadata-specified class to use for the object ID, or null if not specified.
`com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping[]` | `getPCSubclassMappings()` Return all known subclass mappings.
`java.lang.Class` | `getPCSuperclass()` Return the persistence capable superclass of the described type, or null if the metadata did not specify one.
`com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping` | `getPCSuperclassMapping()` Convenience method to make casting from `getPCSuperclassMetaData()` unnecessary.
`com.solarmetric.rd.kodo.meta.ClassMetaData` | `getPCSuperclassMetaData()` Return the metadata for the persistence capable superclass of the described type, or null if the metadata did not specify one.
`java.lang.ClassLoader` | `getPMClassLoader()` The class persistence manager loader used when parsing this metadata.
`com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping[]` | `getPrimaryKeyFieldMappings()`
`com.solarmetric.rd.kodo.meta.FieldMetaData[]` | `getPrimaryKeyFields()` Return primary key fields, or empty array if none.
`int` | `getRefDeleteAction()`
`com.solarmetric.rd.kodo.meta.JDOMetaDataRepository` | `getRepository()` Return the owning repository.
`boolean` | `getRequiresExtent()` Return true if the type requires management via extent.
`java.io.File` | `getSourceFile()` Return the source file the metadata was parsed from, if any.
`java.lang.String` | `getStringExtension(java.lang.String key)` Get the value as a string.
`java.lang.String` | `getStringExtension(java.lang.String vendor, java.lang.String key)` Get the value as a string.
`java.lang.String` | `getUseClassIndicator()`
`java.lang.String` | `getUseClassMapping()`
`java.lang.String` | `getUseVersionIndicator()`
`boolean` | `getValidate()` Return true if the metadata will validate itself when resolved.
`abstract com.solarmetric.rd.kodo.impl.jdbc.meta.VersionIndicator` | `getVersionIndicator()` Return the version indicator for this class.
`boolean` | `hasExtension(java.lang.String key)` Return true if the extension with the given key exists for vendor `kodo`.
`boolean` | `hasExtension(java.lang.String vendor, java.lang.String key)` Return true if the extension with the given key exists for the given vendor.
`void` | `invalidateResolve()` For implemntation use.
`boolean` | `isEmpty()` Return true if there are no keys for any vendor.
`boolean` | `isEnhanced()` Returns true if the class has been enhanced.
`boolean` | `isInstanceCallbacks()` Return true if the class implements `InstanceCallbacks`.
`boolean` | `isRefDeleteActionDeferred()`
`abstract void` | `joinSuperclass(com.solarmetric.rd.kodo.impl.jdbc.runtime.Joins joins)` Join the mapping to its superclass table.
`com.solarmetric.rd.rop.ResultList` | `load(com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store, boolean subclasses, java.sql.Connection conn, int fetchThreshold, int fetchBatchSize)` Override this method to customize obtaining a result containing all instances of this class.
`com.solarmetric.rd.rop.ResultList` | `load(com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store, boolean subclasses, java.lang.String queryName, java.util.Map params, java.sql.Connection conn, int fetchThreshold, int fetchBatchSize)` Override this method to customize obtaining a result for a named query.
`boolean` | `load(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm, com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store, com.solarmetric.rd.kodo.runtime.JDOState state, java.sql.Connection conn)` Override this method to load the state of a given object, returning true if this method handles the load.
`boolean` | `load(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm, com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store, com.solarmetric.rd.kodo.impl.jdbc.runtime.Result result)` Override this method to customize loading a result into an instance.
`com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping` | `newInstance(com.solarmetric.rd.kodo.meta.ClassMetaData meta)` Return a new instance of this class.
`static com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping` | `newInstance(java.lang.String type, com.solarmetric.rd.kodo.meta.ClassMetaData meta)` Return the mapping for the given mapping type.
`boolean` | `removeDeclaredField(com.solarmetric.rd.kodo.meta.FieldMetaData field)` Remove the given field from management.
`boolean` | `removeDeclaredFieldMapping(com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping field)`
`boolean` | `removeEmbeddedExtensions(java.lang.String key)` Remove the embedded extensions for the given key.
`boolean` | `removeEmbeddedExtensions(java.lang.String vendor, java.lang.String key)` Remove the embedded extensions for the given key.
`boolean` | `removeExtension(java.lang.String key)` Remove a `kodo` vendor extension to this entity.
`boolean` | `removeExtension(java.lang.String vendor, java.lang.String key)` Remove a vendor extension to this entity.
`boolean` | `resolve()` For implementation use.
`void` | `setCanCache(boolean cacheable)` Set the value of the `ClassMetaData.CAN_CACHE` standard extension.
`abstract void` | `setClassIndicator(com.solarmetric.rd.kodo.impl.jdbc.meta.ClassIndicator cls)` Set the class indicator for this class.
`void` | `setDescribedType(java.lang.Class type)` Return the persistence capable class described by this metadata.
`void` | `setIdentityType(int type)` Set the type of JDO identity used by this class.
`void` | `setMappingInfo(com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMappingInfo info)` Set the mapping info that was used to create this class.
`void` | `setObjectIdClass(java.lang.Class cls)` Set the metadata-specified class to use for the object ID.
`void` | `setPCSuperclass(java.lang.Class pc)` Set the persistence capable superclass of the described type.
`void` | `setPCSuperclassMapping(com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping superMapping)` Set the superclass mapping.
`void` | `setPMClassLoader(java.lang.ClassLoader loader)` The class persistence manager loader used when parsing this metadata.
`void` | `setRefDeleteAction(int action, boolean deferred)`
`void` | `setRepository(com.solarmetric.rd.kodo.meta.JDOMetaDataRepository repos)` The supplied repository must be a `MappingRepository`.
`void` | `setRequiresExtent(boolean req)` Set whether the type requires extent management.
`void` | `setSourceFile(java.io.File file)` Set the source file the metadata was parsed from.
`void` | `setUseClassIndicator(java.lang.String ind)`
`void` | `setUseClassMapping(java.lang.String map)`
`void` | `setUseVersionIndicator(java.lang.String ind)`
`void` | `setValidate(boolean validate)` Set to false to turn off validation on resolve.
`abstract void` | `setVersionIndicator(com.solarmetric.rd.kodo.impl.jdbc.meta.VersionIndicator version)` Set the version indicator for this class.
`java.lang.String` | `toString()`

Methods inherited from class com.solarmetric.rd.kodo.impl.jdbc.meta.Mapping
`checkIndex, createColumn, delete, delete, fromMappingInfo, getDBDictionary, getForeignKey, getLog, getMappingType, getSchemaGroup, getTable, insert, insert, invalidMapping, isCustomDelete, isCustomInsert, isCustomUpdate, map, refSchemaComponents, reverseMap, setForeignKey, toMappingInfo, update, update`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface com.solarmetric.rd.kodo.meta.Extensions
`addExtension, addExtension, getBooleanExtension, getBooleanExtension, getDoubleExtension, getDoubleExtension, getEmbeddedExtensions, getEmbeddedExtensions, getExtensionKeys, getExtensionKeys, getExtensionVendors, getIntExtension, getIntExtension, getObjectExtension, getObjectExtension, getStringExtension, getStringExtension, hasExtension, hasExtension, isEmpty, removeEmbeddedExtensions, removeEmbeddedExtensions, removeExtension, removeExtension`

Field Detail

### USE_CLASS_MAP

    public static final java.lang.String USE_CLASS_MAP

  Extension key used to indicate the type of class mapping to use.

  See Also:
    Constant Field Values

### USE_VERSION_IND

    public static final java.lang.String USE_VERSION_IND

  Extension key used to indicate the type of version indicator to use, or "none" for none.

  See Also:
    Constant Field Values

### USE_CLASS_IND

    public static final java.lang.String USE_CLASS_IND

  Extension key used to indicate the type of class indicator to use, or "none" for none.

  See Also:
    Constant Field Values

### REF_DELETE_ACTION

    public static final java.lang.String REF_DELETE_ACTION

  Extension key used to mark the foreign key delete action on vertically- mapped tables. Legal values are `none`, `exception`, `exception-deferred`, `cascade`, `cascade-deferred`. Defaults to `none`.

  See Also:
    Constant Field Values

Constructor Detail

### ClassMapping

    public ClassMapping(com.solarmetric.rd.kodo.meta.ClassMetaData meta)

  Constructor. Supply underlying metadata.

Method Detail

### getDefaults

    public static com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping[] getDefaults()

  Return the default set of available class mappings.

### newInstance

    public static com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping newInstance(java.lang.String type,
                                                                                  com.solarmetric.rd.kodo.meta.ClassMetaData meta)

  Return the mapping for the given mapping type.

### getMetaData

    public com.solarmetric.rd.kodo.meta.ClassMetaData getMetaData()

  Return the underlying metadata.

### getMappingInfo

    public com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMappingInfo getMappingInfo()

  Return the mapping info that was used to create this mapping, if any.

### setMappingInfo

    public void setMappingInfo(com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMappingInfo info)

  Set the mapping info that was used to create this class.

### getVersionIndicator

    public abstract com.solarmetric.rd.kodo.impl.jdbc.meta.VersionIndicator getVersionIndicator()

  Return the version indicator for this class. Subclass mappings should delegate this method to their superclass.

### setVersionIndicator

    public abstract void setVersionIndicator(com.solarmetric.rd.kodo.impl.jdbc.meta.VersionIndicator version)

  Set the version indicator for this class. Subclass mappings should delegate this method to their superclass.

### getClassIndicator

    public abstract com.solarmetric.rd.kodo.impl.jdbc.meta.ClassIndicator getClassIndicator()

  Return the class indicator for this class. Subclass mappings should delegate this method to their superclass.

### setClassIndicator

    public abstract void setClassIndicator(com.solarmetric.rd.kodo.impl.jdbc.meta.ClassIndicator cls)

  Set the class indicator for this class. Subclass mappings should delegate this method to their superclass.

### getFieldOrderPrimaryKeyColumns

    public abstract com.solarmetric.rd.kodo.impl.jdbc.schema.Column[] getFieldOrderPrimaryKeyColumns()

  Return the primary key columns of this mapping's table in the same order that the primary key fields are declared in the class.

### getEmbeddingMapping

    public com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping getEmbeddingMapping()

  If this is an embedded mapping, return the owning field. Returns null by default.

### joinSuperclass

    public abstract void joinSuperclass(com.solarmetric.rd.kodo.impl.jdbc.runtime.Joins joins)

  Join the mapping to its superclass table.

### load

    public com.solarmetric.rd.rop.ResultList load(com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store,
                                                  boolean subclasses,
                                                  java.sql.Connection conn,
                                                  int fetchThreshold,
                                                  int fetchBatchSize)
                                           throws java.sql.SQLException

  Override this method to customize obtaining a result containing all instances of this class. Returns null by default.

    `java.sql.SQLException`

### load

    public boolean load(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
                        com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store,
                        com.solarmetric.rd.kodo.runtime.JDOState state,
                        java.sql.Connection conn)
                 throws java.sql.SQLException,
                        java.lang.ClassNotFoundException

  Override this method to load the state of a given object, returning true if this method handles the load. If the object does not exist in the data store, simply take no action on it (but still return true). Returns false by default.

  Parameters:
    `state` - if non-null, then you must initialize the state and persistent object of the given state manager (after determining the actual class of the object from the database, if there are possible persistent subclasses); initialization looks like this: sm.initialize (ImplHelper.getJDOHelper ().newInstance (pcClass, sm, sm.getObjectId (false)), state);, where the ImplHelper class is in the com.solarmetric.kodo.util package
    `java.sql.SQLException`
    `java.lang.ClassNotFoundException`

### load

    public com.solarmetric.rd.rop.ResultList load(com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store,
                                                  boolean subclasses,
                                                  java.lang.String queryName,
                                                  java.util.Map params,
                                                  java.sql.Connection conn,
                                                  int fetchThreshold,
                                                  int fetchBatchSize)
                                           throws java.sql.SQLException

  Override this method to customize obtaining a result for a named query. Returns null by default.

    `java.sql.SQLException`

### load

    public boolean load(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
                        com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store,
                        com.solarmetric.rd.kodo.impl.jdbc.runtime.Result result)
                 throws java.sql.SQLException

  Override this method to customize loading a result into an instance. Return true if this mapping handles the load; false if normal loading should procede after calling this method. Returns false by default.

    `java.sql.SQLException`

### getDataStoreValue

    public java.lang.Object getDataStoreValue(java.lang.Object oid)

  Translate the given oid into primary key column values.

### getObjectId

    public java.lang.Object getObjectId(com.solarmetric.rd.kodo.impl.jdbc.runtime.Result res,
                                        com.solarmetric.rd.kodo.impl.jdbc.schema.Column[] cols)
                                 throws java.sql.SQLException

  Return the oid value stored in the given columns of the given result.

  Parameters:
    `res` - extract the oid from the current row of this result
    `cols` - the field-order columns to extract the oid from
    `java.sql.SQLException`

### newInstance

    public com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping newInstance(com.solarmetric.rd.kodo.meta.ClassMetaData meta)

  Return a new instance of this class.

### createTable

    protected com.solarmetric.rd.kodo.impl.jdbc.schema.Table createTable(com.solarmetric.rd.kodo.impl.jdbc.schema.Schema schema)

  Create a new table for this mapping.

### getUseClassMapping

    public java.lang.String getUseClassMapping()

### setUseClassMapping

    public void setUseClassMapping(java.lang.String map)

### getUseVersionIndicator

    public java.lang.String getUseVersionIndicator()

### setUseVersionIndicator

    public void setUseVersionIndicator(java.lang.String ind)

### getUseClassIndicator

    public java.lang.String getUseClassIndicator()

### setUseClassIndicator

    public void setUseClassIndicator(java.lang.String ind)

### getRefDeleteAction

    public int getRefDeleteAction()

### isRefDeleteActionDeferred

    public boolean isRefDeleteActionDeferred()

### setRefDeleteAction

    public void setRefDeleteAction(int action,
                                   boolean deferred)

### getPMClassLoader

    public java.lang.ClassLoader getPMClassLoader()

  Description copied from interface: `ClassMetaData`
  The class persistence manager loader used when parsing this metadata. The class metadata should use this loader when loading metadata for its superclass and field types.

  Specified by:
    `getPMClassLoader` in interface `ClassMetaData`

### setPMClassLoader

    public void setPMClassLoader(java.lang.ClassLoader loader)

  Description copied from interface: `ClassMetaData`
  The class persistence manager loader used when parsing this metadata. The class metadata should use this loader when loading metadata for its superclass and field types.

  Specified by:
    `setPMClassLoader` in interface `ClassMetaData`

### getValidate

    public boolean getValidate()

  Description copied from interface: `ClassMetaData`
  Return true if the metadata will validate itself when resolved.

  Specified by:
    `getValidate` in interface `ClassMetaData`

### setValidate

    public void setValidate(boolean validate)

  Description copied from interface: `ClassMetaData`
  Set to false to turn off validation on resolve.

  Specified by:
    `setValidate` in interface `ClassMetaData`

### getRepository

    public com.solarmetric.rd.kodo.meta.JDOMetaDataRepository getRepository()

  Description copied from interface: `ClassMetaData`
  Return the owning repository.

  Specified by:
    `getRepository` in interface `ClassMetaData`

### setRepository

    public void setRepository(com.solarmetric.rd.kodo.meta.JDOMetaDataRepository repos)

  The supplied repository must be a `MappingRepository`.

  Specified by:
    `setRepository` in interface `ClassMetaData`

### getMappingRepository

    public com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository getMappingRepository()

  Convenience method to make casting from `getRepository()` unnecessary.

  Specified by:
    `getMappingRepository` in class `Mapping`

### getSourceFile

    public java.io.File getSourceFile()

  Description copied from interface: `ClassMetaData`
  Return the source file the metadata was parsed from, if any.

  Specified by:
    `getSourceFile` in interface `ClassMetaData`

### setSourceFile

    public void setSourceFile(java.io.File file)

  Description copied from interface: `ClassMetaData`
  Set the source file the metadata was parsed from.

  Specified by:
    `setSourceFile` in interface `ClassMetaData`

### getDescribedType

    public java.lang.Class getDescribedType()

  Description copied from interface: `ClassMetaData`
  Return the persistence capable class described by this metadata.

  Specified by:
    `getDescribedType` in interface `ClassMetaData`

### setDescribedType

    public void setDescribedType(java.lang.Class type)

  Description copied from interface: `ClassMetaData`
  Return the persistence capable class described by this metadata.

  Specified by:
    `setDescribedType` in interface `ClassMetaData`

### getPCSuperclass

    public java.lang.Class getPCSuperclass()

  Description copied from interface: `ClassMetaData`
  Return the persistence capable superclass of the described type, or null if the metadata did not specify one.

  Specified by:
    `getPCSuperclass` in interface `ClassMetaData`

### setPCSuperclass

    public void setPCSuperclass(java.lang.Class pc)

  Description copied from interface: `ClassMetaData`
  Set the persistence capable superclass of the described type.

  Specified by:
    `setPCSuperclass` in interface `ClassMetaData`

### getPCSuperclassMetaData

    public com.solarmetric.rd.kodo.meta.ClassMetaData getPCSuperclassMetaData()

  Description copied from interface: `ClassMetaData`
  Return the metadata for the persistence capable superclass of the described type, or null if the metadata did not specify one.

  Specified by:
    `getPCSuperclassMetaData` in interface `ClassMetaData`

### getPCSuperclassMapping

    public com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping getPCSuperclassMapping()

  Convenience method to make casting from `getPCSuperclassMetaData()` unnecessary.

### getPCSubclassMappings

    public com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping[] getPCSubclassMappings()

  Return all known subclass mappings.

### setPCSuperclassMapping

    public void setPCSuperclassMapping(com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping superMapping)

  Set the superclass mapping. This is used before reading mappings from `ClassMappingInfo`s.

### getIdentityType

    public int getIdentityType()

  Description copied from interface: `ClassMetaData`
  Return the type of JDO identity being used. This will be one of:
  - `ClassMetaData.ID_DATASTORE`: identity managed by the data store and independent of the fields of the instance
  - `ClassMetaData.ID_APPLICATION`: identity managed by the application and defined by one or more fields of the instance
  - `ClassMetaData.ID_NONE`: identity managed by the data store to guarantee uniqueness in the JVM, but not necessarily in the data store; this is rarely used
  If unspecified, defaults to `ClassMetaData.ID_DATASTORE`.

  Specified by:
    `getIdentityType` in interface `ClassMetaData`

### setIdentityType

    public void setIdentityType(int type)

  Description copied from interface: `ClassMetaData`
  Set the type of JDO identity used by this class.

  Specified by:
    `setIdentityType` in interface `ClassMetaData`
  See Also:
    `ClassMetaData.getIdentityType()`

### getObjectIdClass

    public java.lang.Class getObjectIdClass()

  Description copied from interface: `ClassMetaData`
  Return the metadata-specified class to use for the object ID, or null if not specified.

  Specified by:
    `getObjectIdClass` in interface `ClassMetaData`

### setObjectIdClass

    public void setObjectIdClass(java.lang.Class cls)

  Description copied from interface: `ClassMetaData`
  Set the metadata-specified class to use for the object ID.

  Specified by:
    `setObjectIdClass` in interface `ClassMetaData`

### getRequiresExtent

    public boolean getRequiresExtent()

  Description copied from interface: `ClassMetaData`
  Return true if the type requires management via extent. If false, the `PersistenceManager.getExtent(java.lang.Class, boolean)` method cannot be used for this class. Defaults to true.

  Specified by:
    `getRequiresExtent` in interface `ClassMetaData`

### setRequiresExtent

    public void setRequiresExtent(boolean req)

  Description copied from interface: `ClassMetaData`
  Set whether the type requires extent management.

  Specified by:
    `setRequiresExtent` in interface `ClassMetaData`

### getFields

    public com.solarmetric.rd.kodo.meta.FieldMetaData[] getFields()

  Description copied from interface: `ClassMetaData`
  Return all field metadatas, including superclass fields.

  Specified by:
    `getFields` in interface `ClassMetaData`

### getPrimaryKeyFields

    public com.solarmetric.rd.kodo.meta.FieldMetaData[] getPrimaryKeyFields()

  Description copied from interface: `ClassMetaData`
  Return primary key fields, or empty array if none.

  Specified by:
    `getPrimaryKeyFields` in interface `ClassMetaData`

### getDeclaredFields

    public com.solarmetric.rd.kodo.meta.FieldMetaData[] getDeclaredFields()

  Description copied from interface: `ClassMetaData`
  Return only the fields for this class, without superclass fields.

  Specified by:
    `getDeclaredFields` in interface `ClassMetaData`

### getField

    public com.solarmetric.rd.kodo.meta.FieldMetaData getField(int index)

  Description copied from interface: `ClassMetaData`
  Return the metadata for the persistent or transactional field with the given absolute index.

  Specified by:
    `getField` in interface `ClassMetaData`
  Returns:
    the field's metadata, or null if not found

### getDeclaredField

    public com.solarmetric.rd.kodo.meta.FieldMetaData getDeclaredField(int index)

  Description copied from interface: `ClassMetaData`
  Return the metadata for the persistent or transactional field with the given relative index.

  Specified by:
    `getDeclaredField` in interface `ClassMetaData`
  Returns:
    the field's metadata, or null if not found

### getField

    public com.solarmetric.rd.kodo.meta.FieldMetaData getField(java.lang.String name)

  Description copied from interface: `ClassMetaData`
  Return the metadata for the persistent or transactional field with the given name. This method can only be used at runtime.

  Specified by:
    `getField` in interface `ClassMetaData`
  Returns:
    the field's metadata, or null if not found

### getDeclaredField

    public com.solarmetric.rd.kodo.meta.FieldMetaData getDeclaredField(java.lang.String name)

  Description copied from interface: `ClassMetaData`
  Return the metadata for the persistent or transactional field with the given name, without including superclass fields.

  Specified by:
    `getDeclaredField` in interface `ClassMetaData`
  Returns:
    the field's metadata, or null if not found

### getDeclaredUnmanagedFields

    public com.solarmetric.rd.kodo.meta.FieldMetaData[] getDeclaredUnmanagedFields()

  Description copied from interface: `ClassMetaData`
  Return any fields that were added as non-managed. All other methods to get fields return only those that are managed.

  Specified by:
    `getDeclaredUnmanagedFields` in interface `ClassMetaData`

### addDeclaredField

    public void addDeclaredField(com.solarmetric.rd.kodo.meta.FieldMetaData field)

  Description copied from interface: `ClassMetaData`
  Add a persistent or transactional field to this class.

  Specified by:
    `addDeclaredField` in interface `ClassMetaData`

### removeDeclaredField

    public boolean removeDeclaredField(com.solarmetric.rd.kodo.meta.FieldMetaData field)

  Description copied from interface: `ClassMetaData`
  Remove the given field from management.

  Specified by:
    `removeDeclaredField` in interface `ClassMetaData`
  Returns:
    true if the field was removed, false otherwise

### isEnhanced

    public boolean isEnhanced()

  Description copied from interface: `ClassMetaData`
  Returns true if the class has been enhanced.

  Specified by:
    `isEnhanced` in interface `ClassMetaData`

### isInstanceCallbacks

    public boolean isInstanceCallbacks()

  Description copied from interface: `ClassMetaData`
  Return true if the class implements `InstanceCallbacks`.

  Specified by:
    `isInstanceCallbacks` in interface `ClassMetaData`

### getCanCache

    public boolean getCanCache()

  Description copied from interface: `ClassMetaData`
  Return true if the `ClassMetaData.CAN_CACHE` extension key is true.

  Specified by:
    `getCanCache` in interface `ClassMetaData`

### setCanCache

    public void setCanCache(boolean cacheable)

  Description copied from interface: `ClassMetaData`
  Set the value of the `ClassMetaData.CAN_CACHE` standard extension.

  Specified by:
    `setCanCache` in interface `ClassMetaData`

### compareTo

    public int compareTo(java.lang.Object other)

  Specified by:
    `compareTo` in interface `java.lang.Comparable`

### getFieldMappings

    public com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping[] getFieldMappings()

### getDeclaredFieldMappings

    public com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping[] getDeclaredFieldMappings()

### getPrimaryKeyFieldMappings

    public com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping[] getPrimaryKeyFieldMappings()

### getFieldMapping

    public com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping getFieldMapping(int index)

### getDeclaredFieldMapping

    public com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping getDeclaredFieldMapping(int index)

### getFieldMapping

    public com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping getFieldMapping(java.lang.String name)

### getDeclaredFieldMapping

    public com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping getDeclaredFieldMapping(java.lang.String name)

### addDeclaredFieldMapping

    public void addDeclaredFieldMapping(com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping field)

### removeDeclaredFieldMapping

    public boolean removeDeclaredFieldMapping(com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping field)

### resolve

    public boolean resolve()

  Description copied from interface: `ClassMetaData`
  For implementation use. This method resolves superclass information, caches fields, and resolves fields that might be other first class objects. It requires access to a respository. It is called automatically through operations that require resolution to complete.

  Specified by:
    `resolve` in interface `ClassMetaData`
  Returns:
    true if any subclasses should resolve their information too

### invalidateResolve

    public void invalidateResolve()

  Description copied from interface: `ClassMetaData`
  For implemntation use. Concrete implementations should call this method when changing something that requires the class to be re-resolved.

  Specified by:
    `invalidateResolve` in interface `ClassMetaData`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### isEmpty

    public boolean isEmpty()

  Description copied from interface: `Extensions`
  Return true if there are no keys for any vendor.

  Specified by:
    `isEmpty` in interface `Extensions`

### getExtensionVendors

    public java.lang.String[] getExtensionVendors()

  Description copied from interface: `Extensions`
  Return all vendors who have extension keys at this level.

  Specified by:
    `getExtensionVendors` in interface `Extensions`

### getExtensionKeys

    public java.lang.String[] getExtensionKeys()

  Description copied from interface: `Extensions`
  Return all extension keys for vendor `kodo`.

  Specified by:
    `getExtensionKeys` in interface `Extensions`

### getExtensionKeys

    public java.lang.String[] getExtensionKeys(java.lang.String vendor)

  Description copied from interface: `Extensions`
  Return all extension keys for the given vendor.

  Specified by:
    `getExtensionKeys` in interface `Extensions`

### hasExtension

    public boolean hasExtension(java.lang.String key)

  Description copied from interface: `Extensions`
  Return true if the extension with the given key exists for vendor `kodo`.

  Specified by:
    `hasExtension` in interface `Extensions`

### hasExtension

    public boolean hasExtension(java.lang.String vendor,
                                java.lang.String key)

  Description copied from interface: `Extensions`
  Return true if the extension with the given key exists for the given vendor.

  Specified by:
    `hasExtension` in interface `Extensions`

### addExtension

    public void addExtension(java.lang.String key,
                             java.lang.Object value)

  Description copied from interface: `Extensions`
  Add a `kodo` vendor extension to this entity.

  Specified by:
    `addExtension` in interface `Extensions`

### addExtension

    public void addExtension(java.lang.String vendor,
                             java.lang.String key,
                             java.lang.Object value)

  Description copied from interface: `Extensions`
  Add a vendor extension to this entity.

  Specified by:
    `addExtension` in interface `Extensions`

### removeExtension

    public boolean removeExtension(java.lang.String key)

  Description copied from interface: `Extensions`
  Remove a `kodo` vendor extension to this entity.

  Specified by:
    `removeExtension` in interface `Extensions`

### removeExtension

    public boolean removeExtension(java.lang.String vendor,
                                   java.lang.String key)

  Description copied from interface: `Extensions`
  Remove a vendor extension to this entity.

  Specified by:
    `removeExtension` in interface `Extensions`

### getObjectExtension

    public java.lang.Object getObjectExtension(java.lang.String key)

  Description copied from interface: `Extensions`
  Get the value of a `kodo` extension.

  Specified by:
    `getObjectExtension` in interface `Extensions`

### getObjectExtension

    public java.lang.Object getObjectExtension(java.lang.String vendor,
                                               java.lang.String key)

  Description copied from interface: `Extensions`
  Get the value of an extension.

  Specified by:
    `getObjectExtension` in interface `Extensions`

### getStringExtension

    public java.lang.String getStringExtension(java.lang.String key)

  Description copied from interface: `Extensions`
  Get the value as a string.

  Specified by:
    `getStringExtension` in interface `Extensions`

### getStringExtension

    public java.lang.String getStringExtension(java.lang.String vendor,
                                               java.lang.String key)

  Description copied from interface: `Extensions`
  Get the value as a string.

  Specified by:
    `getStringExtension` in interface `Extensions`

### getIntExtension

    public int getIntExtension(java.lang.String key)

  Description copied from interface: `Extensions`
  Get the value as an int.

  Specified by:
    `getIntExtension` in interface `Extensions`

### getIntExtension

    public int getIntExtension(java.lang.String vendor,
                               java.lang.String key)

  Description copied from interface: `Extensions`
  Get the value as an int.

  Specified by:
    `getIntExtension` in interface `Extensions`

### getDoubleExtension

    public double getDoubleExtension(java.lang.String key)

  Description copied from interface: `Extensions`
  Get the value as a double.

  Specified by:
    `getDoubleExtension` in interface `Extensions`

### getDoubleExtension

    public double getDoubleExtension(java.lang.String vendor,
                                     java.lang.String key)

  Description copied from interface: `Extensions`
  Get the value as a double.

  Specified by:
    `getDoubleExtension` in interface `Extensions`

### getBooleanExtension

    public boolean getBooleanExtension(java.lang.String key)

  Description copied from interface: `Extensions`
  Get the value as a boolean.

  Specified by:
    `getBooleanExtension` in interface `Extensions`

### getBooleanExtension

    public boolean getBooleanExtension(java.lang.String vendor,
                                       java.lang.String key)

  Description copied from interface: `Extensions`
  Get the value as a boolean.

  Specified by:
    `getBooleanExtension` in interface `Extensions`

### getEmbeddedExtensions

    public com.solarmetric.rd.kodo.meta.Extensions getEmbeddedExtensions(java.lang.String key,
                                                                         boolean create)

  Description copied from interface: `Extensions`
  Return the embedded extensions under the extension with the given key. If there are no embedded extensions, a new extensions object will be created and returned if the `create` parameter is true.

  Specified by:
    `getEmbeddedExtensions` in interface `Extensions`

### getEmbeddedExtensions

    public com.solarmetric.rd.kodo.meta.Extensions getEmbeddedExtensions(java.lang.String vendor,
                                                                         java.lang.String key,
                                                                         boolean create)

  Description copied from interface: `Extensions`
  Return the embedded extensions under the extension with the given key. If there are no embedded extensions, a new extensions object will be created and returned if the `create` parameter is true.

  Specified by:
    `getEmbeddedExtensions` in interface `Extensions`

### removeEmbeddedExtensions

    public boolean removeEmbeddedExtensions(java.lang.String key)

  Description copied from interface: `Extensions`
  Remove the embedded extensions for the given key.

  Specified by:
    `removeEmbeddedExtensions` in interface `Extensions`

### removeEmbeddedExtensions

    public boolean removeEmbeddedExtensions(java.lang.String vendor,
                                            java.lang.String key)

  Description copied from interface: `Extensions`
  Remove the embedded extensions for the given key.

  Specified by:
    `removeEmbeddedExtensions` in interface `Extensions`

Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.