Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 3.3.5 generated on August 31 2005
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## kodo.jdbc.meta
Interface MappingFactory

All Known Implementing Classes:
  DBMappingFactory, FileMappingFactory, MetaDataMappingFactory

public interface MappingFactory

Factory for object-relational mapping information. Users can plug in their own factory implementation, or rely on the ones provided. Most mapping factories will probably implement the `Configurable` interface to receive the system configuration on construction.

Method Summary
`void` | `addExtensionKeys(Collection exts, Mapping mapping)` Add any metadata extension keys that this MappingFactory uses to store mapping information.
`boolean` | `dropMappings(ClassMetaData[] types)` Delete the given mappings.
`boolean` | `isSingleOperation()` Return true if this factory reads and writes all system mappings at once.
`void` | `readMapping(ClassMetaData type, MappingInfoRepository repos)` Read the object-relational mapping for the given persistent type and add it to the given repository.
`boolean` | `revertMappings(ClassMetaData[] types)` Revert the mappings to their last saved state, or return false if any cannot be reverted.
`void` | `storeMappings(MappingInfoRepository mappings, JDOMetaDataRepository repos)` Store any changes made to the given mappings, including their field mappings.

Method Detail

### 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(kodo.meta.ClassMetaData, kodo.jdbc.meta.MappingInfoRepository)` and `revertMappings(kodo.meta.ClassMetaData[])` calls that pass in a null meta data argument.

### readMapping

    public void readMapping(ClassMetaData type,
                            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(MappingInfoRepository mappings,
                              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(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(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

### addExtensionKeys

    public void addExtensionKeys(Collection exts,
                                 Mapping mapping)

  Add any metadata extension keys that this MappingFactory uses to store mapping information.
  Parameters:
    `exts` - the collection to which to add the extension keys
    `mapping` - the mapping for which to add the keys
  Since:
    3.1.3

Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 3.3.5 generated on August 31 2005
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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