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
Interface MappingFactory

All Known Implementing Classes:
  DBMappingFactory, FileMappingFactory, MetaDataMappingFactory, SingleFileMappingFactory, SingleRowDBMappingFactory

public interface MappingFactory

Factory for object-relational mapping information. Users can plug in their own factory implementation, or rely on the ones provided.

Method Summary
`boolean` | `dropMappings(com.solarmetric.rd.kodo.meta.ClassMetaData[] types)` Delete the given mappings.
`com.solarmetric.rd.kodo.impl.jdbc.meta.ClassIndicator[]` | `getAvailableClassIndicators()` Return a list of all available class indicators, ordered from most to least general.
`com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping[]` | `getAvailableClassMappings()` Return a list of all available class mappings, ordered from most to least general.
`com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping[]` | `getAvailableFieldMappings()` Return a list of all available field mappings, ordered from least to most general.
`com.solarmetric.rd.kodo.impl.jdbc.meta.VersionIndicator[]` | `getAvailableVersionIndicators()` Return a list of all available version indicators, ordered from most to least general.
`boolean` | `isSingleOperation()` Return true if this factory reads and writes all system mappings at once.
`void` | `readMapping(com.solarmetric.rd.kodo.meta.ClassMetaData type, com.solarmetric.rd.kodo.impl.jdbc.meta.MappingInfoRepository repos)` Read the object-relational mapping for the given persistent type and add it to the given repository.
`boolean` | `revertMappings(com.solarmetric.rd.kodo.meta.ClassMetaData[] types)` Revert the mappings to their last saved state, or return false if any cannot be reverted.
`void` | `setConfiguration(com.solarmetric.rd.kodo.impl.jdbc.conf.JDBCConfiguration conf)` Set the configuration for the factory.
`void` | `storeMappings(com.solarmetric.rd.kodo.impl.jdbc.meta.MappingInfoRepository mappings, com.solarmetric.rd.kodo.meta.JDOMetaDataRepository repos)` Store any changes made to the given mappings, including their field mappings.

Method Detail

### setConfiguration

    public void setConfiguration(com.solarmetric.rd.kodo.impl.jdbc.conf.JDBCConfiguration conf)

  Set the configuration for the factory.

### isSingleOperation

    public boolean isSingleOperation()

  Return true if this factory reads and writes all system mappings at once. Knowing this lets us optimize some operations. If a factory returns true to this method, then it should be able to handle `readMapping(com.solarmetric.rd.kodo.meta.ClassMetaData, com.solarmetric.rd.kodo.impl.jdbc.meta.MappingInfoRepository)` and `revertMappings(com.solarmetric.rd.kodo.meta.ClassMetaData[])` calls that pass in a null meta data argument.

### readMapping

    public void readMapping(com.solarmetric.rd.kodo.meta.ClassMetaData type,
                            com.solarmetric.rd.kodo.impl.jdbc.meta.MappingInfoRepository repos)

  Read the object-relational mapping for the given persistent type and add it to the given repository.

  Parameters:
    `type` - the type to read mapping information for
    `repos` - add the mapping information to this repository

### storeMappings

    public void storeMappings(com.solarmetric.rd.kodo.impl.jdbc.meta.MappingInfoRepository mappings,
                              com.solarmetric.rd.kodo.meta.JDOMetaDataRepository repos)

  Store any changes made to the given mappings, including their field mappings.

  Parameters:
    `mappings` - the changed mappings
    `repos` - can be used to access class metadata if needed

### dropMappings

    public boolean dropMappings(com.solarmetric.rd.kodo.meta.ClassMetaData[] types)

  Delete the given mappings.

  Parameters:
    `types` - the types to drop
  Returns:
    true if all mappings were dropped, false otherwise

### revertMappings

    public boolean revertMappings(com.solarmetric.rd.kodo.meta.ClassMetaData[] types)

  Revert the mappings to their last saved state, or return false if any cannot be reverted.

  Parameters:
    `types` - the types to revert
  Returns:
    true if all mappings were reverted, false otherwise

### getAvailableClassMappings

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

  Return a list of all available class mappings, ordered from most to least general.

### getAvailableVersionIndicators

    public com.solarmetric.rd.kodo.impl.jdbc.meta.VersionIndicator[] getAvailableVersionIndicators()

  Return a list of all available version indicators, ordered from most to least general.

### getAvailableClassIndicators

    public com.solarmetric.rd.kodo.impl.jdbc.meta.ClassIndicator[] getAvailableClassIndicators()

  Return a list of all available class indicators, ordered from most to least general.

### getAvailableFieldMappings

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

  Return a list of all available field mappings, ordered from least to most general. When creating a default mapping for a new field, we call the `Mapping.map()` method on a new instance of each returned mapping util one returns true, or until the list is exhausted. Implementations are free to use or add to the standard mappings list available from `FieldMapping.getDefaults()`.

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.