org.kie.api.persistence

## Interface ObjectStoringStrategy

-     public interface ObjectStoringStrategy

- - ### Method Summary

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

- - ### Method Detail

    - #### accept

          boolean accept(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

          Object persist(Object persistable)

      Returns the key for the persisted object.
      Parameters:
        `persistable` - the object to persist.
      Returns:
        the key of the persisted object.

    - #### update

          Object update(Object persistable)

      Returns the key for the persisted object.
      Parameters:
        `persistable` - the object to persist.
      Returns:
        the key of the persisted object.

    - #### read

          Object read(Object key)

      Returns the persisted object.
      Parameters:
        `key` - the key of the persisted object.
      Returns:
        a persisted object or null.

Copyright © 2001–2019 JBoss by Red Hat. All rights reserved.