Class MappingFile
java.lang.Object
com.sun.jdo.api.persistence.mapping.ejb.MappingFile
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
FieldsModifier and TypeFieldDescriptionstatic final StringDefinitive location for a mapping file in an ejb-jar file. -
Constructor Summary
ConstructorsConstructorDescriptionCreates new MappingFileCreates new MappingFile -
Method Summary
Modifier and TypeMethodDescriptionvoidfromMappingClasses(OutputStream dest, Map mappingClasses, ConversionHelper helper) Creates an SunCmpMapping object from a Collection of MappingClassElement objectsfromMappingClasses(Map mappingClasses, ConversionHelper helper) Creates an SunCmpMapping object from a Collection of MappingClassElement objectsintoMappingClasses(SunCmpMappings content, ConversionHelper helper) Convert an SunCmpMapping object into the equivelent collection of MappingClassElement objectsintoMappingClasses(InputStream content, ConversionHelper helper) Convert an SunCmpMapping object into the equivelent collection of MappingClassElement objects
-
Field Details
-
DEFAULT_LOCATION_IN_EJB_JAR
Definitive location for a mapping file in an ejb-jar file.
-
-
Constructor Details
-
MappingFile
public MappingFile()Creates new MappingFile -
MappingFile
Creates new MappingFile
-
-
Method Details
-
intoMappingClasses
public Map intoMappingClasses(SunCmpMappings content, ConversionHelper helper) throws org.netbeans.modules.dbschema.DBException, com.sun.jdo.api.persistence.model.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.DBExceptioncom.sun.jdo.api.persistence.model.ModelExceptionConversionException
-
intoMappingClasses
public Map intoMappingClasses(InputStream content, ConversionHelper helper) throws org.netbeans.modules.dbschema.DBException, com.sun.jdo.api.persistence.model.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.DBExceptioncom.sun.jdo.api.persistence.model.ModelExceptionConversionException
-
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
-