Class NameMapper
- java.lang.Object
-
- com.sun.jdo.api.persistence.mapping.ejb.AbstractNameMapper
-
- com.sun.jdo.spi.persistence.support.ejb.model.util.NameMapper
-
- com.sun.jdo.spi.persistence.support.ejb.ejbc.NameMapper
-
public class NameMapper extends NameMapper
This is a subclass ofNameMapper
(in thecom.sun.jdo.spi.persistence.support.ejb.model.util
package) which implements the abstract methods based on an IAS implementation.- Author:
- Rochelle Raccah
-
-
Field Summary
Fields Modifier and Type Field Description static String
SIGNATURE
Signature with CVS keyword substitution for identifying the generated code-
Fields inherited from class com.sun.jdo.api.persistence.mapping.ejb.AbstractNameMapper
GENERATED_CMR_FIELD_PREFIX, GENERATED_KEY_FIELD_NAME, GENERATED_VERSION_FIELD_PREFIX, PRIMARY_KEY_FIELD, UNKNOWN_KEY_CLASS, USER_DEFINED_KEY_CLASS
-
-
Constructor Summary
Constructors Constructor Description NameMapper(EjbBundleDescriptorImpl bundleDescriptor)
Creates a new instance of NameMapperNameMapper(EjbBundleDescriptorImpl bundleDescriptor, boolean expandPersistenceClassNames)
Creates a new instance of NameMapper
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAbstractBeanClassForEjbName(String name)
Gets the name of the abstract bean class which corresponds to the specified ejb name.String
getAbstractSchemaForEjbName(String name)
Gets the name of the abstract schema which corresponds to the specified ejb.String
getConcreteBeanClassForEjbName(String name)
Gets the name of the concrete bean class which corresponds to the specified ejb.EjbCMPEntityDescriptor
getDescriptorForEjbName(String name)
Gets the EjbCMPEntityDescriptor which represents the ejb with the specified name.String
getEjbFieldForPersistenceField(String className, String fieldName)
Gets the name of the field in the ejb which corresponds to the specified persistence-capable class name and field name pair.String
getEjbNameForAbstractSchema(String schemaName)
Gets the name of the ejb which corresponds to the specified abstract schema name.String
getEjbNameForLocalInterface(String ejbName, String fieldName, String interfaceName)
Gets the name of the ejb which corresponds to the specified local interface name.String
getEjbNameForPersistenceClass(String className)
Gets the name of the ejb name which corresponds to the specified persistence-capable class name.String
getEjbNameForRemoteInterface(String ejbName, String fieldName, String interfaceName)
Gets the name of the ejb which corresponds to the specified remote interface name.String
getKeyClassForEjbName(String name)
Gets the name of the key class which corresponds to the specified ejb name.String
getLocalInterfaceForEjbName(String name)
Gets the name of the local interface which corresponds to the specified ejb name.String
getPersistenceClassForEjbName(String name)
Gets the name of the persistence-capable class which corresponds to the specified ejb name.String
getPersistenceFieldForEjbField(String name, String fieldName)
Gets the name of the field in the persistence-capable class which corresponds to the specified ejb name and field name pair.String
getRemoteInterfaceForEjbName(String name)
Gets the name of the remote interface which corresponds to the specified ejb name.boolean
isEjbName(String name)
Determines if the specified name represents an ejb.boolean
isLocalInterface(String name)
Determines if the specified name represents a local interface.boolean
isRemoteInterface(String name)
Determines if the specified name represents a remote interface.-
Methods inherited from class com.sun.jdo.spi.persistence.support.ejb.model.util.NameMapper
getBundleDescriptor, getGeneratedFieldsMap, getInverseFieldsMap, getKeyClassTypeForEjbName
-
Methods inherited from class com.sun.jdo.api.persistence.mapping.ejb.AbstractNameMapper
getEjbFieldForGeneratedField, getEjbNameForPersistenceKeyClass, getGeneratedFieldForEjbField, getGeneratedRelationshipsForEjbName, getKeyClassForPersistenceKeyClass, getPersistenceClassForLocalInterface, getPersistenceClassForRemoteInterface, isGeneratedEjbRelationship, isGeneratedField
-
-
-
-
Field Detail
-
SIGNATURE
public static final String SIGNATURE
Signature with CVS keyword substitution for identifying the generated code- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NameMapper
public NameMapper(EjbBundleDescriptorImpl bundleDescriptor)
Creates a new instance of NameMapper- Parameters:
bundleDescriptor
- the IASEjbBundleDescriptor which defines the universe of names for this application.
-
NameMapper
public NameMapper(EjbBundleDescriptorImpl bundleDescriptor, boolean expandPersistenceClassNames)
Creates a new instance of NameMapper- Parameters:
bundleDescriptor
- the IASEjbBundleDescriptor which defines the universe of names for this application.expandPersistenceClassNames
- flag to indicate whether persistence class names should differ from bean names
-
-
Method Detail
-
isEjbName
public boolean isEjbName(String name)
Determines if the specified name represents an ejb.- Specified by:
isEjbName
in classAbstractNameMapper
- Parameters:
name
- the fully qualified name to be checked- Returns:
true
if this name represents an ejb;false
otherwise.
-
getDescriptorForEjbName
public EjbCMPEntityDescriptor getDescriptorForEjbName(String name)
Gets the EjbCMPEntityDescriptor which represents the ejb with the specified name.- Specified by:
getDescriptorForEjbName
in classNameMapper
- Parameters:
name
- the name of the ejb- Returns:
- the EjbCMPEntityDescriptor which represents the ejb.
-
getAbstractBeanClassForEjbName
public String getAbstractBeanClassForEjbName(String name)
Gets the name of the abstract bean class which corresponds to the specified ejb name.- Specified by:
getAbstractBeanClassForEjbName
in classAbstractNameMapper
- Parameters:
name
- the name of the ejb- Returns:
- the name of the abstract bean for the specified ejb
-
getKeyClassForEjbName
public String getKeyClassForEjbName(String name)
Gets the name of the key class which corresponds to the specified ejb name.- Specified by:
getKeyClassForEjbName
in classAbstractNameMapper
- Parameters:
name
- the name of the ejb- Returns:
- the name of the key class for the ejb
-
getEjbNameForAbstractSchema
public String getEjbNameForAbstractSchema(String schemaName)
Gets the name of the ejb which corresponds to the specified abstract schema name.- Specified by:
getEjbNameForAbstractSchema
in classNameMapper
- Parameters:
schemaName
- the name of the abstract schema- Returns:
- the name of the ejb for the specified abstract schema
-
getAbstractSchemaForEjbName
public String getAbstractSchemaForEjbName(String name)
Gets the name of the abstract schema which corresponds to the specified ejb.- Specified by:
getAbstractSchemaForEjbName
in classAbstractNameMapper
- Parameters:
name
- the name of the ejb- Returns:
- the name of the abstract schema for the specified ejb
-
getConcreteBeanClassForEjbName
public String getConcreteBeanClassForEjbName(String name)
Gets the name of the concrete bean class which corresponds to the specified ejb.- Specified by:
getConcreteBeanClassForEjbName
in classNameMapper
- Parameters:
name
- the name of the ejb- Returns:
- the name of the concrete bean for the specified ejb
-
getEjbNameForPersistenceClass
public String getEjbNameForPersistenceClass(String className)
Gets the name of the ejb name which corresponds to the specified persistence-capable class name.- Specified by:
getEjbNameForPersistenceClass
in classAbstractNameMapper
- Parameters:
className
- the name of the persistence-capable- Returns:
- the name of the ejb for the specified persistence-capable
-
getPersistenceClassForEjbName
public String getPersistenceClassForEjbName(String name)
Gets the name of the persistence-capable class which corresponds to the specified ejb name.- Specified by:
getPersistenceClassForEjbName
in classAbstractNameMapper
- Parameters:
name
- the name of the ejb- Returns:
- the name of the persistence-capable for the specified ejb
-
isLocalInterface
public boolean isLocalInterface(String name)
Determines if the specified name represents a local interface.- Specified by:
isLocalInterface
in classAbstractNameMapper
- Parameters:
name
- the fully qualified name to be checked- Returns:
true
if this name represents a local interface;false
otherwise.
-
getEjbNameForLocalInterface
public String getEjbNameForLocalInterface(String ejbName, String fieldName, String interfaceName)
Gets the name of the ejb which corresponds to the specified local interface name.- Specified by:
getEjbNameForLocalInterface
in classAbstractNameMapper
- Parameters:
ejbName
- the name of the ejb which contains fieldName from which to find relationship and therefore the local interfacefieldName
- the name of the field in the ejbinterfaceName
- the name of the local interface- Returns:
- the name of the ejb for the specified local interface
-
getLocalInterfaceForEjbName
public String getLocalInterfaceForEjbName(String name)
Gets the name of the local interface which corresponds to the specified ejb name.- Specified by:
getLocalInterfaceForEjbName
in classAbstractNameMapper
- Parameters:
name
- the name of the ejb- Returns:
- the name of the local interface for the specified ejb
-
isRemoteInterface
public boolean isRemoteInterface(String name)
Determines if the specified name represents a remote interface.- Specified by:
isRemoteInterface
in classAbstractNameMapper
- Parameters:
name
- the fully qualified name to be checked- Returns:
true
if this name represents a remote interface;false
otherwise.
-
getEjbNameForRemoteInterface
public String getEjbNameForRemoteInterface(String ejbName, String fieldName, String interfaceName)
Gets the name of the ejb which corresponds to the specified remote interface name.- Specified by:
getEjbNameForRemoteInterface
in classAbstractNameMapper
- Parameters:
ejbName
- the name of the ejb which contains fieldName from which to find relationship and therefore the remote interfacefieldName
- the name of the field in the ejbinterfaceName
- the name of the remote interface- Returns:
- the name of the ejb for the specified remote interface
-
getRemoteInterfaceForEjbName
public String getRemoteInterfaceForEjbName(String name)
Gets the name of the remote interface which corresponds to the specified ejb name.- Specified by:
getRemoteInterfaceForEjbName
in classAbstractNameMapper
- Parameters:
name
- the name of the ejb- Returns:
- the name of the remote interface for the specified ejb
-
getEjbFieldForPersistenceField
public String getEjbFieldForPersistenceField(String className, String fieldName)
Gets the name of the field in the ejb which corresponds to the specified persistence-capable class name and field name pair.- Specified by:
getEjbFieldForPersistenceField
in classAbstractNameMapper
- Parameters:
className
- the name of the persistence-capablefieldName
- the name of the field in the persistence-capable- Returns:
- the name of the field in the ejb for the specified persistence-capable field
-
getPersistenceFieldForEjbField
public String getPersistenceFieldForEjbField(String name, String fieldName)
Gets the name of the field in the persistence-capable class which corresponds to the specified ejb name and field name pair.- Specified by:
getPersistenceFieldForEjbField
in classAbstractNameMapper
- Parameters:
name
- the name of the ejbfieldName
- the name of the field in the ejb- Returns:
- the name of the field in the persistence-capable for the specified ejb field
-
-