Package org.eclipse.persistence.jpa.jpql
Interface ITypeHelper
- All Known Implementing Classes:
GenericTypeHelper
public interface ITypeHelper
- Since:
- 2.4
- Version:
- 2.4
-
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}.boolean
isBooleanType
(Object type) Determines whether the given;@link IType} is a;@link Boolean}.boolean
isCollectionType
(Object type) Determines whether the given;@link IType} is an instance of;@link Collection}.boolean
isDateType
(Object type) Determines whether the given;@link IType} is a;@link Date},;@link Timestamp} or ;@link Calendar}.boolean
isEnumType
(Object type) Determines whether the given;@link IType} is an instance of;@link Enum}.boolean
isFloatingType
(Object type) Determines whether the given;@link IType} is an instance of a floating type, which is eitherFloat
,Double
, float or double.boolean
isIntegralType
(Object type) Determines whether the given;@link IType} is an instance of a floating type, which is eitherInteger
,Long
, int or float.boolean
Determines whether the given;@link IType} is an instance of;@link Map}.boolean
isNumericType
(Object type) Determines whether the given;@link IType} is an instance of;@link Numeric}.boolean
isObjectType
(Object type) Determines whether the given;@link IType} is the external form of;@link Object}.boolean
isPrimitiveType
(Object type) Determines whether the given;@link IType} represents a primitive type.boolean
isStringType
(Object type) Determines whether the given;@link IType} represents theString
class.longType()
Retrieves the;@link IType} for;@link Long}.Converts the given;@link IType}, if it's the primitive long, into theLong
type.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 theObject
class.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 theBoolean
type.toByteType
(Object type) Converts the given;@link IType}, if it's the primitive byte, into theByte
type.toDoubleType
(Object type) Converts the given;@link IType}, if it's the primitive double, into theDouble
type.toFloatType
(Object type) Converts the given;@link IType}, if it's the primitive float, into theFloat
type.toIntegerType
(Object type) Converts the given;@link IType}, if it's the primitive int, into theInteger
type.toShortType
(Object type) Converts the given;@link IType}, if it's the primitive short, into theShort
type.Retrieves the;@link IType} that represents an unknown type.Returns the;@link Object } for the;@link IType} representing an unknown type.
-
Method Details
-
bigDecimal
Object bigDecimal()Retrieves the;@link IType} for;@link BigDecimal}.- Returns:
- The external form of the
BigDecimal
class
-
bigInteger
Object bigInteger()Retrieves the;@link IType} for;@link BigInteger}.- Returns:
- The external form of the
BigInteger
class
-
booleanType
Object booleanType()Retrieves the;@link IType} for;@link Boolean}.- Returns:
- The external form of the
Boolean
class
-
byteType
Object byteType()Retrieves the;@link IType} for;@link Byte}.- Returns:
- The external form of the
Byte
class
-
characterType
Object characterType()Retrieves the;@link IType} for;@link Character}.- Returns:
- The external form of the
Character
class
-
collectionType
Object collectionType()Retrieves the;@link IType} for;@link Collection}.- Returns:
- The external form of the
Collection
class
-
convertPrimitive
Converts the given;@link IType}, if it's representing a primitive type, into the class of the same type.- 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
Object dateType()Retrieves the;@link IType} for;@link Date}.- Returns:
- The external form of the
Date
class
-
doubleType
Object doubleType()Retrieves the;@link IType} for;@link Double}.- Returns:
- The external form of the
Double
class
-
enumType
Object enumType()Retrieves the;@link IType} for;@link Enum}.- Returns:
- The external form of the
Enum
class
-
floatType
Object floatType()Retrieves the;@link IType} for;@link Float}.- Returns:
- The external form of the
Float
class
-
getType
Returns the;@link IType} of the given Java type.- Parameters:
type
- The Java type for which its external form will be returned- Returns:
- The;@link IType} representing the given Java type
-
getType
Retrieves the external class for the given fully qualified class name.- Parameters:
typeName
- The fully qualified class name of the class to retrieve- Returns:
- The external form of the class to retrieve
-
integerType
Object integerType()Retrieves the;@link IType} for;@link Integer}.- Returns:
- The external form of the
Integer
class
-
isBooleanType
Determines whether the given;@link IType} is a;@link Boolean}.- Parameters:
type
- The type to check it's assignability- Returns:
true
if the given;@link IType} is a;@link Boolean};false
otherwise
-
isCollectionType
Determines whether the given;@link IType} is an instance of;@link Collection}.- Parameters:
type
- The type to check it's assignability- Returns:
true
if the given;@link IType} is an instance of;@link Collection};false
otherwise
-
isDateType
Determines whether the given;@link IType} is a;@link Date},;@link Timestamp} or ;@link Calendar}.- Parameters:
type
- The type to check it's assignability- Returns:
true
if the given;@link IType} is a;@link Date},;@link Timestamp} or ;@link Calendar}
-
isEnumType
Determines whether the given;@link IType} is an instance of;@link Enum}.- Parameters:
type
- The type to check it's assignability- Returns:
true
if the given;@link IType} is an instance of;@link Enum};false
otherwise
-
isFloatingType
Determines whether the given;@link IType} is an instance of a floating type, which is eitherFloat
,Double
, float or double.- Parameters:
type
- The type to check it's assignability- Returns:
true
if the given;@link IType} is a floating type;false
otherwise
-
isIntegralType
Determines whether the given;@link IType} is an instance of a floating type, which is eitherInteger
,Long
, int or float.- Parameters:
type
- The type to check it's assignability- Returns:
true
if the given;@link IType} is a integral type;false
otherwise
-
isMapType
Determines whether the given;@link IType} is an instance of;@link Map}.- Parameters:
type
- The type to check it's assignability- Returns:
true
if the given;@link IType} is an instance of;@link Map};false
otherwise
-
isNumericType
Determines whether the given;@link IType} is an instance of;@link Numeric}.- Parameters:
type
- The type to check it's assignability- Returns:
true
if the given;@link IType} is an instance of;@link Numeric};false
otherwise
-
isObjectType
Determines whether the given;@link IType} is the external form of;@link Object}.- Parameters:
type
- The type to check it's assignability- Returns:
true
if the given;@link IType} is the external form of;@link Object}
-
isPrimitiveType
Determines whether the given;@link IType} represents a primitive type.- Parameters:
type
- The type to check it's assignability- Returns:
true
if the given;@link IType} represents a primitive;false
otherwise
-
isStringType
Determines whether the given;@link IType} represents theString
class.- Parameters:
type
- The type to check it's assignability- Returns:
true
if the given;@link IType} represents theString
class;false
otherwise
-
longType
Object longType()Retrieves the;@link IType} for;@link Long}.- Returns:
- The external form of the
Long
class
-
longType
Converts the given;@link IType}, if it's the primitive long, into theLong
type.- 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
Object mapType()Retrieves the;@link IType} for;@link Map}.- Returns:
- The external form of the
Map
class
-
numberType
Object numberType()Retrieves the;@link IType} for;@link Number}.- Returns:
- The external form of the
Number
class
-
objectType
Object objectType()Retrieves the;@link IType} for;@link Object}.- Returns:
- The external form of the
Object
class
-
objectTypeDeclaration
Object objectTypeDeclaration()Returns the;@link Object } for the;@link IType} representing theObject
class.- Returns:
- The;@link Object } of the
Object
class
-
primitiveBoolean
Object primitiveBoolean()Retrieves the;@link IType} for the primitive boolean.- Returns:
- The external form of the primitive boolean
-
primitiveByte
Object primitiveByte()Retrieves the;@link IType} for the primitive byte.- Returns:
- The external form of the primitive byte
-
primitiveChar
Object primitiveChar()Retrieves the;@link IType} for the primitive char.- Returns:
- The external form of the primitive char
-
primitiveDouble
Object primitiveDouble()Retrieves the;@link IType} for the primitive double.- Returns:
- The external form of the primitive double
-
primitiveFloat
Object primitiveFloat()Retrieves the;@link IType} for the primitive float.- Returns:
- The external form of the primitive float
-
primitiveInteger
Object primitiveInteger()Retrieves the;@link IType} for the primitive int.- Returns:
- The external form of the primitive int
-
primitiveLong
Object primitiveLong()Retrieves the;@link IType} for the primitive long.- Returns:
- The external form of the primitive long
-
primitiveShort
Object primitiveShort()Retrieves the;@link IType} for the primitive short.- Returns:
- The external form of the primitive short
-
shortType
Object shortType()Retrieves the;@link IType} for;@link Short}.- Returns:
- The external form of the
Short
class
-
stringType
Object stringType()Retrieves the;@link IType} for;@link String}.- Returns:
- The external form of the
String
class
-
timestampType
Object timestampType()Retrieves the;@link IType} for;@link Timestamp}.- Returns:
- The external form of the
Timestamp
class
-
toBooleanType
Converts the given;@link IType}, if it's the primitive boolean, into theBoolean
type.- 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
Converts the given;@link IType}, if it's the primitive byte, into theByte
type.- 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
Converts the given;@link IType}, if it's the primitive double, into theDouble
type.- 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
Converts the given;@link IType}, if it's the primitive float, into theFloat
type.- 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
Converts the given;@link IType}, if it's the primitive int, into theInteger
type.- 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
Converts the given;@link IType}, if it's the primitive short, into theShort
type.- 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
Object unknownType()Retrieves the;@link IType} that represents an unknown type.- Returns:
- The external form of an unknown type
-
unknownTypeDeclaration
Object unknownTypeDeclaration()Returns the;@link Object } for the;@link IType} representing an unknown type.- Returns:
- The;@link Object } of the unknown type
-