Interface DatabaseCache<T extends DatabaseObject>

All Known Implementing Classes:
DatabaseLoader, TemporaryCache

public interface DatabaseCache<T extends DatabaseObject>
  • Method Summary

    Modifier and Type Method Description
    T get​(int pkey)  
    Class<T> getObjectType()
    The type of object this cache holds.
    boolean isLinkBackOn()
    The default LinkBack setting
    void load​(Statement stmt)
    loads the cache from the database
    void reset​(Statement stmt)
    clears the cache and reloads it from the database
  • Method Details

    • getObjectType

      Class<T> getObjectType()
      The type of object this cache holds. Caches should only hold 1 type of DatabaseObject
    • isLinkBackOn

      boolean isLinkBackOn()
      The default LinkBack setting
    • load

      void load​(Statement stmt) throws SQLException
      loads the cache from the database
      Throws:
      SQLException
    • reset

      void reset​(Statement stmt) throws SQLException
      clears the cache and reloads it from the database
      Throws:
      SQLException
    • get

      T get​(int pkey)
      Returns:
      the object from the cache with the corresponding pkey