Interface PersistenceDelegate<T>

Type Parameters:
T - The configuration POJO type this delegate handles.
All Known Implementing Classes:
AbstractPersistenceDelegate

public interface PersistenceDelegate<T>
Internal interface for handling the actual persistence mechanics (loading, saving, reloading) for a given configuration POJO type — either a ConfigurablePojo subclass or a plain @Configuration class.
  • Method Summary

    Modifier and Type
    Method
    Description
    default List<LoadIssue>
    Returns the per-key issues recorded during the last load or reload.
    loadInitial(Supplier<T> defaultPojoSupplier)
    Loads the initial POJO instance from the persistent store, or creates and saves a default if the store is new or empty.
    void
    reload(T pojoInstanceToUpdate)
    Reloads data from the persistent store into the provided POJO instance, updating its fields.
    void
    save(T pojoInstance)
    Saves the provided POJO instance to the persistent store.
  • Method Details

    • save

      void save(T pojoInstance)
      Saves the provided POJO instance to the persistent store.
      Parameters:
      pojoInstance - The POJO instance to save.
    • reload

      void reload(T pojoInstanceToUpdate)
      Reloads data from the persistent store into the provided POJO instance, updating its fields.
      Parameters:
      pojoInstanceToUpdate - The POJO instance whose fields should be updated.
    • loadInitial

      T loadInitial(Supplier<T> defaultPojoSupplier)
      Loads the initial POJO instance from the persistent store, or creates and saves a default if the store is new or empty.
      Parameters:
      defaultPojoSupplier - Supplier for creating a default POJO instance.
      Returns:
      The loaded or newly created default POJO instance.
    • getLastLoadIssues

      default List<LoadIssue> getLastLoadIssues()
      Returns the per-key issues recorded during the last load or reload.
      Returns:
      an immutable list; empty if the last load was clean