Class TypeHelperImpl

  • All Implemented Interfaces:
    TypeHelper

    public class TypeHelperImpl
    extends BasicTypeHelperImpl
    implements TypeHelper
    INTERNAL

    Purpose: Implement type helper methods specified by TypeHelper. This implementation uses Class instances to represent a type.

    • Method Detail

      • resolveTypeName

        public Object resolveTypeName​(String typeName)
        Returns a type representation for the specified type name or null if there is no such type.
        Specified by:
        resolveTypeName in interface TypeHelper
      • resolveAttribute

        public Object resolveAttribute​(Object ownerClass,
                                       String attribute)
        Returns the type of the attribute with the specified name in the specified owner class.
        Specified by:
        resolveAttribute in interface TypeHelper
      • resolveMapKey

        public Object resolveMapKey​(Object ownerClass,
                                    String attribute)
        Returns the type of the map key for the mapping on ownerClass named attribute Returns null if that mapping does not exist or does not contain a map key
        Specified by:
        resolveMapKey in interface TypeHelper
      • resolveSchema

        public Object resolveSchema​(String schemaName)
        Returns the type of the class corresponding to the specified abstract schema type.
        Specified by:
        resolveSchema in interface TypeHelper
      • resolveEnumConstant

        public Object resolveEnumConstant​(Object type,
                                          String constant)
        Returns the enum constant if the specified type denotes an enum type and the specified constant denotes a constant of the enum type.
        Specified by:
        resolveEnumConstant in interface TypeHelper
      • isEntityClass

        public boolean isEntityClass​(Object type)
        Returns true if the specified type denotes an entity class.
        Specified by:
        isEntityClass in interface TypeHelper
      • isEmbeddable

        public boolean isEmbeddable​(Object type)
        Returns true if the specified type denotes an embedded class.
        Specified by:
        isEmbeddable in interface TypeHelper
      • isEmbeddedAttribute

        public boolean isEmbeddedAttribute​(Object ownerClass,
                                           String attribute)
        Returns true if the specified type denotes an embedded attribute.
        Specified by:
        isEmbeddedAttribute in interface TypeHelper
      • isSimpleStateAttribute

        public boolean isSimpleStateAttribute​(Object ownerClass,
                                              String attribute)
        Returns true if the specified type denotes a simple state attribute.
        Specified by:
        isSimpleStateAttribute in interface TypeHelper
      • isRelationship

        public boolean isRelationship​(Object ownerClass,
                                      String attribute)
        Returns true if the specified attribute denotes a single valued or collection valued relationship attribute.
        Specified by:
        isRelationship in interface TypeHelper
      • isSingleValuedRelationship

        public boolean isSingleValuedRelationship​(Object ownerClass,
                                                  String attribute)
        Returns true if the specified attribute denotes a single valued relationship attribute.
        Specified by:
        isSingleValuedRelationship in interface TypeHelper
      • isCollectionValuedRelationship

        public boolean isCollectionValuedRelationship​(Object ownerClass,
                                                      String attribute)
        Returns true if the specified attribute denotes a collection valued relationship attribute.
        Specified by:
        isCollectionValuedRelationship in interface TypeHelper