Interface PersistentStore


public interface PersistentStore
  • Method Details

    • add

      void add(String type, Map<String,Object> properties) throws PersistenceException
      Adds item of specified type with the specified properties.
      Parameters:
      type - A non-empty string identifying the type of item being added.
      properties - A map of properties making up the item. Property keys must have a suffix that identifies the type of value for the entry. The PersistentItem class should be used for creating this map.
      Throws:
      PersistenceException - If the type is empty or there was an issue persisting the item.
    • add

      void add(String type, Collection<Map<String,Object>> items) throws PersistenceException
      Adds a collection of items of specified type.
      Parameters:
      type - A non-empty string identifying the type of items being added.
      items - A list of map properties making up the items. Property keys must have a suffix that identifies the type of value for the entry. The PersistentItem class should be used for creating these maps.
      Throws:
      PersistenceException - If the type is empty or there was an issue persisting the item.
    • get

      Get all of the items of the specified type.
      Parameters:
      type -
      Returns:
      Throws:
      PersistenceException
    • get

      List<Map<String,Object>> get(String type, String ecql) throws PersistenceException
      Get items matching the ECQL query criteria.
      Parameters:
      type -
      ecql -
      Returns:
      Throws:
      PersistenceException
    • get

      List<Map<String,Object>> get(String type, String ecql, int startIndex, int pageSize) throws PersistenceException
      Get all items matching the ECQL query criteria.
      Parameters:
      type - A non-empty string identifying the type of item being retrieved.
      ecql - Query criteria.
      startIndex - Index to start query at.
      pageSize - Max number of results to return in single query.
      Throws:
      PersistenceException
      IllegalArgumentException - if startIndex is less than 0 or if pageSize is greater than the max allowed.
    • delete

      int delete(String type, String ecql) throws PersistenceException
      Delete items matching the ECQL query criteria.
      Parameters:
      type -
      ecql -
      Returns:
      Count of the items deleted
      Throws:
      PersistenceException
    • delete

      int delete(String type, String ecql, int startIndex, int pageSize) throws PersistenceException
      Parameters:
      type - A non-empty string identifying the type of item being retrieved.
      ecql - Query criteria.
      startIndex - Index to start query at.
      pageSize - Max number of results to return in single query.
      Returns:
      Count of the items deleted
      Throws:
      PersistenceException
      IllegalArgumentException - if startIndex is less than 0 or if pageSize is greater than the max allowed.