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 ConversionHelpercreateConversionHelper()Creates and returns an instance of the ConversionHelper object to use for this helper.AbstractNameMappercreateUniqueNameMapper()Creates and returns an instance of the AbstractNameMapper object to use for generation of unique names with this helper.CollectiongetAvailableSchemaNames()Gets a collection of names of schemas defined in this ejb jar.ClassLoadergetClassLoader()Gets the class loader which corresponds to this ejb bundle.StringgetEjbJarDisplayName()Gets the name of the ejb jar.CollectiongetEjbNames()Gets a collection of names of cmp entity beans defined in this ejb jar.CollectiongetFieldsForEjb(String ejbName)Gets a collection of names of cmp fields and cmr fields defined in this ejb jar for the specified ejb.ModelgetModel()Gets the Model object to use for this helper.AbstractNameMappergetNameMapper()Gets the AbstractNameMapper object to use for this helper.CollectiongetRelationshipsForEjb(String ejbName)Gets a collection of names of cmr fields defined in this ejb jar for the specified ejb.org.netbeans.modules.dbschema.SchemaElementgetSchema(String schemaName)Gets the schema with the specified name, loading it if necessary.StringgetSchemaNameToGenerate()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:EJBInfoHelperGets the name of the ejb jar.- Specified by:
getEjbJarDisplayNamein 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 ornullif there was none supplied.- Specified by:
getAvailableSchemaNamesin 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:
getSchemaNameToGeneratein 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:
getSchemain interfaceEJBInfoHelper- Parameters:
schemaName- the name of the schema to be loaded- Returns:
- the schema object
-
getEjbNames
public Collection getEjbNames()
Description copied from interface:EJBInfoHelperGets a collection of names of cmp entity beans defined in this ejb jar.- Specified by:
getEjbNamesin interfaceEJBInfoHelper- Returns:
- a collection cmp ejb names
- See Also:
EJBInfoHelper.getEjbNames()
-
getFieldsForEjb
public Collection getFieldsForEjb(String ejbName)
Description copied from interface:EJBInfoHelperGets a collection of names of cmp fields and cmr fields defined in this ejb jar for the specified ejb.- Specified by:
getFieldsForEjbin 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:EJBInfoHelperGets a collection of names of cmr fields defined in this ejb jar for the specified ejb.- Specified by:
getRelationshipsForEjbin 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:
getClassLoaderin interfaceEJBInfoHelper- Returns:
- the class loader which corresponds to this ejb bundle
-
getNameMapper
public AbstractNameMapper getNameMapper()
Description copied from interface:EJBInfoHelperGets the AbstractNameMapper object to use for this helper.- Specified by:
getNameMapperin interfaceEJBInfoHelper- Returns:
- the name mapper object
- See Also:
EJBInfoHelper.getNameMapper()
-
createUniqueNameMapper
public AbstractNameMapper createUniqueNameMapper()
Description copied from interface:EJBInfoHelperCreates 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:
createUniqueNameMapperin interfaceEJBInfoHelper- Returns:
- the name mapper object
- See Also:
EJBInfoHelper.createUniqueNameMapper()
-
createConversionHelper
public ConversionHelper createConversionHelper()
Description copied from interface:EJBInfoHelperCreates 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:
createConversionHelperin interfaceEJBInfoHelper- Returns:
- the conversion helper object
- See Also:
EJBInfoHelper.createConversionHelper()
-
getModel
public Model getModel()
Description copied from interface:EJBInfoHelperGets the Model object to use for this helper.- Specified by:
getModelin interfaceEJBInfoHelper- Returns:
- the model object
- See Also:
EJBInfoHelper.getModel()
-
-