Class GenericTypeHelper
java.lang.Object
org.eclipse.persistence.jpa.jpql.tools.GenericTypeHelper
- All Implemented Interfaces:
ITypeHelper
This generic implementation of
ITypeHelper wraps ITypeHelper and delegates the
calls to it.- Since:
- 2.4
- Version:
- 2.4
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the;@link IType} for;@link BigDecimal}.Retrieves the;@link IType} for;@link BigInteger}.Retrieves the;@link IType} for;@link Boolean}.byteType()Retrieves the;@link IType} for;@link Byte}.Retrieves the;@link IType} for;@link Character}.Retrieves the;@link IType} for;@link Collection}.convertPrimitive(Object type) Converts the given;@link IType}, if it's representing a primitive type, into the class of the same type.dateType()Retrieves the;@link IType} for;@link Date}.Retrieves the;@link IType} for;@link Double}.enumType()Retrieves the;@link IType} for;@link Enum}.Retrieves the;@link IType} for;@link Float}.Returns the;@link IType} of the given Java type.Retrieves the external class for the given fully qualified class name.Retrieves the;@link IType} for;@link Integer}.booleanisBooleanType(Object type) Determines whether the given;@link IType} is a;@link Boolean}.booleanisCollectionType(Object type) Determines whether the given;@link IType} is an instance of;@link Collection}.booleanisDateType(Object type) Determines whether the given;@link IType} is a;@link Date},;@link Timestamp} or ;@link Calendar}.booleanisEnumType(Object type) Determines whether the given;@link IType} is an instance of;@link Enum}.booleanisFloatingType(Object type) Determines whether the given;@link IType} is an instance of a floating type, which is eitherFloat,Double, float or double.booleanisIntegralType(Object type) Determines whether the given;@link IType} is an instance of a floating type, which is eitherInteger,Long, int or float.booleanDetermines whether the given;@link IType} is an instance of;@link Map}.booleanisNumericType(Object type) Determines whether the given;@link IType} is an instance of;@link Numeric}.booleanisObjectType(Object type) Determines whether the given;@link IType} is the external form of;@link Object}.booleanisPrimitiveType(Object type) Determines whether the given;@link IType} represents a primitive type.booleanisStringType(Object type) Determines whether the given;@link IType} represents theStringclass.longType()Retrieves the;@link IType} for;@link Long}.Converts the given;@link IType}, if it's the primitive long, into theLongtype.mapType()Retrieves the;@link IType} for;@link Map}.Retrieves the;@link IType} for;@link Number}.Retrieves the;@link IType} for;@link Object}.Returns the;@link Object } for the;@link IType} representing theObjectclass.Retrieves the;@link IType} for the primitive boolean.Retrieves the;@link IType} for the primitive byte.Retrieves the;@link IType} for the primitive char.Retrieves the;@link IType} for the primitive double.Retrieves the;@link IType} for the primitive float.Retrieves the;@link IType} for the primitive int.Retrieves the;@link IType} for the primitive long.Retrieves the;@link IType} for the primitive short.Retrieves the;@link IType} for;@link Short}.Retrieves the;@link IType} for;@link String}.Retrieves the;@link IType} for;@link Timestamp}.toBooleanType(Object type) Converts the given;@link IType}, if it's the primitive boolean, into theBooleantype.toByteType(Object type) Converts the given;@link IType}, if it's the primitive byte, into theBytetype.toDoubleType(Object type) Converts the given;@link IType}, if it's the primitive double, into theDoubletype.toFloatType(Object type) Converts the given;@link IType}, if it's the primitive float, into theFloattype.toIntegerType(Object type) Converts the given;@link IType}, if it's the primitive int, into theIntegertype.toShortType(Object type) Converts the given;@link IType}, if it's the primitive short, into theShorttype.Retrieves the;@link IType} that represents an unknown type.Returns the;@link Object } for the;@link IType} representing an unknown type.
-
Constructor Details
-
GenericTypeHelper
Creates a newGenericTypeHelper.- Parameters:
delegate- TheTypeHelperthat is wrapped by this one and all the calls are delegated to it
-
-
Method Details
-
bigDecimal
Description copied from interface:ITypeHelperRetrieves the;@link IType} for;@link BigDecimal}.- Specified by:
bigDecimalin interfaceITypeHelper- Returns:
- The external form of the
BigDecimalclass
-
bigInteger
Description copied from interface:ITypeHelperRetrieves the;@link IType} for;@link BigInteger}.- Specified by:
bigIntegerin interfaceITypeHelper- Returns:
- The external form of the
BigIntegerclass
-
booleanType
Description copied from interface:ITypeHelperRetrieves the;@link IType} for;@link Boolean}.- Specified by:
booleanTypein interfaceITypeHelper- Returns:
- The external form of the
Booleanclass
-
byteType
Description copied from interface:ITypeHelperRetrieves the;@link IType} for;@link Byte}.- Specified by:
byteTypein interfaceITypeHelper- Returns:
- The external form of the
Byteclass
-
characterType
Description copied from interface:ITypeHelperRetrieves the;@link IType} for;@link Character}.- Specified by:
characterTypein interfaceITypeHelper- Returns:
- The external form of the
Characterclass
-
collectionType
Description copied from interface:ITypeHelperRetrieves the;@link IType} for;@link Collection}.- Specified by:
collectionTypein interfaceITypeHelper- Returns:
- The external form of the
Collectionclass
-
convertPrimitive
Description copied from interface:ITypeHelperConverts the given;@link IType}, if it's representing a primitive type, into the class of the same type.- Specified by:
convertPrimitivein interfaceITypeHelper- Parameters:
type- Type to possibly convert from the primitive into the class- Returns:
- The given;@link IType} if it's not a primitive type otherwise the primitive type will have been converted into the class of that primitive
-
dateType
Description copied from interface:ITypeHelperRetrieves the;@link IType} for;@link Date}.- Specified by:
dateTypein interfaceITypeHelper- Returns:
- The external form of the
Dateclass
-
doubleType
Description copied from interface:ITypeHelperRetrieves the;@link IType} for;@link Double}.- Specified by:
doubleTypein interfaceITypeHelper- Returns:
- The external form of the
Doubleclass
-
enumType
Description copied from interface:ITypeHelperRetrieves the;@link IType} for;@link Enum}.- Specified by:
enumTypein interfaceITypeHelper- Returns:
- The external form of the
Enumclass
-
floatType
Description copied from interface:ITypeHelperRetrieves the;@link IType} for;@link Float}.- Specified by:
floatTypein interfaceITypeHelper- Returns:
- The external form of the
Floatclass
-
getType
Description copied from interface:ITypeHelperReturns the;@link IType} of the given Java type.- Specified by:
getTypein interfaceITypeHelper- Parameters:
type- The Java type for which its external form will be returned- Returns:
- The;@link IType} representing the given Java type
-
getType
Description copied from interface:ITypeHelperRetrieves the external class for the given fully qualified class name.- Specified by:
getTypein interfaceITypeHelper- Parameters:
typeName- The fully qualified class name of the class to retrieve- Returns:
- The external form of the class to retrieve
-
integerType
Description copied from interface:ITypeHelperRetrieves the;@link IType} for;@link Integer}.- Specified by:
integerTypein interfaceITypeHelper- Returns:
- The external form of the
Integerclass
-
isBooleanType
Description copied from interface:ITypeHelperDetermines whether the given;@link IType} is a;@link Boolean}.- Specified by:
isBooleanTypein interfaceITypeHelper- Parameters:
type- The type to check it's assignability- Returns:
trueif the given;@link IType} is a;@link Boolean};falseotherwise
-
isCollectionType
Description copied from interface:ITypeHelperDetermines whether the given;@link IType} is an instance of;@link Collection}.- Specified by:
isCollectionTypein interfaceITypeHelper- Parameters:
type- The type to check it's assignability- Returns:
trueif the given;@link IType} is an instance of;@link Collection};falseotherwise
-
isDateType
Description copied from interface:ITypeHelperDetermines whether the given;@link IType} is a;@link Date},;@link Timestamp} or ;@link Calendar}.- Specified by:
isDateTypein interfaceITypeHelper- Parameters:
type- The type to check it's assignability- Returns:
trueif the given;@link IType} is a;@link Date},;@link Timestamp} or ;@link Calendar}
-
isEnumType
Description copied from interface:ITypeHelperDetermines whether the given;@link IType} is an instance of;@link Enum}.- Specified by:
isEnumTypein interfaceITypeHelper- Parameters:
type- The type to check it's assignability- Returns:
trueif the given;@link IType} is an instance of;@link Enum};falseotherwise
-
isFloatingType
Description copied from interface:ITypeHelperDetermines whether the given;@link IType} is an instance of a floating type, which is eitherFloat,Double, float or double.- Specified by:
isFloatingTypein interfaceITypeHelper- Parameters:
type- The type to check it's assignability- Returns:
trueif the given;@link IType} is a floating type;falseotherwise
-
isIntegralType
Description copied from interface:ITypeHelperDetermines whether the given;@link IType} is an instance of a floating type, which is eitherInteger,Long, int or float.- Specified by:
isIntegralTypein interfaceITypeHelper- Parameters:
type- The type to check it's assignability- Returns:
trueif the given;@link IType} is a integral type;falseotherwise
-
isMapType
Description copied from interface:ITypeHelperDetermines whether the given;@link IType} is an instance of;@link Map}.- Specified by:
isMapTypein interfaceITypeHelper- Parameters:
type- The type to check it's assignability- Returns:
trueif the given;@link IType} is an instance of;@link Map};falseotherwise
-
isNumericType
Description copied from interface:ITypeHelperDetermines whether the given;@link IType} is an instance of;@link Numeric}.- Specified by:
isNumericTypein interfaceITypeHelper- Parameters:
type- The type to check it's assignability- Returns:
trueif the given;@link IType} is an instance of;@link Numeric};falseotherwise
-
isObjectType
Description copied from interface:ITypeHelperDetermines whether the given;@link IType} is the external form of;@link Object}.- Specified by:
isObjectTypein interfaceITypeHelper- Parameters:
type- The type to check it's assignability- Returns:
trueif the given;@link IType} is the external form of;@link Object}
-
isPrimitiveType
Description copied from interface:ITypeHelperDetermines whether the given;@link IType} represents a primitive type.- Specified by:
isPrimitiveTypein interfaceITypeHelper- Parameters:
type- The type to check it's assignability- Returns:
trueif the given;@link IType} represents a primitive;falseotherwise
-
isStringType
Description copied from interface:ITypeHelperDetermines whether the given;@link IType} represents theStringclass.- Specified by:
isStringTypein interfaceITypeHelper- Parameters:
type- The type to check it's assignability- Returns:
trueif the given;@link IType} represents theStringclass;falseotherwise
-
longType
Description copied from interface:ITypeHelperRetrieves the;@link IType} for;@link Long}.- Specified by:
longTypein interfaceITypeHelper- Returns:
- The external form of the
Longclass
-
longType
Description copied from interface:ITypeHelperConverts the given;@link IType}, if it's the primitive long, into theLongtype.- Specified by:
longTypein interfaceITypeHelper- Parameters:
type- The;@link IType} to possibly convert- Returns:
- The given type if it's not the primitive long or the;@link IType} for the class
Long
-
mapType
Description copied from interface:ITypeHelperRetrieves the;@link IType} for;@link Map}.- Specified by:
mapTypein interfaceITypeHelper- Returns:
- The external form of the
Mapclass
-
numberType
Description copied from interface:ITypeHelperRetrieves the;@link IType} for;@link Number}.- Specified by:
numberTypein interfaceITypeHelper- Returns:
- The external form of the
Numberclass
-
objectType
Description copied from interface:ITypeHelperRetrieves the;@link IType} for;@link Object}.- Specified by:
objectTypein interfaceITypeHelper- Returns:
- The external form of the
Objectclass
-
objectTypeDeclaration
Description copied from interface:ITypeHelperReturns the;@link Object } for the;@link IType} representing theObjectclass.- Specified by:
objectTypeDeclarationin interfaceITypeHelper- Returns:
- The;@link Object } of the
Objectclass
-
primitiveBoolean
Description copied from interface:ITypeHelperRetrieves the;@link IType} for the primitive boolean.- Specified by:
primitiveBooleanin interfaceITypeHelper- Returns:
- The external form of the primitive boolean
-
primitiveByte
Description copied from interface:ITypeHelperRetrieves the;@link IType} for the primitive byte.- Specified by:
primitiveBytein interfaceITypeHelper- Returns:
- The external form of the primitive byte
-
primitiveChar
Description copied from interface:ITypeHelperRetrieves the;@link IType} for the primitive char.- Specified by:
primitiveCharin interfaceITypeHelper- Returns:
- The external form of the primitive char
-
primitiveDouble
Description copied from interface:ITypeHelperRetrieves the;@link IType} for the primitive double.- Specified by:
primitiveDoublein interfaceITypeHelper- Returns:
- The external form of the primitive double
-
primitiveFloat
Description copied from interface:ITypeHelperRetrieves the;@link IType} for the primitive float.- Specified by:
primitiveFloatin interfaceITypeHelper- Returns:
- The external form of the primitive float
-
primitiveInteger
Description copied from interface:ITypeHelperRetrieves the;@link IType} for the primitive int.- Specified by:
primitiveIntegerin interfaceITypeHelper- Returns:
- The external form of the primitive int
-
primitiveLong
Description copied from interface:ITypeHelperRetrieves the;@link IType} for the primitive long.- Specified by:
primitiveLongin interfaceITypeHelper- Returns:
- The external form of the primitive long
-
primitiveShort
Description copied from interface:ITypeHelperRetrieves the;@link IType} for the primitive short.- Specified by:
primitiveShortin interfaceITypeHelper- Returns:
- The external form of the primitive short
-
shortType
Description copied from interface:ITypeHelperRetrieves the;@link IType} for;@link Short}.- Specified by:
shortTypein interfaceITypeHelper- Returns:
- The external form of the
Shortclass
-
stringType
Description copied from interface:ITypeHelperRetrieves the;@link IType} for;@link String}.- Specified by:
stringTypein interfaceITypeHelper- Returns:
- The external form of the
Stringclass
-
timestampType
Description copied from interface:ITypeHelperRetrieves the;@link IType} for;@link Timestamp}.- Specified by:
timestampTypein interfaceITypeHelper- Returns:
- The external form of the
Timestampclass
-
toBooleanType
Description copied from interface:ITypeHelperConverts the given;@link IType}, if it's the primitive boolean, into theBooleantype.- Specified by:
toBooleanTypein interfaceITypeHelper- Parameters:
type- The;@link IType} to possibly convert- Returns:
- The given type if it's not the primitive boolean or the;@link IType} for the class
Boolean
-
toByteType
Description copied from interface:ITypeHelperConverts the given;@link IType}, if it's the primitive byte, into theBytetype.- Specified by:
toByteTypein interfaceITypeHelper- Parameters:
type- The;@link IType} to possibly convert- Returns:
- The given type if it's not the primitive byte or the;@link IType} for the class
Byte
-
toDoubleType
Description copied from interface:ITypeHelperConverts the given;@link IType}, if it's the primitive double, into theDoubletype.- Specified by:
toDoubleTypein interfaceITypeHelper- Parameters:
type- The;@link IType} to possibly convert- Returns:
- The given type if it's not the primitive double or the;@link IType} for the class
Double
-
toFloatType
Description copied from interface:ITypeHelperConverts the given;@link IType}, if it's the primitive float, into theFloattype.- Specified by:
toFloatTypein interfaceITypeHelper- Parameters:
type- The;@link IType} to possibly convert- Returns:
- The given type if it's not the primitive float or the;@link IType} for the class
Float
-
toIntegerType
Description copied from interface:ITypeHelperConverts the given;@link IType}, if it's the primitive int, into theIntegertype.- Specified by:
toIntegerTypein interfaceITypeHelper- Parameters:
type- The;@link IType} to possibly convert- Returns:
- The given type if it's not the primitive int or the;@link IType} for the class
Integer
-
toShortType
Description copied from interface:ITypeHelperConverts the given;@link IType}, if it's the primitive short, into theShorttype.- Specified by:
toShortTypein interfaceITypeHelper- Parameters:
type- The;@link IType} to possibly convert- Returns:
- The given type if it's not the primitive short or the;@link IType} for the class
Short
-
unknownType
Description copied from interface:ITypeHelperRetrieves the;@link IType} that represents an unknown type.- Specified by:
unknownTypein interfaceITypeHelper- Returns:
- The external form of an unknown type
-
unknownTypeDeclaration
Description copied from interface:ITypeHelperReturns the;@link Object } for the;@link IType} representing an unknown type.- Specified by:
unknownTypeDeclarationin interfaceITypeHelper- Returns:
- The;@link Object } of the unknown type
-