com.sun.jdo.spi.persistence.support.ejb.ejbc
Class NameMapper

java.lang.Object
  extended by com.sun.jdo.api.persistence.mapping.ejb.AbstractNameMapper
      extended by com.sun.jdo.spi.persistence.support.ejb.model.util.NameMapper
          extended by com.sun.jdo.spi.persistence.support.ejb.ejbc.NameMapper

public class NameMapper
extends NameMapper

This is a subclass of NameMapper (in the com.sun.jdo.spi.persistence.support.ejb.model.util package) which implements the abstract methods based on an IAS implementation.

Author:
Rochelle Raccah

Field Summary
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
NameMapper(EjbBundleDescriptor bundleDescriptor)
          Creates a new instance of NameMapper
NameMapper(EjbBundleDescriptor bundleDescriptor, boolean expandPersistenceClassNames)
          Creates a new instance of NameMapper
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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(EjbBundleDescriptor bundleDescriptor)
Creates a new instance of NameMapper

Parameters:
bundleDescriptor - the IASEjbBundleDescriptor which defines the universe of names for this application.

NameMapper

public NameMapper(EjbBundleDescriptor 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 class AbstractNameMapper
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 class NameMapper
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 class AbstractNameMapper
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 class AbstractNameMapper
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 class NameMapper
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 class AbstractNameMapper
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 class NameMapper
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 class AbstractNameMapper
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 class AbstractNameMapper
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 class AbstractNameMapper
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 class AbstractNameMapper
Parameters:
ejbName - the name of the ejb which contains fieldName from which to find relationship and therefore the local interface
fieldName - the name of the field in the ejb
interfaceName - 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 class AbstractNameMapper
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 class AbstractNameMapper
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 class AbstractNameMapper
Parameters:
ejbName - the name of the ejb which contains fieldName from which to find relationship and therefore the remote interface
fieldName - the name of the field in the ejb
interfaceName - 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 class AbstractNameMapper
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 class AbstractNameMapper
Parameters:
className - the name of the persistence-capable
fieldName - 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 class AbstractNameMapper
Parameters:
name - the name of the ejb
fieldName - the name of the field in the ejb
Returns:
the name of the field in the persistence-capable for the specified ejb field


Copyright © 2012. All Rights Reserved.