com.sun.jdo.api.persistence.mapping.ejb
Class MappingFile

java.lang.Object
  extended by 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
static String DEFAULT_LOCATION_IN_EJB_JAR
          Definitive location for a mapping file in an ejb-jar file.
 
Constructor Summary
MappingFile()
          Creates new MappingFile
MappingFile(ClassLoader cl)
          Creates new MappingFile
 
Method Summary
 SunCmpMappings fromMappingClasses(Map mappingClasses, ConversionHelper helper)
          Creates an SunCmpMapping object from a Collection of MappingClassElement objects
 void fromMappingClasses(OutputStream dest, Map mappingClasses, ConversionHelper helper)
          Creates an SunCmpMapping object from a Collection of MappingClassElement objects
 Map intoMappingClasses(InputStream content, ConversionHelper helper)
          Convert an SunCmpMapping object into the equivelent collection of MappingClassElement objects
 Map intoMappingClasses(SunCmpMappings content, ConversionHelper helper)
          Convert an SunCmpMapping object into the equivelent collection of MappingClassElement objects
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 beans
helper - 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.dtd
helper - 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 processing
mappingClasses - The Collection of MappingClassElements
helper - 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 on dest.
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 MappingClassElements
helper - 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


Copyright © 2012 GlassFish Community. All Rights Reserved.