public abstract class AbstractNameMapper extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static String |
GENERATED_CMR_FIELD_PREFIX |
static String |
GENERATED_KEY_FIELD_NAME
Defines key field name for unknown primary key
|
static String |
GENERATED_VERSION_FIELD_PREFIX
Defines version field name prefix for version consistency
|
static int |
PRIMARY_KEY_FIELD |
static int |
UNKNOWN_KEY_CLASS |
static int |
USER_DEFINED_KEY_CLASS |
| Constructor and Description |
|---|
AbstractNameMapper() |
| Modifier and Type | Method and Description |
|---|---|
abstract String |
getAbstractBeanClassForEjbName(String name)
Gets the name of the abstract bean class which corresponds to the
specified ejb name.
|
abstract String |
getAbstractSchemaForEjbName(String name)
Gets the name of the abstract schema which corresponds to the
specified ejb.
|
String[] |
getEjbFieldForGeneratedField(String name,
String fieldName)
Gets the name of the ejb field which corresponds to the specified
generated ejb name and field name pair.
|
abstract 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.
|
abstract String |
getEjbNameForLocalInterface(String ejbName,
String fieldName,
String interfaceName)
Gets the name of the ejb which corresponds to the specified
local interface name.
|
abstract String |
getEjbNameForPersistenceClass(String className)
Gets the name of the ejb name which corresponds to the
specified persistence-capable class name.
|
String |
getEjbNameForPersistenceKeyClass(String className)
Gets the name of the ejb name which corresponds to the
specified persistence-capable key class name.
|
abstract String |
getEjbNameForRemoteInterface(String ejbName,
String fieldName,
String interfaceName)
Gets the name of the ejb which corresponds to the specified
remote interface name.
|
String[] |
getGeneratedFieldForEjbField(String name,
String fieldName)
Gets the name of the generated field in the ejb which corresponds to
the specified ejb name and field name pair.
|
protected abstract Map |
getGeneratedFieldsMap() |
List |
getGeneratedRelationshipsForEjbName(String name)
The list contains generated relationship field names.
|
protected abstract Map |
getInverseFieldsMap() |
abstract String |
getKeyClassForEjbName(String name)
Gets the name of the key class which corresponds to the specified
ejb name.
|
String |
getKeyClassForPersistenceKeyClass(String className)
Gets the name of the key class which corresponds to the specified
persistence-capable key class name.
|
abstract int |
getKeyClassTypeForEjbName(String name)
Get the type of key class of this ejb.
|
abstract String |
getLocalInterfaceForEjbName(String name)
Gets the name of the local interface which corresponds to the
specified ejb name.
|
abstract String |
getPersistenceClassForEjbName(String name)
Gets the name of the persistence-capable class which corresponds to
the specified ejb name.
|
String |
getPersistenceClassForLocalInterface(String className,
String fieldName,
String interfaceName)
Gets the name of the persistence-capable class which corresponds to
the specified local interface name.
|
String |
getPersistenceClassForRemoteInterface(String className,
String fieldName,
String interfaceName)
Gets the name of the persistence-capable class which corresponds to
the specified remote interface name.
|
abstract 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.
|
abstract String |
getRemoteInterfaceForEjbName(String name)
Gets the name of the remote interface which corresponds to the
specified ejb name.
|
abstract boolean |
isEjbName(String name)
Determines if the specified name represents an ejb.
|
boolean |
isGeneratedEjbRelationship(String name,
String fieldName)
Returns
true if the field in the persistence-capable
class which corresponds to the specified ejb name and field name pair
is one which was generated automatically for 2 way managed
relationships in the case that the ejb specifies one way
relationships. |
boolean |
isGeneratedField(String name,
String fieldName)
Returns
true if the field is a generated field. |
abstract boolean |
isLocalInterface(String name)
Determines if the specified name represents a local interface.
|
abstract boolean |
isRemoteInterface(String name)
Determines if the specified name represents a remote interface.
|
public static final int USER_DEFINED_KEY_CLASS
public static final int PRIMARY_KEY_FIELD
public static final int UNKNOWN_KEY_CLASS
public static final String GENERATED_KEY_FIELD_NAME
public static final String GENERATED_VERSION_FIELD_PREFIX
protected static final String GENERATED_CMR_FIELD_PREFIX
protected abstract Map getGeneratedFieldsMap()
protected abstract Map getInverseFieldsMap()
public abstract boolean isEjbName(String name)
name - the fully qualified name to be checkedtrue if this name represents an ejb;
false otherwise.public abstract String getAbstractBeanClassForEjbName(String name)
name - the name of the ejbpublic abstract String getKeyClassForEjbName(String name)
name - the name of the ejbpublic String getKeyClassForPersistenceKeyClass(String className)
null if the
supplied className is not a persistence-capable key class name.className - the name of the persistence-capable key classpublic String getEjbNameForPersistenceKeyClass(String className)
null if the supplied className is not a
persistence-capable key class name.className - the name of the persistence-capable key classpublic abstract int getKeyClassTypeForEjbName(String name)
USER_DEFINED_KEY_CLASS,
PRIMARY_KEY_FIELD, or UNKNOWN_KEY_CLASSpublic abstract String getAbstractSchemaForEjbName(String name)
name - the name of the ejbpublic abstract String getEjbNameForPersistenceClass(String className)
className - the name of the persistence-capablepublic abstract String getPersistenceClassForEjbName(String name)
name - the name of the ejbpublic abstract boolean isLocalInterface(String name)
name - the fully qualified name to be checkedtrue if this name represents a local interface;
false otherwise.public String getPersistenceClassForLocalInterface(String className, String fieldName, String interfaceName)
className - the name of the persistence-capable class which
contains fieldName from which to find relationship and therefore the
local interfacefieldName - the name of the field in the persistence-capable classinterfaceName - the name of the local interfacepublic abstract String getEjbNameForLocalInterface(String ejbName, String fieldName, String interfaceName)
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 interfacepublic abstract String getLocalInterfaceForEjbName(String name)
name - the name of the ejbpublic abstract boolean isRemoteInterface(String name)
name - the fully qualified name to be checkedtrue if this name represents a remote interface;
false otherwise.public String getPersistenceClassForRemoteInterface(String className, String fieldName, String interfaceName)
className - the name of the persistence-capable class which
contains fieldName from which to find relationship and therefore the
remote interfacefieldName - the name of the field in the persistence-capable classinterfaceName - the name of the remote interfacepublic abstract String getEjbNameForRemoteInterface(String ejbName, String fieldName, String interfaceName)
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 interfacepublic abstract String getRemoteInterfaceForEjbName(String name)
name - the name of the ejbpublic abstract String getEjbFieldForPersistenceField(String className, String fieldName)
className - the name of the persistence-capablefieldName - the name of the field in the persistence-capablepublic abstract String getPersistenceFieldForEjbField(String name, String fieldName)
name - the name of the ejbfieldName - the name of the field in the ejbpublic boolean isGeneratedField(String name, String fieldName)
true if the field is a generated field.
That includes: relationships generated for 2 way managed relationships,
key fields generated for use with UNKNOWN_KEY_CLASS, or
version fields generated to hold a version consistency column.name - the name of the ejbfieldName - the name of the field in the ejbtrue if the field is generated;false
otherwisepublic boolean isGeneratedEjbRelationship(String name, String fieldName)
true if the field in the persistence-capable
class which corresponds to the specified ejb name and field name pair
is one which was generated automatically for 2 way managed
relationships in the case that the ejb specifies one way
relationships.name - the name of the ejbfieldName - the name of the field in the ejbtrue if the field is generated;false
otherwisepublic List getGeneratedRelationshipsForEjbName(String name)
name - the name of the ejbpublic String[] getGeneratedFieldForEjbField(String name, String fieldName)
name - the name of the ejbfieldName - the name of the field in the ejbpublic String[] getEjbFieldForGeneratedField(String name, String fieldName)
name - the name of the ejbfieldName - the name of the field in the ejbCopyright © 2017. All rights reserved.