Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.5.8 generated on January 11 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.solarmetric.kodo.impl.jdbc.ormapping
Class Mapping

    java.lang.Object
      |
      +--com.solarmetric.kodo.impl.jdbc.ormapping.Mapping

Direct Known Subclasses:
  ClassMapping, FieldMapping

public abstract class Mapping
extends Object

Abstract base type for class and field mappings.

Field Summary
`(package private) static Localizer` | `_loc`
`(package private) static org.apache.commons.logging.Log` | `_log`
`static String` | `CUSTOM_MAPPING` Metadata extension key used identify a custom class mapping.
`protected DBDictionary` | `dict`
`static String` | `MAPPING` Metadata extension key used to install mappings onto metadata.
`static String` | `TABLE` Metadata extension key used to mark the name of the table a class or field is stored in.

Constructor Summary
`Mapping()`

Method Summary
`(package private) static String` | `checkExtension(Extensions exts, String key, String def)` Utility method to retrieve the value of the specified metadata extension, or return the default if not found.
`(package private) static ClassMapping` | `createMapping(ClassMetaData meta, JDBCConfiguration conf, ClassResolver resolver, DBDictionary dict)` Creates a ClassMapping for the given metadata.
`(package private) static FieldMapping` | `createMapping(FieldMetaData fmd, JDBCConfiguration conf, ClassResolver resolver, DBDictionary dict)` Creates a FieldMapping for the given metadata.
`static void` | `createMappings(Class[] types, JDBCConfiguration conf, ClassResolver resolver, DBDictionary dict)` Creates and installs a `ClassMapping` and `FieldMapping`s for the given types.
`static void` | `createMappings(Class[] types, JDBCConfiguration conf, ClassResolver resolver, DBDictionary dict, boolean skipNoMetadata)`
`(package private) static String` | `getClassName(ClassMetaData meta)` Utility method to return only the class name of the given type, without package.
`JDBCConfiguration` | `getConfiguration()` Return the configuration used to create this mapping.
`DBDictionary` | `getDictionary()` Return the dictionary used to create this mapping.
`(package private) static FieldMapping` | `getFieldMapping(FieldMetaData fmd, JDBCConfiguration conf, ClassResolver resolver, DBDictionary dict)` Returns a new FieldMapping object that can map `fmd`.
`static Mapping` | `getInstance(Extensions exts)` Return the Mapping bound to the given metadata.
`Table` | `getTable(String tableName)` Look up a Table object with the given `name`.
`(package private) void` | `install(Extensions exts, JDBCConfiguration conf, ClassResolver resolver, DBDictionary dict)` Installs this mapping on the given metadata.

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

Field Detail

### MAPPING

    public static final String MAPPING

  Metadata extension key used to install mappings onto metadata.

### CUSTOM_MAPPING

    public static final String CUSTOM_MAPPING

  Metadata extension key used identify a custom class mapping.

### TABLE

    public static final String TABLE

  Metadata extension key used to mark the name of the table a class or field is stored in.

### _loc

    static Localizer _loc

### _log

    static final org.apache.commons.logging.Log _log

### dict

    protected DBDictionary dict

Constructor Detail

### Mapping

    public Mapping()

Method Detail

### getInstance

    public static Mapping getInstance(Extensions exts)

  Return the Mapping bound to the given metadata. This method is usually not used in favor of the `getInstance` methods in `ClassMapping` and `FieldMapping`.

### createMappings

    public static void createMappings(Class[] types,
                                      JDBCConfiguration conf,
                                      ClassResolver resolver,
                                      DBDictionary dict)

  Creates and installs a `ClassMapping` and `FieldMapping`s for the given types. Note that for each class in the given array, all subclasses and related types of the class must also be included in the array.

### createMappings

    public static void createMappings(Class[] types,
                                      JDBCConfiguration conf,
                                      ClassResolver resolver,
                                      DBDictionary dict,
                                      boolean skipNoMetadata)

### createMapping

    static ClassMapping createMapping(ClassMetaData meta,
                                      JDBCConfiguration conf,
                                      ClassResolver resolver,
                                      DBDictionary dict)

  Creates a ClassMapping for the given metadata.

### createMapping

    static FieldMapping createMapping(FieldMetaData fmd,
                                      JDBCConfiguration conf,
                                      ClassResolver resolver,
                                      DBDictionary dict)

  Creates a FieldMapping for the given metadata.

### getFieldMapping

    static FieldMapping getFieldMapping(FieldMetaData fmd,
                                        JDBCConfiguration conf,
                                        ClassResolver resolver,
                                        DBDictionary dict)
                                 throws InstantiationException,
                                        IllegalAccessException

  Returns a new FieldMapping object that can map `fmd`. The returned value is not installed. Returns `null` if no appropriate mapping is found.

### install

    void install(Extensions exts,
                 JDBCConfiguration conf,
                 ClassResolver resolver,
                 DBDictionary dict)

  Installs this mapping on the given metadata.

### getConfiguration

    public JDBCConfiguration getConfiguration()

  Return the configuration used to create this mapping.

### getDictionary

    public DBDictionary getDictionary()

  Return the dictionary used to create this mapping.

### checkExtension

    static String checkExtension(Extensions exts,
                                 String key,
                                 String def)

  Utility method to retrieve the value of the specified metadata extension, or return the default if not found.

### getClassName

    static String getClassName(ClassMetaData meta)

  Utility method to return only the class name of the given type, without package. This is useful in auto-generating schema names.

### getTable

    public Table getTable(String tableName)

  Look up a Table object with the given `name`. The returned table is guaranteed to be unique per Configuration.

Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.5.8 generated on January 11 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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