Class LoaderHelper


  • public class LoaderHelper
    extends Object
    • Constructor Detail

      • LoaderHelper

        public LoaderHelper()
    • Method Detail

      • getReadOnlyFromLoadQueryInfluencers

        public static Boolean getReadOnlyFromLoadQueryInfluencers​(SharedSessionContractImplementor session)
        Determine if the influencers associated with the given Session indicate read-only
      • getReadOnlyFromLoadQueryInfluencers

        public static Boolean getReadOnlyFromLoadQueryInfluencers​(LoadQueryInfluencers loadQueryInfluencers)
        Determine if given influencers indicate read-only
      • normalizeKeys

        public static <K> K[] normalizeKeys​(K[] keys,
                                            BasicValuedModelPart keyPart,
                                            SharedSessionContractImplementor session,
                                            SessionFactoryImplementor sessionFactory)
        Normalize an array of keys (primary, foreign or natural).

        If the array is already typed as the key type, keys is simply returned.

        Otherwise, a new typed array is created and the contents copied from keys to this new array. If key coercion is enabled, the values will be coerced to the key type.

        Type Parameters:
        K - The key type
        Parameters:
        keys - The keys to normalize
        keyPart - The ModelPart describing the key
      • createTypedArray

        public static <X> X[] createTypedArray​(Class<X> elementClass,
                                               int length)
        Creates a typed array, as opposed to a generic Object[] that holds the typed values
        Parameters:
        elementClass - The type of the array elements. See Class.getComponentType()
        length - The length to which the array should be created. This is usually zero for Hibernate uses