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

public class GenericTypeHelper extends Object implements ITypeHelper
This generic implementation of ITypeHelper wraps ITypeHelper and delegates the calls to it.
Since:
2.4
Version:
2.4
  • Constructor Details

    • 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 Details

    • bigDecimal

      public IType bigDecimal()
      Description copied from interface: ITypeHelper
      Retrieves the;@link IType} for;@link BigDecimal}.
      Specified by:
      bigDecimal in interface ITypeHelper
      Returns:
      The external form of the BigDecimal class
    • bigInteger

      public IType bigInteger()
      Description copied from interface: ITypeHelper
      Retrieves the;@link IType} for;@link BigInteger}.
      Specified by:
      bigInteger in interface ITypeHelper
      Returns:
      The external form of the BigInteger class
    • booleanType

      public IType booleanType()
      Description copied from interface: ITypeHelper
      Retrieves the;@link IType} for;@link Boolean}.
      Specified by:
      booleanType in interface ITypeHelper
      Returns:
      The external form of the Boolean class
    • byteType

      public IType byteType()
      Description copied from interface: ITypeHelper
      Retrieves the;@link IType} for;@link Byte}.
      Specified by:
      byteType in interface ITypeHelper
      Returns:
      The external form of the Byte class
    • characterType

      public IType characterType()
      Description copied from interface: ITypeHelper
      Retrieves the;@link IType} for;@link Character}.
      Specified by:
      characterType in interface ITypeHelper
      Returns:
      The external form of the Character class
    • collectionType

      public IType collectionType()
      Description copied from interface: ITypeHelper
      Retrieves the;@link IType} for;@link Collection}.
      Specified by:
      collectionType in interface ITypeHelper
      Returns:
      The external form of the Collection class
    • convertPrimitive

      public IType convertPrimitive(Object type)
      Description copied from interface: ITypeHelper
      Converts the given;@link IType}, if it's representing a primitive type, into the class of the same 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()
      Description copied from interface: ITypeHelper
      Retrieves the;@link IType} for;@link Date}.
      Specified by:
      dateType in interface ITypeHelper
      Returns:
      The external form of the Date class
    • doubleType

      public IType doubleType()
      Description copied from interface: ITypeHelper
      Retrieves the;@link IType} for;@link Double}.
      Specified by:
      doubleType in interface ITypeHelper
      Returns:
      The external form of the Double class
    • enumType

      public IType enumType()
      Description copied from interface: ITypeHelper
      Retrieves the;@link IType} for;@link Enum}.
      Specified by:
      enumType in interface ITypeHelper
      Returns:
      The external form of the Enum class
    • floatType

      public IType floatType()
      Description copied from interface: ITypeHelper
      Retrieves the;@link IType} for;@link Float}.
      Specified by:
      floatType in interface ITypeHelper
      Returns:
      The external form of the Float class
    • getType

      public IType getType(Class<?> type)
      Description copied from interface: ITypeHelper
      Returns the;@link IType} of the given Java 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(String typeName)
      Description copied from interface: ITypeHelper
      Retrieves the external class for the given fully qualified class name.
      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()
      Description copied from interface: ITypeHelper
      Retrieves the;@link IType} for;@link Integer}.
      Specified by:
      integerType in interface ITypeHelper
      Returns:
      The external form of the Integer class
    • isBooleanType

      public boolean isBooleanType(Object type)
      Description copied from interface: ITypeHelper
      Determines whether the given;@link IType} is a;@link Boolean}.
      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(Object type)
      Description copied from interface: ITypeHelper
      Determines whether the given;@link IType} is an instance of;@link Collection}.
      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(Object type)
      Description copied from interface: ITypeHelper
      Determines whether the given;@link IType} is a;@link Date},;@link Timestamp} or ;@link Calendar}.
      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(Object type)
      Description copied from interface: ITypeHelper
      Determines whether the given;@link IType} is an instance of;@link Enum}.
      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(Object type)
      Description copied from interface: ITypeHelper
      Determines whether the given;@link IType} is an instance of a floating type, which is either Float, Double, float or double.
      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(Object type)
      Description copied from interface: ITypeHelper
      Determines whether the given;@link IType} is an instance of a floating type, which is either Integer, Long, int or float.
      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(Object type)
      Description copied from interface: ITypeHelper
      Determines whether the given;@link IType} is an instance of;@link Map}.
      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(Object type)
      Description copied from interface: ITypeHelper
      Determines whether the given;@link IType} is an instance of;@link Numeric}.
      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(Object type)
      Description copied from interface: ITypeHelper
      Determines whether the given;@link IType} is the external form of;@link Object}.
      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(Object type)
      Description copied from interface: ITypeHelper
      Determines whether the given;@link IType} represents a primitive 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(Object type)
      Description copied from interface: ITypeHelper
      Determines whether the given;@link IType} represents the String class.
      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()
      Description copied from interface: ITypeHelper
      Retrieves the;@link IType} for;@link Long}.
      Specified by:
      longType in interface ITypeHelper
      Returns:
      The external form of the Long class
    • longType

      public IType longType(Object type)
      Description copied from interface: ITypeHelper
      Converts the given;@link IType}, if it's the primitive long, into the Long 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()
      Description copied from interface: ITypeHelper
      Retrieves the;@link IType} for;@link Map}.
      Specified by:
      mapType in interface ITypeHelper
      Returns:
      The external form of the Map class
    • numberType

      public IType numberType()
      Description copied from interface: ITypeHelper
      Retrieves the;@link IType} for;@link Number}.
      Specified by:
      numberType in interface ITypeHelper
      Returns:
      The external form of the Number class
    • objectType

      public IType objectType()
      Description copied from interface: ITypeHelper
      Retrieves the;@link IType} for;@link Object}.
      Specified by:
      objectType in interface ITypeHelper
      Returns:
      The external form of the Object class
    • objectTypeDeclaration

      public ITypeDeclaration objectTypeDeclaration()
      Description copied from interface: ITypeHelper
      Returns the;@link Object } for the;@link IType} representing the Object class.
      Specified by:
      objectTypeDeclaration in interface ITypeHelper
      Returns:
      The;@link Object } of the Object class
    • primitiveBoolean

      public IType primitiveBoolean()
      Description copied from interface: ITypeHelper
      Retrieves the;@link IType} for the primitive boolean.
      Specified by:
      primitiveBoolean in interface ITypeHelper
      Returns:
      The external form of the primitive boolean
    • primitiveByte

      public IType primitiveByte()
      Description copied from interface: ITypeHelper
      Retrieves the;@link IType} for the primitive byte.
      Specified by:
      primitiveByte in interface ITypeHelper
      Returns:
      The external form of the primitive byte
    • primitiveChar

      public IType primitiveChar()
      Description copied from interface: ITypeHelper
      Retrieves the;@link IType} for the primitive char.
      Specified by:
      primitiveChar in interface ITypeHelper
      Returns:
      The external form of the primitive char
    • primitiveDouble

      public IType primitiveDouble()
      Description copied from interface: ITypeHelper
      Retrieves the;@link IType} for the primitive double.
      Specified by:
      primitiveDouble in interface ITypeHelper
      Returns:
      The external form of the primitive double
    • primitiveFloat

      public IType primitiveFloat()
      Description copied from interface: ITypeHelper
      Retrieves the;@link IType} for the primitive float.
      Specified by:
      primitiveFloat in interface ITypeHelper
      Returns:
      The external form of the primitive float
    • primitiveInteger

      public IType primitiveInteger()
      Description copied from interface: ITypeHelper
      Retrieves the;@link IType} for the primitive int.
      Specified by:
      primitiveInteger in interface ITypeHelper
      Returns:
      The external form of the primitive int
    • primitiveLong

      public IType primitiveLong()
      Description copied from interface: ITypeHelper
      Retrieves the;@link IType} for the primitive long.
      Specified by:
      primitiveLong in interface ITypeHelper
      Returns:
      The external form of the primitive long
    • primitiveShort

      public IType primitiveShort()
      Description copied from interface: ITypeHelper
      Retrieves the;@link IType} for the primitive short.
      Specified by:
      primitiveShort in interface ITypeHelper
      Returns:
      The external form of the primitive short
    • shortType

      public IType shortType()
      Description copied from interface: ITypeHelper
      Retrieves the;@link IType} for;@link Short}.
      Specified by:
      shortType in interface ITypeHelper
      Returns:
      The external form of the Short class
    • stringType

      public IType stringType()
      Description copied from interface: ITypeHelper
      Retrieves the;@link IType} for;@link String}.
      Specified by:
      stringType in interface ITypeHelper
      Returns:
      The external form of the String class
    • timestampType

      public IType timestampType()
      Description copied from interface: ITypeHelper
      Retrieves the;@link IType} for;@link Timestamp}.
      Specified by:
      timestampType in interface ITypeHelper
      Returns:
      The external form of the Timestamp class
    • toBooleanType

      public IType toBooleanType(Object type)
      Description copied from interface: ITypeHelper
      Converts the given;@link IType}, if it's the primitive boolean, into the Boolean 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(Object type)
      Description copied from interface: ITypeHelper
      Converts the given;@link IType}, if it's the primitive byte, into the Byte 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(Object type)
      Description copied from interface: ITypeHelper
      Converts the given;@link IType}, if it's the primitive double, into the Double 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(Object type)
      Description copied from interface: ITypeHelper
      Converts the given;@link IType}, if it's the primitive float, into the Float 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(Object type)
      Description copied from interface: ITypeHelper
      Converts the given;@link IType}, if it's the primitive int, into the Integer 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(Object type)
      Description copied from interface: ITypeHelper
      Converts the given;@link IType}, if it's the primitive short, into the Short 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()
      Description copied from interface: ITypeHelper
      Retrieves the;@link IType} that represents an unknown type.
      Specified by:
      unknownType in interface ITypeHelper
      Returns:
      The external form of an unknown type
    • unknownTypeDeclaration

      public ITypeDeclaration unknownTypeDeclaration()
      Description copied from interface: ITypeHelper
      Returns the;@link Object } for the;@link IType} representing an unknown type.
      Specified by:
      unknownTypeDeclaration in interface ITypeHelper
      Returns:
      The;@link Object } of the unknown type