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.map
Class BaseClassMapping

    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
                        |
                        +--com.solarmetric.rd.kodo.impl.jdbc.meta.map.BaseClassMapping

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

public class BaseClassMapping
extends ClassMapping

Class mapping used for base classes in a persistent inheritance tree.

Field Summary
`static java.lang.String` | `TYPE`

Fields inherited from class com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping
`REF_DELETE_ACTION, USE_CLASS_IND, USE_CLASS_MAP, USE_VERSION_IND`

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
`BaseClassMapping(com.solarmetric.rd.kodo.meta.ClassMetaData meta)` Constructor.

Method Summary
`void` | `delete(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm, com.solarmetric.rd.kodo.impl.jdbc.runtime.RowManager rm)` Set the where values appropriately to delete the proper instance, and set all relations on non-secondary tables as updates.
`boolean` | `fromMappingInfo(com.solarmetric.rd.kodo.impl.jdbc.meta.MappingInfo info, boolean adapt)` Deserialize this mapping from a simple `MappingInfo` instance parsed from XML or some other format.
`com.solarmetric.rd.kodo.impl.jdbc.meta.ClassIndicator` | `getClassIndicator()` Return the class indicator for this class.
`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.
`java.lang.String` | `getMappingType()` Return the abbreviated name of this mapping, or the full class name if it is a custom mapping.
`com.solarmetric.rd.kodo.impl.jdbc.schema.Table` | `getTable()` Return the mapping's data table.
`com.solarmetric.rd.kodo.impl.jdbc.meta.VersionIndicator` | `getVersionIndicator()` Return the version indicator for this class.
`void` | `insert(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm, com.solarmetric.rd.kodo.impl.jdbc.runtime.RowManager rm)` Set values for the mapping into the proper rows.
`void` | `joinSuperclass(com.solarmetric.rd.kodo.impl.jdbc.runtime.Joins joins)` Join the mapping to its superclass table.
`boolean` | `map()` Map a new instance of this mapping type.
`void` | `refSchemaComponents()` Increment the reference count of all used schema components.
`void` | `reverseMap(com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGroup schema, com.solarmetric.rd.kodo.impl.jdbc.meta.ReverseMappingTool tool)` Create mappings from the schema, using the given tool.
`void` | `setClassIndicator(com.solarmetric.rd.kodo.impl.jdbc.meta.ClassIndicator cls)` Set the class indicator for this class.
`void` | `setTable(com.solarmetric.rd.kodo.impl.jdbc.schema.Table table)` Set the table for the mapping.
`void` | `setVersionIndicator(com.solarmetric.rd.kodo.impl.jdbc.meta.VersionIndicator version)` Set the version indicator for this class.
`void` | `toMappingInfo(com.solarmetric.rd.kodo.impl.jdbc.meta.MappingInfo info)` Serialize this mapping to a simple `MappingInfo` instance for transfer to XML or some other format.
`void` | `update(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm, com.solarmetric.rd.kodo.impl.jdbc.runtime.RowManager rm)` Set values for the mapping into the proper rows.

Methods inherited from class com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping
`addDeclaredField, addDeclaredFieldMapping, addExtension, addExtension, compareTo, createTable, getBooleanExtension, getBooleanExtension, getCanCache, getDataStoreValue, getDeclaredField, getDeclaredField, getDeclaredFieldMapping, getDeclaredFieldMapping, getDeclaredFieldMappings, getDeclaredFields, getDeclaredUnmanagedFields, getDefaults, getDescribedType, getDoubleExtension, getDoubleExtension, getEmbeddedExtensions, getEmbeddedExtensions, getEmbeddingMapping, getExtensionKeys, getExtensionKeys, getExtensionVendors, getField, getField, getFieldMapping, getFieldMapping, getFieldMappings, getFields, getIdentityType, getIntExtension, getIntExtension, getMappingInfo, getMappingRepository, getMetaData, getObjectExtension, getObjectExtension, getObjectId, getObjectIdClass, getPCSubclassMappings, getPCSuperclass, getPCSuperclassMapping, getPCSuperclassMetaData, getPMClassLoader, getPrimaryKeyFieldMappings, getPrimaryKeyFields, getRefDeleteAction, getRepository, getRequiresExtent, getSourceFile, getStringExtension, getStringExtension, getUseClassIndicator, getUseClassMapping, getUseVersionIndicator, getValidate, hasExtension, hasExtension, invalidateResolve, isEmpty, isEnhanced, isInstanceCallbacks, isRefDeleteActionDeferred, load, load, load, load, newInstance, newInstance, removeDeclaredField, removeDeclaredFieldMapping, removeEmbeddedExtensions, removeEmbeddedExtensions, removeExtension, removeExtension, resolve, setCanCache, setDescribedType, setIdentityType, setMappingInfo, setObjectIdClass, setPCSuperclass, setPCSuperclassMapping, setPMClassLoader, setRefDeleteAction, setRepository, setRequiresExtent, setSourceFile, setUseClassIndicator, setUseClassMapping, setUseVersionIndicator, setValidate, toString`

Methods inherited from class com.solarmetric.rd.kodo.impl.jdbc.meta.Mapping
`checkIndex, createColumn, delete, getDBDictionary, getForeignKey, getLog, getSchemaGroup, insert, invalidMapping, isCustomDelete, isCustomInsert, isCustomUpdate, setForeignKey, 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

### TYPE

    public static final java.lang.String TYPE

See Also:
  Constant Field Values

Constructor Detail

### BaseClassMapping

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

  Constructor. Supply underlying metadata.

Method Detail

### setTable

    public void setTable(com.solarmetric.rd.kodo.impl.jdbc.schema.Table table)

  Set the table for the mapping.

### getVersionIndicator

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

  Description copied from class: `ClassMapping`
  Return the version indicator for this class. Subclass mappings should delegate this method to their superclass.

  Specified by:
    `getVersionIndicator` in class `ClassMapping`

### setVersionIndicator

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

  Description copied from class: `ClassMapping`
  Set the version indicator for this class. Subclass mappings should delegate this method to their superclass.

  Specified by:
    `setVersionIndicator` in class `ClassMapping`

### getClassIndicator

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

  Description copied from class: `ClassMapping`
  Return the class indicator for this class. Subclass mappings should delegate this method to their superclass.

  Specified by:
    `getClassIndicator` in class `ClassMapping`

### setClassIndicator

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

  Description copied from class: `ClassMapping`
  Set the class indicator for this class. Subclass mappings should delegate this method to their superclass.

  Specified by:
    `setClassIndicator` in class `ClassMapping`

### getTable

    public com.solarmetric.rd.kodo.impl.jdbc.schema.Table getTable()

  Description copied from class: `Mapping`
  Return the mapping's data table.

  Specified by:
    `getTable` in class `Mapping`

### getFieldOrderPrimaryKeyColumns

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

  Description copied from class: `ClassMapping`
  Return the primary key columns of this mapping's table in the same order that the primary key fields are declared in the class.

  Specified by:
    `getFieldOrderPrimaryKeyColumns` in class `ClassMapping`

### getMappingType

    public java.lang.String getMappingType()

  Description copied from class: `Mapping`
  Return the abbreviated name of this mapping, or the full class name if it is a custom mapping. Returns the full class name by default.

  Overrides:
    `getMappingType` in class `Mapping`

### toMappingInfo

    public void toMappingInfo(com.solarmetric.rd.kodo.impl.jdbc.meta.MappingInfo info)

  Description copied from class: `Mapping`
  Serialize this mapping to a simple `MappingInfo` instance for transfer to XML or some other format.

  Specified by:
    `toMappingInfo` in class `Mapping`

### fromMappingInfo

    public boolean fromMappingInfo(com.solarmetric.rd.kodo.impl.jdbc.meta.MappingInfo info,
                                   boolean adapt)

  Description copied from class: `Mapping`
  Deserialize this mapping from a simple `MappingInfo` instance parsed from XML or some other format. If the info is incompatible and `adapt` is true, try to adapt to the new info, else return false. This method must validate the given mapping information using the `SchemaGroup.findTable(java.lang.String)` method to find any needed tables, the `Table.getColumn(java.lang.String)` method to retrieve columns from those tables, and the `Column.isCompatible(int, int)` method to check all column types. This is important, as some schema groups use these methods to build themselves up dynamically rather than reading schema information from the database.

  Specified by:
    `fromMappingInfo` in class `Mapping`

### map

    public boolean map()

  Description copied from class: `Mapping`
  Map a new instance of this mapping type. If the underlying metadata cannot be mapped using this type, return false.

  Specified by:
    `map` in class `Mapping`

### reverseMap

    public void reverseMap(com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGroup schema,
                           com.solarmetric.rd.kodo.impl.jdbc.meta.ReverseMappingTool tool)

  Description copied from class: `Mapping`
  Create mappings from the schema, using the given tool. Implement this method if you want the class mapping to be a candidate when reverse-mapping a schema to java classes. Note that this method will be invoked on a template instance, so you cannot rely on the metadata or owning repository being set.

  Overrides:
    `reverseMap` in class `Mapping`

### refSchemaComponents

    public void refSchemaComponents()

  Description copied from class: `Mapping`
  Increment the reference count of all used schema components.

  Specified by:
    `refSchemaComponents` in class `Mapping`

### joinSuperclass

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

  Description copied from class: `ClassMapping`
  Join the mapping to its superclass table.

  Specified by:
    `joinSuperclass` in class `ClassMapping`

### insert

    public void insert(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
                       com.solarmetric.rd.kodo.impl.jdbc.runtime.RowManager rm)
                throws java.sql.SQLException

  Description copied from class: `Mapping`
  Set values for the mapping into the proper rows. For class mappings, this method will be called only after the corresponding method has been called for all fields of this mapping.

  Specified by:
    `insert` in class `Mapping`
    `java.sql.SQLException`

### update

    public void update(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
                       com.solarmetric.rd.kodo.impl.jdbc.runtime.RowManager rm)
                throws java.sql.SQLException

  Description copied from class: `Mapping`
  Set values for the mapping into the proper rows.

  Specified by:
    `update` in class `Mapping`
    `java.sql.SQLException`
  See Also:
    `Mapping.insert(com.solarmetric.rd.kodo.runtime.StateManagerImpl, com.solarmetric.rd.kodo.impl.jdbc.runtime.RowManager)`

### delete

    public void delete(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
                       com.solarmetric.rd.kodo.impl.jdbc.runtime.RowManager rm)
                throws java.sql.SQLException

  Description copied from class: `Mapping`
  Set the where values appropriately to delete the proper instance, and set all relations on non-secondary tables as updates. This allows foreign key analysis.

  Specified by:
    `delete` in class `Mapping`
    `java.sql.SQLException`
  See Also:
    `Mapping.insert(com.solarmetric.rd.kodo.runtime.StateManagerImpl, com.solarmetric.rd.kodo.impl.jdbc.runtime.RowManager)`

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.