SolarMetric Kodo JDO 3.3.5 generated on August 31 2005

kodo.jdbc.meta
Class FileMappingFactory

java.lang.Object
  |
  +--kodo.jdbc.meta.FileMappingFactory
All Implemented Interfaces:
Configurable, MappingFactory

public class FileMappingFactory
extends Object
implements MappingFactory, Configurable

Factory that uses multiple XML mapping files to construct the system mappings. By default, the placement of the mapping files mirrors the placement of the JDO metadata.


Constructor Summary
FileMappingFactory()
           
 
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.
 void endConfiguration()
          Invoked upon completion of bean property configuration for this object.
 String getFileName()
          The name of the file to use in single-file mode.
 boolean getSourceIsSystemId()
          Whether to set the source name as the system id when parsing metadata.
 boolean isSingleFile()
          Whether to use a single top-level mapping file.
 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 setConfiguration(Configuration conf)
          Invoked prior to setting bean properties.
 void setFileName(String fileName)
          The name of the file to use in single-file mode.
 void setSingleFile(boolean singleFile)
          Whether to use a single top-level mapping file.
 void setSourceIsSystemId(boolean systemId)
          Whether to set the source name as the system id when parsing metadata.
 void startConfiguration()
          Invoked before bean property configuration is begun on this object.
 void storeMappings(MappingInfoRepository mappings, JDOMetaDataRepository repos)
          Store any changes made to the given mappings, including their field mappings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileMappingFactory

public FileMappingFactory()
Method Detail

isSingleFile

public boolean isSingleFile()
Whether to use a single top-level mapping file. If false then mapping files mirror the placement of the corresponding JDO metadata files.

setSingleFile

public void setSingleFile(boolean singleFile)
Whether to use a single top-level mapping file. If false then mapping files mirror the placement of the corresponding JDO metadata files.

getFileName

public String getFileName()
The name of the file to use in single-file mode. Defaults to package.mapping.

setFileName

public void setFileName(String fileName)
The name of the file to use in single-file mode. Defaults to package.mapping.

getSourceIsSystemId

public boolean getSourceIsSystemId()
Whether to set the source name as the system id when parsing metadata.

setSourceIsSystemId

public void setSourceIsSystemId(boolean systemId)
Whether to set the source name as the system id when parsing metadata.

setConfiguration

public void setConfiguration(Configuration conf)
Description copied from interface: Configurable
Invoked prior to setting bean properties.
Specified by:
setConfiguration in interface Configurable

startConfiguration

public void startConfiguration()
Description copied from interface: Configurable
Invoked before bean property configuration is begun on this object.
Specified by:
startConfiguration in interface Configurable

endConfiguration

public void endConfiguration()
Description copied from interface: Configurable
Invoked upon completion of bean property configuration for this object.
Specified by:
endConfiguration in interface Configurable

isSingleOperation

public boolean isSingleOperation()
Description copied from interface: MappingFactory
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 MappingFactory.readMapping(kodo.meta.ClassMetaData, kodo.jdbc.meta.MappingInfoRepository) and MappingFactory.revertMappings(kodo.meta.ClassMetaData[]) calls that pass in a null meta data argument.
Specified by:
isSingleOperation in interface MappingFactory

readMapping

public void readMapping(ClassMetaData type,
                        MappingInfoRepository repos)
Description copied from interface: MappingFactory
Read the object-relational mapping for the given persistent type and add it to the given repository.
Specified by:
readMapping in interface MappingFactory
Following copied from interface: kodo.jdbc.meta.MappingFactory
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)
Description copied from interface: MappingFactory
Store any changes made to the given mappings, including their field mappings.
Specified by:
storeMappings in interface MappingFactory
Following copied from interface: kodo.jdbc.meta.MappingFactory
Parameters:
mappings - the changed mappings
repos - can be used to access class metadata if needed

dropMappings

public boolean dropMappings(ClassMetaData[] types)
Description copied from interface: MappingFactory
Delete the given mappings.
Specified by:
dropMappings in interface MappingFactory
Following copied from interface: kodo.jdbc.meta.MappingFactory
Parameters:
types - the types to drop
Returns:
true if all mappings were dropped, false otherwise

revertMappings

public boolean revertMappings(ClassMetaData[] types)
Description copied from interface: MappingFactory
Revert the mappings to their last saved state, or return false if any cannot be reverted.
Specified by:
revertMappings in interface MappingFactory
Following copied from interface: kodo.jdbc.meta.MappingFactory
Parameters:
types - the types to revert
Returns:
true if all mappings were reverted, false otherwise

addExtensionKeys

public void addExtensionKeys(Collection exts,
                             Mapping mapping)
Description copied from interface: MappingFactory
Add any metadata extension keys that this MappingFactory uses to store mapping information.
Specified by:
addExtensionKeys in interface MappingFactory
Following copied from interface: kodo.jdbc.meta.MappingFactory
Parameters:
exts - the collection to which to add the extension keys
mapping - the mapping for which to add the keys

SolarMetric Kodo JDO 3.3.5 generated on August 31 2005

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