EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

org.eclipse.persistence.jpa.jpql
Class GenericTypeHelper

java.lang.Object
  extended by org.eclipse.persistence.jpa.jpql.GenericTypeHelper
All Implemented Interfaces:
ITypeHelper

public class GenericTypeHelper
extends java.lang.Object
implements ITypeHelper

This generic implementation of ITypeHelper wraps ITypeHelper and delegates the calls to it.

Version:
2.4
Author:
Pascal Filion
Since:
2.4

Constructor Summary
GenericTypeHelper(TypeHelper delegate)
          Creates a new GenericTypeHelper.
 
Method Summary
 IType bigDecimal()
          
 IType bigInteger()
          
 IType booleanType()
          
 IType byteType()
          
 IType characterType()
          
 IType collectionType()
          
 IType convertPrimitive(java.lang.Object type)
          
 IType dateType()
          
 IType doubleType()
          
 IType enumType()
          
 IType floatType()
          
 IType getType(java.lang.Class<?> type)
          
 IType getType(java.lang.String typeName)
          
 IType integerType()
          
 boolean isBooleanType(java.lang.Object type)
          
 boolean isCollectionType(java.lang.Object type)
          
 boolean isDateType(java.lang.Object type)
          
 boolean isEnumType(java.lang.Object type)
          
 boolean isFloatingType(java.lang.Object type)
          
 boolean isIntegralType(java.lang.Object type)
          
 boolean isMapType(java.lang.Object type)
          
 boolean isNumericType(java.lang.Object type)
          
 boolean isObjectType(java.lang.Object type)
          
 boolean isPrimitiveType(java.lang.Object type)
          
 boolean isStringType(java.lang.Object type)
          
 IType longType()
          
 IType longType(java.lang.Object type)
          
 IType mapType()
          
 IType numberType()
          
 IType objectType()
          
 ITypeDeclaration objectTypeDeclaration()
          
 IType primitiveBoolean()
          
 IType primitiveByte()
          
 IType primitiveChar()
          
 IType primitiveDouble()
          
 IType primitiveFloat()
          
 IType primitiveInteger()
          
 IType primitiveLong()
          
 IType primitiveShort()
          
 IType shortType()
          
 IType stringType()
          
 IType timestampType()
          
 IType toBooleanType(java.lang.Object type)
          
 IType toByteType(java.lang.Object type)
          
 IType toDoubleType(java.lang.Object type)
          
 IType toFloatType(java.lang.Object type)
          
 IType toIntegerType(java.lang.Object type)
          
 IType toShortType(java.lang.Object type)
          
 IType unknownType()
          
 ITypeDeclaration unknownTypeDeclaration()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericTypeHelper

public GenericTypeHelper(TypeHelper delegate)
Creates a new GenericTypeHelper.

Parameters:
delegate - The TypeHelper that is wrapped by this one and all the calls are delegated to it
Method Detail

bigDecimal

public IType bigDecimal()

Specified by:
bigDecimal in interface ITypeHelper
Returns:
The external form of the BigDecimal class

bigInteger

public IType bigInteger()

Specified by:
bigInteger in interface ITypeHelper
Returns:
The external form of the BigInteger class

booleanType

public IType booleanType()

Specified by:
booleanType in interface ITypeHelper
Returns:
The external form of the Boolean class

byteType

public IType byteType()

Specified by:
byteType in interface ITypeHelper
Returns:
The external form of the Byte class

characterType

public IType characterType()

Specified by:
characterType in interface ITypeHelper
Returns:
The external form of the Character class

collectionType

public IType collectionType()

Specified by:
collectionType in interface ITypeHelper
Returns:
The external form of the Collection class

convertPrimitive

public IType convertPrimitive(java.lang.Object type)

Specified by:
convertPrimitive in interface ITypeHelper
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

public IType dateType()

Specified by:
dateType in interface ITypeHelper
Returns:
The external form of the Date class

doubleType

public IType doubleType()

Specified by:
doubleType in interface ITypeHelper
Returns:
The external form of the Double class

enumType

public IType enumType()

Specified by:
enumType in interface ITypeHelper
Returns:
The external form of the Enum class

floatType

public IType floatType()

Specified by:
floatType in interface ITypeHelper
Returns:
The external form of the Float class

getType

public IType getType(java.lang.Class<?> type)

Specified by:
getType in interface ITypeHelper
Parameters:
type - The Java type for which its external form will be returned
Returns:
The;@link IType} representing the given Java type

getType

public IType getType(java.lang.String typeName)

Specified by:
getType in interface ITypeHelper
Parameters:
typeName - The fully qualified class name of the class to retrieve
Returns:
The external form of the class to retrieve

integerType

public IType integerType()

Specified by:
integerType in interface ITypeHelper
Returns:
The external form of the Integer class

isBooleanType

public boolean isBooleanType(java.lang.Object type)

Specified by:
isBooleanType in interface ITypeHelper
Parameters:
type - The type to check it's assignability
Returns:
true if the given;@link IType} is a;@link Boolean}; false otherwise

isCollectionType

public boolean isCollectionType(java.lang.Object type)

Specified by:
isCollectionType in interface ITypeHelper
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

public boolean isDateType(java.lang.Object type)

Specified by:
isDateType in interface ITypeHelper
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

public boolean isEnumType(java.lang.Object type)

Specified by:
isEnumType in interface ITypeHelper
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

public boolean isFloatingType(java.lang.Object type)

Specified by:
isFloatingType in interface ITypeHelper
Parameters:
type - The type to check it's assignability
Returns:
true if the given;@link IType} is a floating type; false otherwise

isIntegralType

public boolean isIntegralType(java.lang.Object type)

Specified by:
isIntegralType in interface ITypeHelper
Parameters:
type - The type to check it's assignability
Returns:
true if the given;@link IType} is a integral type; false otherwise

isMapType

public boolean isMapType(java.lang.Object type)

Specified by:
isMapType in interface ITypeHelper
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

public boolean isNumericType(java.lang.Object type)

Specified by:
isNumericType in interface ITypeHelper
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

public boolean isObjectType(java.lang.Object type)

Specified by:
isObjectType in interface ITypeHelper
Parameters:
type - The type to check it's assignability
Returns:
true if the given;@link IType} is the external form of;@link Object}

isPrimitiveType

public boolean isPrimitiveType(java.lang.Object type)

Specified by:
isPrimitiveType in interface ITypeHelper
Parameters:
type - The type to check it's assignability
Returns:
true if the given;@link IType} represents a primitive; false otherwise

isStringType

public boolean isStringType(java.lang.Object type)

Specified by:
isStringType in interface ITypeHelper
Parameters:
type - The type to check it's assignability
Returns:
true if the given;@link IType} represents the String class; false otherwise

longType

public IType longType()

Specified by:
longType in interface ITypeHelper
Returns:
The external form of the Long class

longType

public IType longType(java.lang.Object type)

Specified by:
longType in interface ITypeHelper
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

public IType mapType()

Specified by:
mapType in interface ITypeHelper
Returns:
The external form of the Map class

numberType

public IType numberType()

Specified by:
numberType in interface ITypeHelper
Returns:
The external form of the Number class

objectType

public IType objectType()

Specified by:
objectType in interface ITypeHelper
Returns:
The external form of the Object class

objectTypeDeclaration

public ITypeDeclaration objectTypeDeclaration()

Specified by:
objectTypeDeclaration in interface ITypeHelper
Returns:
The;@link Object } of the Object class

primitiveBoolean

public IType primitiveBoolean()

Specified by:
primitiveBoolean in interface ITypeHelper
Returns:
The external form of the primitive boolean

primitiveByte

public IType primitiveByte()

Specified by:
primitiveByte in interface ITypeHelper
Returns:
The external form of the primitive byte

primitiveChar

public IType primitiveChar()

Specified by:
primitiveChar in interface ITypeHelper
Returns:
The external form of the primitive char

primitiveDouble

public IType primitiveDouble()

Specified by:
primitiveDouble in interface ITypeHelper
Returns:
The external form of the primitive double

primitiveFloat

public IType primitiveFloat()

Specified by:
primitiveFloat in interface ITypeHelper
Returns:
The external form of the primitive float

primitiveInteger

public IType primitiveInteger()

Specified by:
primitiveInteger in interface ITypeHelper
Returns:
The external form of the primitive int

primitiveLong

public IType primitiveLong()

Specified by:
primitiveLong in interface ITypeHelper
Returns:
The external form of the primitive long

primitiveShort

public IType primitiveShort()

Specified by:
primitiveShort in interface ITypeHelper
Returns:
The external form of the primitive short

shortType

public IType shortType()

Specified by:
shortType in interface ITypeHelper
Returns:
The external form of the Short class

stringType

public IType stringType()

Specified by:
stringType in interface ITypeHelper
Returns:
The external form of the String class

timestampType

public IType timestampType()

Specified by:
timestampType in interface ITypeHelper
Returns:
The external form of the Timestamp class

toBooleanType

public IType toBooleanType(java.lang.Object type)

Specified by:
toBooleanType in interface ITypeHelper
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

public IType toByteType(java.lang.Object type)

Specified by:
toByteType in interface ITypeHelper
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

public IType toDoubleType(java.lang.Object type)

Specified by:
toDoubleType in interface ITypeHelper
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

public IType toFloatType(java.lang.Object type)

Specified by:
toFloatType in interface ITypeHelper
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

public IType toIntegerType(java.lang.Object type)

Specified by:
toIntegerType in interface ITypeHelper
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

public IType toShortType(java.lang.Object type)

Specified by:
toShortType in interface ITypeHelper
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

public IType unknownType()

Specified by:
unknownType in interface ITypeHelper
Returns:
The external form of an unknown type

unknownTypeDeclaration

public ITypeDeclaration unknownTypeDeclaration()

Specified by:
unknownTypeDeclaration in interface ITypeHelper
Returns:
The;@link Object } of the unknown type

EclipseLink 2.4.2, build 'v20130514-5956486' API Reference