Class NameMapper

  • Direct Known Subclasses:
    NameMapper

    public abstract class NameMapper
    extends com.sun.jdo.api.persistence.mapping.ejb.AbstractNameMapper
    This is a class which helps translate between the various names of the CMP (ejb name, abstract schema, abstract bean, concrete bean, local interface, remote interface) and the persistence-capable class name. It also has methods for translation of field names. The basic entry point is ejb name or persistence-capable class name. This is a subclass of the AbstractNameMapper and implements the methods based on DOL. It also adds methods which are used during deployment time but not needed during development time and therefore, not in the abstract superclass.
    Author:
    Rochelle Raccah
    • Field Summary

      • 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 
      Modifier Constructor Description
      protected NameMapper​(org.glassfish.ejb.deployment.descriptor.EjbBundleDescriptorImpl bundleDescriptor)
      Creates a new instance of NameMapper
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      org.glassfish.ejb.deployment.descriptor.EjbBundleDescriptorImpl getBundleDescriptor()
      Gets the EjbBundleDescriptor which defines the universe of names for this application.
      abstract String getConcreteBeanClassForEjbName​(String name)
      Gets the name of the concrete bean class which corresponds to the specified ejb.
      abstract org.glassfish.ejb.deployment.descriptor.EjbCMPEntityDescriptor getDescriptorForEjbName​(String name)
      Gets the EjbCMPEntityDescriptor which represents the ejb with the specified name.
      abstract String getEjbNameForAbstractSchema​(String schemaName)
      Gets the name of the ejb which corresponds to the specified abstract schema name.
      protected Map getGeneratedFieldsMap()  
      protected Map getInverseFieldsMap()  
      int getKeyClassTypeForEjbName​(String name)
      Get the type of key class of this ejb.
      • Methods inherited from class com.sun.jdo.api.persistence.mapping.ejb.AbstractNameMapper

        getAbstractBeanClassForEjbName, getAbstractSchemaForEjbName, getEjbFieldForGeneratedField, getEjbFieldForPersistenceField, getEjbNameForLocalInterface, getEjbNameForPersistenceClass, getEjbNameForPersistenceKeyClass, getEjbNameForRemoteInterface, getGeneratedFieldForEjbField, getGeneratedRelationshipsForEjbName, getKeyClassForEjbName, getKeyClassForPersistenceKeyClass, getLocalInterfaceForEjbName, getPersistenceClassForEjbName, getPersistenceClassForLocalInterface, getPersistenceClassForRemoteInterface, getPersistenceFieldForEjbField, getRemoteInterfaceForEjbName, isEjbName, isGeneratedEjbRelationship, isGeneratedField, isLocalInterface, isRemoteInterface
    • Constructor Detail

      • NameMapper

        protected NameMapper​(org.glassfish.ejb.deployment.descriptor.EjbBundleDescriptorImpl bundleDescriptor)
        Creates a new instance of NameMapper
        Parameters:
        bundleDescriptor - the EjbBundleDescriptor which defines the universe of names for this application.
    • Method Detail

      • getGeneratedFieldsMap

        protected Map getGeneratedFieldsMap()
        Specified by:
        getGeneratedFieldsMap in class com.sun.jdo.api.persistence.mapping.ejb.AbstractNameMapper
      • getInverseFieldsMap

        protected Map getInverseFieldsMap()
        Specified by:
        getInverseFieldsMap in class com.sun.jdo.api.persistence.mapping.ejb.AbstractNameMapper
      • getBundleDescriptor

        public org.glassfish.ejb.deployment.descriptor.EjbBundleDescriptorImpl getBundleDescriptor()
        Gets the EjbBundleDescriptor which defines the universe of names for this application.
        Returns:
        the EjbBundleDescriptor which defines the universe of names for this application.
      • getDescriptorForEjbName

        public abstract org.glassfish.ejb.deployment.descriptor.EjbCMPEntityDescriptor getDescriptorForEjbName​(String name)
        Gets the EjbCMPEntityDescriptor which represents the ejb with the specified name.
        Parameters:
        name - the name of the ejb
        Returns:
        the EjbCMPEntityDescriptor which represents the ejb.
      • getKeyClassTypeForEjbName

        public int getKeyClassTypeForEjbName​(String name)
        Get the type of key class of this ejb.
        Specified by:
        getKeyClassTypeForEjbName in class com.sun.jdo.api.persistence.mapping.ejb.AbstractNameMapper
        Returns:
        the key class type, one of AbstractNameMapper.USER_DEFINED_KEY_CLASS, AbstractNameMapper.PRIMARY_KEY_FIELD, or AbstractNameMapper.UNKNOWN_KEY_CLASS
      • getEjbNameForAbstractSchema

        public abstract String getEjbNameForAbstractSchema​(String schemaName)
        Gets the name of the ejb which corresponds to the specified abstract schema name.
        Parameters:
        schemaName - the name of the abstract schema
        Returns:
        the name of the ejb for the specified abstract schema
      • getConcreteBeanClassForEjbName

        public abstract String getConcreteBeanClassForEjbName​(String name)
        Gets the name of the concrete bean class which corresponds to the specified ejb.
        Parameters:
        name - the name of the ejb
        Returns:
        the name of the concrete bean for the specified ejb