Class TypeHelperImpl
- java.lang.Object
-
- org.eclipse.persistence.internal.helper.BasicTypeHelperImpl
-
- org.eclipse.persistence.internal.jpa.parsing.TypeHelperImpl
-
- All Implemented Interfaces:
TypeHelper
public class TypeHelperImpl extends BasicTypeHelperImpl implements TypeHelper
INTERNALPurpose: Implement type helper methods specified by TypeHelper. This implementation uses Class instances to represent a type.
-
-
Constructor Summary
Constructors Constructor Description TypeHelperImpl(AbstractSession session, ClassLoader classLoader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isCollectionValuedRelationship(Object ownerClass, String attribute)
Returns true if the specified attribute denotes a collection valued relationship attribute.boolean
isEmbeddable(Object type)
Returns true if the specified type denotes an embedded class.boolean
isEmbeddedAttribute(Object ownerClass, String attribute)
Returns true if the specified type denotes an embedded attribute.boolean
isEntityClass(Object type)
Returns true if the specified type denotes an entity class.boolean
isOrderableType(Object type)
Returns true if the specified type denotes an orderable typeboolean
isRelationship(Object ownerClass, String attribute)
Returns true if the specified attribute denotes a single valued or collection valued relationship attribute.boolean
isSimpleStateAttribute(Object ownerClass, String attribute)
Returns true if the specified type denotes a simple state attribute.boolean
isSingleValuedRelationship(Object ownerClass, String attribute)
Returns true if the specified attribute denotes a single valued relationship attribute.Object
resolveAttribute(Object ownerClass, String attribute)
Returns the type of the attribute with the specified name in the specified owner class.Object
resolveEnumConstant(Object type, String constant)
Returns the enum constant if the specified type denotes an enum type and the specified constant denotes a constant of the enum type.Object
resolveMapKey(Object ownerClass, String attribute)
Returns the type of the map key for the mapping on ownerClass named attribute Returns null if that mapping does not exist or does not contain a map keyQueryKey
resolveQueryKey(Object ownerClass, String attribute)
Returns a query key associated with the name of the attributeObject
resolveSchema(String schemaName)
Returns the type of the class corresponding to the specified abstract schema type.Object
resolveTypeName(String typeName)
Returns a type representation for the specified type name or null if there is no such type.-
Methods inherited from class org.eclipse.persistence.internal.helper.BasicTypeHelperImpl
binaryNumericPromotion, extendedBinaryNumericPromotion, getBigDecimalType, getBigIntegerType, getBooleanClassType, getBooleanType, getByteClassType, getByteType, getCharacterClassType, getCharType, getDateType, getDoubleClassType, getDoubleType, getFloatClassType, getFloatType, getInstance, getIntegerClassType, getIntType, getJavaClass, getLongClassType, getLongType, getMapEntryType, getObjectType, getPrimitiveType, getShortClassType, getShortType, getSQLDateType, getStringType, getTimestampType, getTimeType, getTypeName, getWrapperClass, isAssignableFrom, isBigDecimalType, isBigIntegerType, isBooleanType, isByteType, isCharacterType, isDateClass, isDoubleType, isEnumType, isFloatingPointType, isFloatType, isIntegerType, isIntegralType, isIntType, isLongType, isNumericType, isShortType, isStrictlyAssignableFrom, isStringType, isWrapperClass
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.persistence.internal.jpa.parsing.TypeHelper
extendedBinaryNumericPromotion, getBigDecimalType, getBigIntegerType, getBooleanType, getCharType, getDoubleClassType, getDoubleType, getFloatType, getIntType, getJavaClass, getLongClassType, getLongType, getMapEntryType, getObjectType, getSQLDateType, getStringType, getTimestampType, getTimeType, getTypeName, isAssignableFrom, isBigDecimalType, isBigIntegerType, isEnumType, isFloatingPointType, isIntegralType, isNumericType, isStringType
-
-
-
-
Constructor Detail
-
TypeHelperImpl
public TypeHelperImpl(AbstractSession session, ClassLoader classLoader)
-
-
Method Detail
-
resolveTypeName
public Object resolveTypeName(String typeName)
Returns a type representation for the specified type name or null if there is no such type.- Specified by:
resolveTypeName
in interfaceTypeHelper
-
resolveAttribute
public Object resolveAttribute(Object ownerClass, String attribute)
Returns the type of the attribute with the specified name in the specified owner class.- Specified by:
resolveAttribute
in interfaceTypeHelper
-
resolveMapKey
public Object resolveMapKey(Object ownerClass, String attribute)
Returns the type of the map key for the mapping on ownerClass named attribute Returns null if that mapping does not exist or does not contain a map key- Specified by:
resolveMapKey
in interfaceTypeHelper
-
resolveSchema
public Object resolveSchema(String schemaName)
Returns the type of the class corresponding to the specified abstract schema type.- Specified by:
resolveSchema
in interfaceTypeHelper
-
resolveEnumConstant
public Object resolveEnumConstant(Object type, String constant)
Returns the enum constant if the specified type denotes an enum type and the specified constant denotes a constant of the enum type.- Specified by:
resolveEnumConstant
in interfaceTypeHelper
-
isEntityClass
public boolean isEntityClass(Object type)
Returns true if the specified type denotes an entity class.- Specified by:
isEntityClass
in interfaceTypeHelper
-
isOrderableType
public boolean isOrderableType(Object type)
Returns true if the specified type denotes an orderable type- Specified by:
isOrderableType
in interfaceTypeHelper
- Overrides:
isOrderableType
in classBasicTypeHelperImpl
-
isEmbeddable
public boolean isEmbeddable(Object type)
Returns true if the specified type denotes an embedded class.- Specified by:
isEmbeddable
in interfaceTypeHelper
-
isEmbeddedAttribute
public boolean isEmbeddedAttribute(Object ownerClass, String attribute)
Returns true if the specified type denotes an embedded attribute.- Specified by:
isEmbeddedAttribute
in interfaceTypeHelper
-
isSimpleStateAttribute
public boolean isSimpleStateAttribute(Object ownerClass, String attribute)
Returns true if the specified type denotes a simple state attribute.- Specified by:
isSimpleStateAttribute
in interfaceTypeHelper
-
isRelationship
public boolean isRelationship(Object ownerClass, String attribute)
Returns true if the specified attribute denotes a single valued or collection valued relationship attribute.- Specified by:
isRelationship
in interfaceTypeHelper
-
isSingleValuedRelationship
public boolean isSingleValuedRelationship(Object ownerClass, String attribute)
Returns true if the specified attribute denotes a single valued relationship attribute.- Specified by:
isSingleValuedRelationship
in interfaceTypeHelper
-
isCollectionValuedRelationship
public boolean isCollectionValuedRelationship(Object ownerClass, String attribute)
Returns true if the specified attribute denotes a collection valued relationship attribute.- Specified by:
isCollectionValuedRelationship
in interfaceTypeHelper
-
resolveQueryKey
public QueryKey resolveQueryKey(Object ownerClass, String attribute)
Description copied from interface:TypeHelper
Returns a query key associated with the name of the attribute- Specified by:
resolveQueryKey
in interfaceTypeHelper
-
-