Interface ObjectStoringStrategy


  • public interface ObjectStoringStrategy
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean accept​(java.lang.Object obj)
      Similar to ObjectMarshallingStrategy, it is used to decide whether this implementation is going to work for the given Object.
      java.lang.Object persist​(java.lang.Object persistable)
      Returns the key for the persisted object.
      java.lang.Object read​(java.lang.Object key)
      Returns the persisted object.
      java.lang.Object update​(java.lang.Object persistable)
      Returns the key for the persisted object.
    • Method Detail

      • accept

        boolean accept​(java.lang.Object obj)
        Similar to ObjectMarshallingStrategy, it is used to decide whether this implementation is going to work for the given Object.
        Parameters:
        obj - a given object
        Returns:
        true if it can persist the given object.
      • persist

        java.lang.Object persist​(java.lang.Object persistable)
        Returns the key for the persisted object.
        Parameters:
        persistable - the object to persist.
        Returns:
        the key of the persisted object.
      • update

        java.lang.Object update​(java.lang.Object persistable)
        Returns the key for the persisted object.
        Parameters:
        persistable - the object to persist.
        Returns:
        the key of the persisted object.
      • read

        java.lang.Object read​(java.lang.Object key)
        Returns the persisted object.
        Parameters:
        key - the key of the persisted object.
        Returns:
        a persisted object or null.