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.

    • Constructor Detail

      • TypeHelperImpl

        public TypeHelperImpl​(AbstractSession session,
                              java.lang.ClassLoader classLoader)
    • Method Detail

      • resolveTypeName

        public java.lang.Object resolveTypeName​(java.lang.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 java.lang.Object resolveAttribute​(java.lang.Object ownerClass,
                                                 java.lang.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 java.lang.Object resolveMapKey​(java.lang.Object ownerClass,
                                              java.lang.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 java.lang.Object resolveSchema​(java.lang.String schemaName)
        Returns the type of the class corresponding to the specified abstract schema type.
        Specified by:
        resolveSchema in interface TypeHelper
      • resolveEnumConstant

        public java.lang.Object resolveEnumConstant​(java.lang.Object type,
                                                    java.lang.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​(java.lang.Object type)
        Returns true if the specified type denotes an entity class.
        Specified by:
        isEntityClass in interface TypeHelper
      • isEmbeddable

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

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

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

        public boolean isRelationship​(java.lang.Object ownerClass,
                                      java.lang.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​(java.lang.Object ownerClass,
                                                  java.lang.String attribute)
        Returns true if the specified attribute denotes a single valued relationship attribute.
        Specified by:
        isSingleValuedRelationship in interface TypeHelper
      • isCollectionValuedRelationship

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

        public QueryKey resolveQueryKey​(java.lang.Object ownerClass,
                                        java.lang.String attribute)
        Description copied from interface: TypeHelper
        Returns a query key associated with the name of the attribute
        Specified by:
        resolveQueryKey in interface TypeHelper