Package org.eclipse.persistence.jpa.jpql
Interface ITypeHelper
-
- All Known Implementing Classes:
GenericTypeHelper
public interface ITypeHelper- Version:
- 2.4
- Author:
- Pascal Filion
- Since:
- 2.4
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.ObjectbigDecimal()Retrieves the;@link IType} for;@link BigDecimal}.java.lang.ObjectbigInteger()Retrieves the;@link IType} for;@link BigInteger}.java.lang.ObjectbooleanType()Retrieves the;@link IType} for;@link Boolean}.java.lang.ObjectbyteType()Retrieves the;@link IType} for;@link Byte}.java.lang.ObjectcharacterType()Retrieves the;@link IType} for;@link Character}.java.lang.ObjectcollectionType()Retrieves the;@link IType} for;@link Collection}.java.lang.ObjectconvertPrimitive(java.lang.Object type)Converts the given;@link IType}, if it's representing a primitive type, into the class of the same type.java.lang.ObjectdateType()Retrieves the;@link IType} for;@link Date}.java.lang.ObjectdoubleType()Retrieves the;@link IType} for;@link Double}.java.lang.ObjectenumType()Retrieves the;@link IType} for;@link Enum}.java.lang.ObjectfloatType()Retrieves the;@link IType} for;@link Float}.java.lang.ObjectgetType(java.lang.Class<?> type)Returns the;@link IType} of the given Java type.java.lang.ObjectgetType(java.lang.String typeName)Retrieves the external class for the given fully qualified class name.java.lang.ObjectintegerType()Retrieves the;@link IType} for;@link Integer}.booleanisBooleanType(java.lang.Object type)Determines whether the given;@link IType} is a;@link Boolean}.booleanisCollectionType(java.lang.Object type)Determines whether the given;@link IType} is an instance of;@link Collection}.booleanisDateType(java.lang.Object type)Determines whether the given;@link IType} is a;@link Date},;@link Timestamp} or ;@link Calendar}.booleanisEnumType(java.lang.Object type)Determines whether the given;@link IType} is an instance of;@link Enum}.booleanisFloatingType(java.lang.Object type)Determines whether the given;@link IType} is an instance of a floating type, which is eitherFloat,Double, float or double.booleanisIntegralType(java.lang.Object type)Determines whether the given;@link IType} is an instance of a floating type, which is eitherInteger,Long, int or float.booleanisMapType(java.lang.Object type)Determines whether the given;@link IType} is an instance of;@link Map}.booleanisNumericType(java.lang.Object type)Determines whether the given;@link IType} is an instance of;@link Numeric}.booleanisObjectType(java.lang.Object type)Determines whether the given;@link IType} is the external form of;@link Object}.booleanisPrimitiveType(java.lang.Object type)Determines whether the given;@link IType} represents a primitive type.booleanisStringType(java.lang.Object type)Determines whether the given;@link IType} represents theStringclass.java.lang.ObjectlongType()Retrieves the;@link IType} for;@link Long}.java.lang.ObjectlongType(java.lang.Object type)Converts the given;@link IType}, if it's the primitive long, into theLongtype.java.lang.ObjectmapType()Retrieves the;@link IType} for;@link Map}.java.lang.ObjectnumberType()Retrieves the;@link IType} for;@link Number}.java.lang.ObjectobjectType()Retrieves the;@link IType} for;@link Object}.java.lang.ObjectobjectTypeDeclaration()Returns the;@link Object } for the;@link IType} representing theObjectclass.java.lang.ObjectprimitiveBoolean()Retrieves the;@link IType} for the primitive boolean.java.lang.ObjectprimitiveByte()Retrieves the;@link IType} for the primitive byte.java.lang.ObjectprimitiveChar()Retrieves the;@link IType} for the primitive char.java.lang.ObjectprimitiveDouble()Retrieves the;@link IType} for the primitive double.java.lang.ObjectprimitiveFloat()Retrieves the;@link IType} for the primitive float.java.lang.ObjectprimitiveInteger()Retrieves the;@link IType} for the primitive int.java.lang.ObjectprimitiveLong()Retrieves the;@link IType} for the primitive long.java.lang.ObjectprimitiveShort()Retrieves the;@link IType} for the primitive short.java.lang.ObjectshortType()Retrieves the;@link IType} for;@link Short}.java.lang.ObjectstringType()Retrieves the;@link IType} for;@link String}.java.lang.ObjecttimestampType()Retrieves the;@link IType} for;@link Timestamp}.java.lang.ObjecttoBooleanType(java.lang.Object type)Converts the given;@link IType}, if it's the primitive boolean, into theBooleantype.java.lang.ObjecttoByteType(java.lang.Object type)Converts the given;@link IType}, if it's the primitive byte, into theBytetype.java.lang.ObjecttoDoubleType(java.lang.Object type)Converts the given;@link IType}, if it's the primitive double, into theDoubletype.java.lang.ObjecttoFloatType(java.lang.Object type)Converts the given;@link IType}, if it's the primitive float, into theFloattype.java.lang.ObjecttoIntegerType(java.lang.Object type)Converts the given;@link IType}, if it's the primitive int, into theIntegertype.java.lang.ObjecttoShortType(java.lang.Object type)Converts the given;@link IType}, if it's the primitive short, into theShorttype.java.lang.ObjectunknownType()Retrieves the;@link IType} that represents an unknown type.java.lang.ObjectunknownTypeDeclaration()Returns the;@link Object } for the;@link IType} representing an unknown type.
-
-
-
Method Detail
-
bigDecimal
java.lang.Object bigDecimal()
Retrieves the;@link IType} for;@link BigDecimal}.- Returns:
- The external form of the
BigDecimalclass
-
bigInteger
java.lang.Object bigInteger()
Retrieves the;@link IType} for;@link BigInteger}.- Returns:
- The external form of the
BigIntegerclass
-
booleanType
java.lang.Object booleanType()
Retrieves the;@link IType} for;@link Boolean}.- Returns:
- The external form of the
Booleanclass
-
byteType
java.lang.Object byteType()
Retrieves the;@link IType} for;@link Byte}.- Returns:
- The external form of the
Byteclass
-
characterType
java.lang.Object characterType()
Retrieves the;@link IType} for;@link Character}.- Returns:
- The external form of the
Characterclass
-
collectionType
java.lang.Object collectionType()
Retrieves the;@link IType} for;@link Collection}.- Returns:
- The external form of the
Collectionclass
-
convertPrimitive
java.lang.Object convertPrimitive(java.lang.Object type)
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
java.lang.Object dateType()
Retrieves the;@link IType} for;@link Date}.- Returns:
- The external form of the
Dateclass
-
doubleType
java.lang.Object doubleType()
Retrieves the;@link IType} for;@link Double}.- Returns:
- The external form of the
Doubleclass
-
enumType
java.lang.Object enumType()
Retrieves the;@link IType} for;@link Enum}.- Returns:
- The external form of the
Enumclass
-
floatType
java.lang.Object floatType()
Retrieves the;@link IType} for;@link Float}.- Returns:
- The external form of the
Floatclass
-
getType
java.lang.Object getType(java.lang.Class<?> type)
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
java.lang.Object getType(java.lang.String typeName)
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
java.lang.Object integerType()
Retrieves the;@link IType} for;@link Integer}.- Returns:
- The external form of the
Integerclass
-
isBooleanType
boolean isBooleanType(java.lang.Object type)
Determines whether the given;@link IType} is a;@link Boolean}.- Parameters:
type- The type to check it's assignability- Returns:
trueif the given;@link IType} is a;@link Boolean};falseotherwise
-
isCollectionType
boolean isCollectionType(java.lang.Object type)
Determines whether the given;@link IType} is an instance of;@link Collection}.- Parameters:
type- The type to check it's assignability- Returns:
trueif the given;@link IType} is an instance of;@link Collection};falseotherwise
-
isDateType
boolean isDateType(java.lang.Object type)
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:
trueif the given;@link IType} is a;@link Date},;@link Timestamp} or ;@link Calendar}
-
isEnumType
boolean isEnumType(java.lang.Object type)
Determines whether the given;@link IType} is an instance of;@link Enum}.- Parameters:
type- The type to check it's assignability- Returns:
trueif the given;@link IType} is an instance of;@link Enum};falseotherwise
-
isFloatingType
boolean isFloatingType(java.lang.Object type)
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:
trueif the given;@link IType} is a floating type;falseotherwise
-
isIntegralType
boolean isIntegralType(java.lang.Object type)
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:
trueif the given;@link IType} is a integral type;falseotherwise
-
isMapType
boolean isMapType(java.lang.Object type)
Determines whether the given;@link IType} is an instance of;@link Map}.- Parameters:
type- The type to check it's assignability- Returns:
trueif the given;@link IType} is an instance of;@link Map};falseotherwise
-
isNumericType
boolean isNumericType(java.lang.Object type)
Determines whether the given;@link IType} is an instance of;@link Numeric}.- Parameters:
type- The type to check it's assignability- Returns:
trueif the given;@link IType} is an instance of;@link Numeric};falseotherwise
-
isObjectType
boolean isObjectType(java.lang.Object type)
Determines whether the given;@link IType} is the external form of;@link Object}.- Parameters:
type- The type to check it's assignability- Returns:
trueif the given;@link IType} is the external form of;@link Object}
-
isPrimitiveType
boolean isPrimitiveType(java.lang.Object type)
Determines whether the given;@link IType} represents a primitive type.- Parameters:
type- The type to check it's assignability- Returns:
trueif the given;@link IType} represents a primitive;falseotherwise
-
isStringType
boolean isStringType(java.lang.Object type)
Determines whether the given;@link IType} represents theStringclass.- Parameters:
type- The type to check it's assignability- Returns:
trueif the given;@link IType} represents theStringclass;falseotherwise
-
longType
java.lang.Object longType()
Retrieves the;@link IType} for;@link Long}.- Returns:
- The external form of the
Longclass
-
longType
java.lang.Object longType(java.lang.Object type)
Converts the given;@link IType}, if it's the primitive long, into theLongtype.- 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
java.lang.Object mapType()
Retrieves the;@link IType} for;@link Map}.- Returns:
- The external form of the
Mapclass
-
numberType
java.lang.Object numberType()
Retrieves the;@link IType} for;@link Number}.- Returns:
- The external form of the
Numberclass
-
objectType
java.lang.Object objectType()
Retrieves the;@link IType} for;@link Object}.- Returns:
- The external form of the
Objectclass
-
objectTypeDeclaration
java.lang.Object objectTypeDeclaration()
Returns the;@link Object } for the;@link IType} representing theObjectclass.- Returns:
- The;@link Object } of the
Objectclass
-
primitiveBoolean
java.lang.Object primitiveBoolean()
Retrieves the;@link IType} for the primitive boolean.- Returns:
- The external form of the primitive boolean
-
primitiveByte
java.lang.Object primitiveByte()
Retrieves the;@link IType} for the primitive byte.- Returns:
- The external form of the primitive byte
-
primitiveChar
java.lang.Object primitiveChar()
Retrieves the;@link IType} for the primitive char.- Returns:
- The external form of the primitive char
-
primitiveDouble
java.lang.Object primitiveDouble()
Retrieves the;@link IType} for the primitive double.- Returns:
- The external form of the primitive double
-
primitiveFloat
java.lang.Object primitiveFloat()
Retrieves the;@link IType} for the primitive float.- Returns:
- The external form of the primitive float
-
primitiveInteger
java.lang.Object primitiveInteger()
Retrieves the;@link IType} for the primitive int.- Returns:
- The external form of the primitive int
-
primitiveLong
java.lang.Object primitiveLong()
Retrieves the;@link IType} for the primitive long.- Returns:
- The external form of the primitive long
-
primitiveShort
java.lang.Object primitiveShort()
Retrieves the;@link IType} for the primitive short.- Returns:
- The external form of the primitive short
-
shortType
java.lang.Object shortType()
Retrieves the;@link IType} for;@link Short}.- Returns:
- The external form of the
Shortclass
-
stringType
java.lang.Object stringType()
Retrieves the;@link IType} for;@link String}.- Returns:
- The external form of the
Stringclass
-
timestampType
java.lang.Object timestampType()
Retrieves the;@link IType} for;@link Timestamp}.- Returns:
- The external form of the
Timestampclass
-
toBooleanType
java.lang.Object toBooleanType(java.lang.Object type)
Converts the given;@link IType}, if it's the primitive boolean, into theBooleantype.- 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
java.lang.Object toByteType(java.lang.Object type)
Converts the given;@link IType}, if it's the primitive byte, into theBytetype.- 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
java.lang.Object toDoubleType(java.lang.Object type)
Converts the given;@link IType}, if it's the primitive double, into theDoubletype.- 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
java.lang.Object toFloatType(java.lang.Object type)
Converts the given;@link IType}, if it's the primitive float, into theFloattype.- 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
java.lang.Object toIntegerType(java.lang.Object type)
Converts the given;@link IType}, if it's the primitive int, into theIntegertype.- 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
java.lang.Object toShortType(java.lang.Object type)
Converts the given;@link IType}, if it's the primitive short, into theShorttype.- 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
java.lang.Object unknownType()
Retrieves the;@link IType} that represents an unknown type.- Returns:
- The external form of an unknown type
-
unknownTypeDeclaration
java.lang.Object unknownTypeDeclaration()
Returns the;@link Object } for the;@link IType} representing an unknown type.- Returns:
- The;@link Object } of the unknown type
-
-