Enum EntityLoadingCacheLookupStrategy

    • Enum Constant Detail

      • SKIP

        public static final EntityLoadingCacheLookupStrategy SKIP
        When a search query returns entities, do not check any cache and load all the entities through an SQL query.

        This is the default strategy.

      • PERSISTENCE_CONTEXT

        public static final EntityLoadingCacheLookupStrategy PERSISTENCE_CONTEXT
        When a search query returns entities, first check the persistence context to retrieve entities that are already in the session, then load the entities that were not found in the session through an SQL query.
      • PERSISTENCE_CONTEXT_THEN_SECOND_LEVEL_CACHE

        public static final EntityLoadingCacheLookupStrategy PERSISTENCE_CONTEXT_THEN_SECOND_LEVEL_CACHE
        When a search query returns entities, first check the persistence context to retrieve entities that are already in the session, then check the second level cache to retrieve entities that are in the 2LC but not in the session, then load the entities that were not found in the session or 2LC through an SQL query.
    • Method Detail

      • values

        public static EntityLoadingCacheLookupStrategy[] 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 (EntityLoadingCacheLookupStrategy c : EntityLoadingCacheLookupStrategy.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static EntityLoadingCacheLookupStrategy valueOf​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • externalRepresentation

        public String externalRepresentation()
        Returns:
        The expected string representation in configuration properties.