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.utilpackage) which implements the abstract methods based on an IAS implementation.- Author:
- Rochelle Raccah
-
-
Field Summary
Fields Modifier and Type Field Description static StringSIGNATURESignature 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 StringgetAbstractBeanClassForEjbName(String name)Gets the name of the abstract bean class which corresponds to the specified ejb name.StringgetAbstractSchemaForEjbName(String name)Gets the name of the abstract schema which corresponds to the specified ejb.StringgetConcreteBeanClassForEjbName(String name)Gets the name of the concrete bean class which corresponds to the specified ejb.EjbCMPEntityDescriptorgetDescriptorForEjbName(String name)Gets the EjbCMPEntityDescriptor which represents the ejb with the specified name.StringgetEjbFieldForPersistenceField(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.StringgetEjbNameForAbstractSchema(String schemaName)Gets the name of the ejb which corresponds to the specified abstract schema name.StringgetEjbNameForLocalInterface(String ejbName, String fieldName, String interfaceName)Gets the name of the ejb which corresponds to the specified local interface name.StringgetEjbNameForPersistenceClass(String className)Gets the name of the ejb name which corresponds to the specified persistence-capable class name.StringgetEjbNameForRemoteInterface(String ejbName, String fieldName, String interfaceName)Gets the name of the ejb which corresponds to the specified remote interface name.StringgetKeyClassForEjbName(String name)Gets the name of the key class which corresponds to the specified ejb name.StringgetLocalInterfaceForEjbName(String name)Gets the name of the local interface which corresponds to the specified ejb name.StringgetPersistenceClassForEjbName(String name)Gets the name of the persistence-capable class which corresponds to the specified ejb name.StringgetPersistenceFieldForEjbField(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.StringgetRemoteInterfaceForEjbName(String name)Gets the name of the remote interface which corresponds to the specified ejb name.booleanisEjbName(String name)Determines if the specified name represents an ejb.booleanisLocalInterface(String name)Determines if the specified name represents a local interface.booleanisRemoteInterface(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:
isEjbNamein classAbstractNameMapper- Parameters:
name- the fully qualified name to be checked- Returns:
trueif this name represents an ejb;falseotherwise.
-
getDescriptorForEjbName
public EjbCMPEntityDescriptor getDescriptorForEjbName(String name)
Gets the EjbCMPEntityDescriptor which represents the ejb with the specified name.- Specified by:
getDescriptorForEjbNamein 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:
getAbstractBeanClassForEjbNamein 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:
getKeyClassForEjbNamein 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:
getEjbNameForAbstractSchemain 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:
getAbstractSchemaForEjbNamein 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:
getConcreteBeanClassForEjbNamein 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:
getEjbNameForPersistenceClassin 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:
getPersistenceClassForEjbNamein 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:
isLocalInterfacein classAbstractNameMapper- Parameters:
name- the fully qualified name to be checked- Returns:
trueif this name represents a local interface;falseotherwise.
-
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:
getEjbNameForLocalInterfacein 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:
getLocalInterfaceForEjbNamein 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:
isRemoteInterfacein classAbstractNameMapper- Parameters:
name- the fully qualified name to be checked- Returns:
trueif this name represents a remote interface;falseotherwise.
-
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:
getEjbNameForRemoteInterfacein 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:
getRemoteInterfaceForEjbNamein 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:
getEjbFieldForPersistenceFieldin 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:
getPersistenceFieldForEjbFieldin 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
-
-