Class MetadataHelper
- java.lang.Object
-
- org.eclipse.persistence.internal.jpa.metadata.MetadataHelper
-
public class MetadataHelper extends java.lang.ObjectINTERNAL: Common helper methods for the metadata processing.- Since:
- TopLink EJB 3.0 Reference Implementation
- Author:
- Guy Pelletier
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringECLIPSELINK_ORM_FILEstatic java.lang.StringJPA_ORM_FILE
-
Constructor Summary
Constructors Constructor Description MetadataHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static java.lang.StringgetCanonicalName(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> properties)INTERNAL: Return the canonical name.static java.lang.ClassgetClassForName(java.lang.String classname, java.lang.ClassLoader loader)INTERNAL: Load a class from a given class name.static java.lang.StringgetName(java.lang.String name, java.lang.String defaultName, java.lang.String context, MetadataLogger logger, java.lang.Object location)INTERNAL: Helper method to return a field name from a candidate field name and a default field name.static java.lang.StringgetQualifiedCanonicalName(java.lang.String qualifiedName, java.util.Map<java.lang.String,java.lang.Object> properties)INTERNAL: Return the canonical name applying any default package.static java.lang.StringgetQualifiedCanonicalName(java.lang.String qualifiedName, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Return the qualified canonical name of the given qualified class name.static java.lang.IntegergetValue(java.lang.Integer value, java.lang.Integer defaultValue)INTERNAL: Helper method to return a string value if specified, otherwise returns the default value.static java.lang.StringgetValue(java.lang.String value, java.lang.String defaultValue)INTERNAL: Helper method to return a string value if specified, otherwise returns the default value.
-
-
-
Field Detail
-
JPA_ORM_FILE
public static final java.lang.String JPA_ORM_FILE
- See Also:
- Constant Field Values
-
ECLIPSELINK_ORM_FILE
public static final java.lang.String ECLIPSELINK_ORM_FILE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getCanonicalName
protected static java.lang.String getCanonicalName(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> properties)INTERNAL: Return the canonical name. This will apply the prefix and suffix qualifiers given to the canonical name. If the given prefix is null, the the default "" is applied. If the given suffix is null, then the default "_" will be applied.
-
getClassForName
public static java.lang.Class getClassForName(java.lang.String classname, java.lang.ClassLoader loader)INTERNAL: Load a class from a given class name. (XMLEntityMappings calls this one)
-
getName
public static java.lang.String getName(java.lang.String name, java.lang.String defaultName, java.lang.String context, MetadataLogger logger, java.lang.Object location)INTERNAL: Helper method to return a field name from a candidate field name and a default field name. Requires the context from where this method is called to output the correct logging message when defaulting the field name. In some cases, both the name and defaultName could be "" or null, therefore, don't log a message and return name.
-
getQualifiedCanonicalName
public static java.lang.String getQualifiedCanonicalName(java.lang.String qualifiedName, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Return the qualified canonical name of the given qualified class name. This method will check the session for a corresponding class that was processed during deploy. If one is not found, will build the canonical name applying any default package and the default suffix qualifier "_".
-
getQualifiedCanonicalName
public static java.lang.String getQualifiedCanonicalName(java.lang.String qualifiedName, java.util.Map<java.lang.String,java.lang.Object> properties)INTERNAL: Return the canonical name applying any default package. This will apply the prefix and suffix qualifiers given to the canonical name. If the prefix is null, the default "" is applied. If the suffix is null, then the default "_" will be applied.
-
getValue
public static java.lang.Integer getValue(java.lang.Integer value, java.lang.Integer defaultValue)INTERNAL: Helper method to return a string value if specified, otherwise returns the default value.
-
getValue
public static java.lang.String getValue(java.lang.String value, java.lang.String defaultValue)INTERNAL: Helper method to return a string value if specified, otherwise returns the default value.
-
-