Package org.hibernate

Interface TypeHelper


  • public interface TypeHelper
    Provides access to the various Type instances associated with the SessionFactory.

    This is intended for use by application developers.

    • Method Detail

      • basic

        BasicType basic​(java.lang.String name)
        Retrieve the basic type registered against the given name.
        Parameters:
        name - The name of the basic type to retrieve
        Returns:
        The basic type, or null.
      • basic

        BasicType basic​(java.lang.Class javaType)
        Convenience form of basic(String). The intended use of this is something like basic(Integer.class) or basic(int.class)
        Parameters:
        javaType - The java type for which to retrieve the type instance.
        Returns:
        The basic type, or null.
      • entity

        Type entity​(java.lang.Class entityClass)
        Retrieve a type representing the given entity.
        Parameters:
        entityClass - The entity Java type.
        Returns:
        The type, or null
      • entity

        Type entity​(java.lang.String entityName)
        Retrieve a type representing the given entity.
        Parameters:
        entityName - The entity name.
        Returns:
        The type, or null
      • custom

        Type custom​(java.lang.Class userTypeClass)
        Retrieve the type for the given user-type class (UserType or CompositeUserType).
        Parameters:
        userTypeClass - The user type class
        Returns:
        The type, or null
      • custom

        Type custom​(java.lang.Class userTypeClass,
                    java.util.Properties properties)
        Retrieve the type for the given user-type class (UserType or CompositeUserType).
        Parameters:
        userTypeClass - The user type class
        properties - Configuration properties.
        Returns:
        The type, or null
      • any

        Type any​(Type metaType,
                 Type identifierType)
        Retrieve the type representing an ANY mapping.
        Parameters:
        metaType - The meta type for the ANY
        identifierType - The identifier type for the ANY
        Returns:
        The type, or null