Class MappingFile
- java.lang.Object
-
- com.sun.jdo.api.persistence.mapping.ejb.MappingFile
-
public class MappingFile extends Object
This class supports the conversion between the iAS mapping file format and the object used to represent that mapping to support the iAS EJBC process and iAS CMP run-time.- Version:
- 1.0
- Author:
- vbk
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_LOCATION_IN_EJB_JAR
Definitive location for a mapping file in an ejb-jar file.
-
Constructor Summary
Constructors Constructor Description MappingFile()
Creates new MappingFileMappingFile(ClassLoader cl)
Creates new MappingFile
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
fromMappingClasses(OutputStream dest, Map mappingClasses, ConversionHelper helper)
Creates an SunCmpMapping object from a Collection of MappingClassElement objectsSunCmpMappings
fromMappingClasses(Map mappingClasses, ConversionHelper helper)
Creates an SunCmpMapping object from a Collection of MappingClassElement objectsMap
intoMappingClasses(SunCmpMappings content, ConversionHelper helper)
Convert an SunCmpMapping object into the equivelent collection of MappingClassElement objectsMap
intoMappingClasses(InputStream content, ConversionHelper helper)
Convert an SunCmpMapping object into the equivelent collection of MappingClassElement objects
-
-
-
Field Detail
-
DEFAULT_LOCATION_IN_EJB_JAR
public static final String DEFAULT_LOCATION_IN_EJB_JAR
Definitive location for a mapping file in an ejb-jar file.
-
-
Constructor Detail
-
MappingFile
public MappingFile()
Creates new MappingFile
-
MappingFile
public MappingFile(ClassLoader cl)
Creates new MappingFile
-
-
Method Detail
-
intoMappingClasses
public Map intoMappingClasses(SunCmpMappings content, ConversionHelper helper) throws org.netbeans.modules.dbschema.DBException, ModelException, ConversionException
Convert an SunCmpMapping object into the equivelent collection of MappingClassElement objects- Parameters:
content
- An SunCmpMapping object that describes a mapping for one or more beanshelper
- An object which implements ConversionHelper interface to access data from other available sources to support the mapping generation- Returns:
- A Collection of MappingClassElement objects
- Throws:
org.netbeans.modules.dbschema.DBException
ModelException
ConversionException
-
intoMappingClasses
public Map intoMappingClasses(InputStream content, ConversionHelper helper) throws org.netbeans.modules.dbschema.DBException, ModelException, ConversionException
Convert an SunCmpMapping object into the equivelent collection of MappingClassElement objects- Parameters:
content
- An InputStream that contains an xml data stream that conforms to the sun-cmp-mapping.dtdhelper
- An object which implements ConversionHelper interface to access data from other available sources to support the mapping generation- Returns:
- A Collection of MappingClassElement objects
- Throws:
org.netbeans.modules.dbschema.DBException
ModelException
ConversionException
-
fromMappingClasses
public void fromMappingClasses(OutputStream dest, Map mappingClasses, ConversionHelper helper) throws IOException, org.netbeans.modules.schema2beans.Schema2BeansException
Creates an SunCmpMapping object from a Collection of MappingClassElement objects- Parameters:
dest
- The output for processingmappingClasses
- The Collection of MappingClassElementshelper
- An object which implements ConversionHelper interface to access data from other available sources to support the mapping generation- Throws:
IOException
- Thrown if there is a problem sending the data out ondest
.org.netbeans.modules.schema2beans.Schema2BeansException
-
fromMappingClasses
public SunCmpMappings fromMappingClasses(Map mappingClasses, ConversionHelper helper) throws org.netbeans.modules.schema2beans.Schema2BeansException
Creates an SunCmpMapping object from a Collection of MappingClassElement objects- Parameters:
mappingClasses
- The Collection of MappingClassElementshelper
- An object which implements ConversionHelper interface to access data from other available sources to support the mapping generation.- Returns:
- The SunCmpMapping object that is equivelent to the collection of MappingClassElements. throws Schema2BeansException
- Throws:
org.netbeans.modules.schema2beans.Schema2BeansException
-
-