Package org.codice.ddf.persistence
Interface PersistentStore
public interface PersistentStore
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a collection of items of specified type.voidAdds item of specified type with the specified properties.intDelete items matching the ECQL query criteria.intGet all of the items of the specified type.Get items matching the ECQL query criteria.Get all items matching the ECQL query criteria.
-
Method Details
-
add
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
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
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:
PersistenceExceptionIllegalArgumentException- if startIndex is less than 0 or if pageSize is greater than the max allowed.
-
delete
Delete items matching the ECQL query criteria.- Parameters:
type-ecql-- Returns:
- Count of the items deleted
- Throws:
PersistenceException
-
delete
- 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:
PersistenceExceptionIllegalArgumentException- if startIndex is less than 0 or if pageSize is greater than the max allowed.
-