Enum BatchFetchStyle

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      DYNAMIC
      Dynamically builds its SQL based on the actual number of available ids.
      LEGACY
      The legacy algorithm where we keep a set of pre-built batch sizes based on ArrayHelper.getBatchSizes(int).
      PADDED
      Still keeps the concept of pre-built batch sizes, but uses the next-bigger batch size and pads the extra identifier placeholders.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static BatchFetchStyle byName​(java.lang.String name)  
      static BatchFetchStyle interpret​(java.lang.Object setting)  
      static BatchFetchStyle valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static BatchFetchStyle[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • LEGACY

        public static final BatchFetchStyle LEGACY
        The legacy algorithm where we keep a set of pre-built batch sizes based on ArrayHelper.getBatchSizes(int). Batches are performed using the next-smaller pre-built batch size from the number of existing batchable identifiers.

        For example, with a batch-size setting of 32 the pre-built batch sizes would be [32, 16, 10, 9, 8, 7, .., 1]. An attempt to batch load 31 identifiers would result in batches of 16, 10, and 5.

      • PADDED

        public static final BatchFetchStyle PADDED
        Still keeps the concept of pre-built batch sizes, but uses the next-bigger batch size and pads the extra identifier placeholders.

        Using the same example of a batch-size setting of 32 the pre-built batch sizes would be the same. However, the attempt to batch load 31 identifiers would result just a single batch of size 32. The identifiers to load would be "padded" (aka, repeated) to make up the difference.

      • DYNAMIC

        public static final BatchFetchStyle DYNAMIC
        Dynamically builds its SQL based on the actual number of available ids. Does still limit to the batch-size defined on the entity/collection
    • Method Detail

      • values

        public static BatchFetchStyle[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (BatchFetchStyle c : BatchFetchStyle.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static BatchFetchStyle valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • interpret

        public static BatchFetchStyle interpret​(java.lang.Object setting)