Interface IStore<T>

  • Type Parameters:
    T -
    All Superinterfaces:
    org.apache.wicket.util.io.IClusterable, Serializable
    All Known Subinterfaces:
    ITypeStore
    All Known Implementing Classes:
    BuiltinTypeStore

    public interface IStore<T>
    extends org.apache.wicket.util.io.IClusterable
    Store and retrieve objects. It uses a lifecycle for objects that requires them to be saved explicitly. The ids that are used must not be interpreted.
    • Method Detail

      • load

        T load​(String id)
        throws StoreException
        Load an object by its id. A StoreException is thrown if the object cannot be found.
        Parameters:
        id -
        Returns:
        object with the specified id
        Throws:
        StoreException
      • save

        String save​(T object)
             throws StoreException
        Store an object. The object need not be created by the store, it only needs to conform to the interface T. An id is generated for the object when one did not exist yet, otherwise the existing id is returned.
        Parameters:
        object -
        Returns:
        id of the object
        Throws:
        StoreException