Class EJBBundleInfoHelper
- java.lang.Object
-
- com.sun.jdo.spi.persistence.support.ejb.ejbc.EJBBundleInfoHelper
-
- All Implemented Interfaces:
EJBInfoHelper
public class EJBBundleInfoHelper extends Object implements EJBInfoHelper
This is a class which implements the EJBInfoHelper interface based on EjbBundleDescriptor and other DOL classes.- Author:
- Rochelle Raccah
-
-
Constructor Summary
Constructors Constructor Description EJBBundleInfoHelper(EjbBundleDescriptorImpl bundleDescriptor, Collection availableSchemaNames)
Creates a new instance of EJBBundleInfoHelper
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConversionHelper
createConversionHelper()
Creates and returns an instance of the ConversionHelper object to use for this helper.AbstractNameMapper
createUniqueNameMapper()
Creates and returns an instance of the AbstractNameMapper object to use for generation of unique names with this helper.Collection
getAvailableSchemaNames()
Gets a collection of names of schemas defined in this ejb jar.ClassLoader
getClassLoader()
Gets the class loader which corresponds to this ejb bundle.String
getEjbJarDisplayName()
Gets the name of the ejb jar.Collection
getEjbNames()
Gets a collection of names of cmp entity beans defined in this ejb jar.Collection
getFieldsForEjb(String ejbName)
Gets a collection of names of cmp fields and cmr fields defined in this ejb jar for the specified ejb.Model
getModel()
Gets the Model object to use for this helper.AbstractNameMapper
getNameMapper()
Gets the AbstractNameMapper object to use for this helper.Collection
getRelationshipsForEjb(String ejbName)
Gets a collection of names of cmr fields defined in this ejb jar for the specified ejb.org.netbeans.modules.dbschema.SchemaElement
getSchema(String schemaName)
Gets the schema with the specified name, loading it if necessary.String
getSchemaNameToGenerate()
Gets the name to use for schema generation.
-
-
-
Constructor Detail
-
EJBBundleInfoHelper
public EJBBundleInfoHelper(EjbBundleDescriptorImpl bundleDescriptor, Collection availableSchemaNames)
Creates a new instance of EJBBundleInfoHelper- Parameters:
bundleDescriptor
- the EjbBundleDescriptor which defines the universe of names for this application.availableSchemaNames
- a Collection of available schemas in the application - used only during development
-
-
Method Detail
-
getEjbJarDisplayName
public String getEjbJarDisplayName()
Description copied from interface:EJBInfoHelper
Gets the name of the ejb jar.- Specified by:
getEjbJarDisplayName
in interfaceEJBInfoHelper
- Returns:
- the name of the ejb jar
- See Also:
EJBInfoHelper.getEjbJarDisplayName()
-
getAvailableSchemaNames
public Collection getAvailableSchemaNames()
Gets a collection of names of schemas defined in this ejb jar. This implementation simply returns the list passed in the constructor ornull
if there was none supplied.- Specified by:
getAvailableSchemaNames
in interfaceEJBInfoHelper
- Returns:
- a collection schema names
-
getSchemaNameToGenerate
public String getSchemaNameToGenerate()
Gets the name to use for schema generation. This implementation uses a combo of app name, module name, etc.- Specified by:
getSchemaNameToGenerate
in interfaceEJBInfoHelper
- Returns:
- the name to use for schema generation
-
getSchema
public org.netbeans.modules.dbschema.SchemaElement getSchema(String schemaName)
Gets the schema with the specified name, loading it if necessary. This implementation uses the class loader as the extra context information used to load.- Specified by:
getSchema
in interfaceEJBInfoHelper
- Parameters:
schemaName
- the name of the schema to be loaded- Returns:
- the schema object
-
getEjbNames
public Collection getEjbNames()
Description copied from interface:EJBInfoHelper
Gets a collection of names of cmp entity beans defined in this ejb jar.- Specified by:
getEjbNames
in interfaceEJBInfoHelper
- Returns:
- a collection cmp ejb names
- See Also:
EJBInfoHelper.getEjbNames()
-
getFieldsForEjb
public Collection getFieldsForEjb(String ejbName)
Description copied from interface:EJBInfoHelper
Gets a collection of names of cmp fields and cmr fields defined in this ejb jar for the specified ejb.- Specified by:
getFieldsForEjb
in interfaceEJBInfoHelper
- Parameters:
ejbName
- the name of the ejb for which a list of fields will be created- Returns:
- a collection cmp and cmr field names
- See Also:
EJBInfoHelper.getFieldsForEjb(java.lang.String)
-
getRelationshipsForEjb
public Collection getRelationshipsForEjb(String ejbName)
Description copied from interface:EJBInfoHelper
Gets a collection of names of cmr fields defined in this ejb jar for the specified ejb.- Specified by:
getRelationshipsForEjb
in interfaceEJBInfoHelper
- Parameters:
ejbName
- the name of the ejb for which a list of cmr fields will be created- Returns:
- a collection cmr field names
- See Also:
EJBInfoHelper.getRelationshipsForEjb(java.lang.String)
-
getClassLoader
public ClassLoader getClassLoader()
Gets the class loader which corresponds to this ejb bundle.- Specified by:
getClassLoader
in interfaceEJBInfoHelper
- Returns:
- the class loader which corresponds to this ejb bundle
-
getNameMapper
public AbstractNameMapper getNameMapper()
Description copied from interface:EJBInfoHelper
Gets the AbstractNameMapper object to use for this helper.- Specified by:
getNameMapper
in interfaceEJBInfoHelper
- Returns:
- the name mapper object
- See Also:
EJBInfoHelper.getNameMapper()
-
createUniqueNameMapper
public AbstractNameMapper createUniqueNameMapper()
Description copied from interface:EJBInfoHelper
Creates and returns an instance of the AbstractNameMapper object to use for generation of unique names with this helper. Unique names usually means that the mapper doesn't use the same jdo and ejb names. Note that this method is a factory-like method which creates a new instance so the caller can make modifications to it as necessary.- Specified by:
createUniqueNameMapper
in interfaceEJBInfoHelper
- Returns:
- the name mapper object
- See Also:
EJBInfoHelper.createUniqueNameMapper()
-
createConversionHelper
public ConversionHelper createConversionHelper()
Description copied from interface:EJBInfoHelper
Creates and returns an instance of the ConversionHelper object to use for this helper. Note that this method is a factory-like method which creates a new instance so the caller can make modifications to it as necessary.- Specified by:
createConversionHelper
in interfaceEJBInfoHelper
- Returns:
- the conversion helper object
- See Also:
EJBInfoHelper.createConversionHelper()
-
getModel
public Model getModel()
Description copied from interface:EJBInfoHelper
Gets the Model object to use for this helper.- Specified by:
getModel
in interfaceEJBInfoHelper
- Returns:
- the model object
- See Also:
EJBInfoHelper.getModel()
-
-