|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ServiceDatabase
| Method Summary | |
|---|---|
void |
deleteAll()
|
void |
deleteByUrl(String url)
Delete multiple items from the persistent store |
List<ServiceObject> |
findAll()
|
void |
findAndDelete(String query)
Query and delete the matching documents |
String |
getDBVersion()
Get version of the database |
ServiceObject |
getServiceByUrl(String identifier)
Get an item from the persistent store |
void |
insert(ServiceObject item)
Insert service description to the persistent store. |
org.codehaus.jettison.json.JSONArray |
paginatedQuery(String query,
Integer pageSize,
String id)
|
List<ServiceObject> |
query(String query)
Query the persistent store |
List<ServiceObject> |
query(String query,
Integer skip)
Querying the collection |
List<ServiceObject> |
query(String query,
Integer limit,
Integer skip)
Querying the collection |
org.codehaus.jettison.json.JSONArray |
queryDistinctJSON(String attributeName)
Get distinct values for a given attribute |
org.codehaus.jettison.json.JSONArray |
queryJSON(String query)
|
org.codehaus.jettison.json.JSONArray |
queryJSON(String query,
Integer skip)
|
org.codehaus.jettison.json.JSONArray |
queryJSON(String query,
Integer limit,
Integer skip)
|
org.codehaus.jettison.json.JSONArray |
queryJSONWithLimit(String s,
Integer limit)
|
void |
update(ServiceObject sObj)
Update an existing item in the persistent store |
| Method Detail |
|---|
void insert(ServiceObject item)
throws ExistingResourceException,
PersistentStoreFailureException
item - an item to insert into the database
ExistingResourceException - throws exception if the element already exists
PersistentStoreFailureException - throws exception if the persistent store is unavailable
ServiceObject getServiceByUrl(String identifier)
throws MultipleResourceException,
NonExistingResourceException,
PersistentStoreFailureException
identifier - unique identifier of an object in the persistent store (url)
MultipleResourceException - throws exception if the identifier specifies more than one
item
NonExistingResourceException - throws exception if the item specified by identifier is not
existing in the persistent store
PersistentStoreFailureException - throws exception if persistent store level error occurs
void deleteByUrl(String url)
throws MultipleResourceException,
NonExistingResourceException,
PersistentStoreFailureException
array - of service urls
MultipleResourceException - throws exception if the identifier specifies more than one
item
NonExistingResourceException - throws exception if the item specified by identifier is not
existing in the persistent store
PersistentStoreFailureException - throws exception if persistent store level error occurs TODO:
support list of urlsvoid deleteAll()
void findAndDelete(String query)
void update(ServiceObject sObj)
throws MultipleResourceException,
NonExistingResourceException,
PersistentStoreFailureException
identifier - unique identifier of an object in the persistent storenewItem - the new item to replace the former one in the persistent store
MultipleResourceException - throws exception if the identifier specifies more than one
item
NonExistingResourceException - throws exception if the item specified by identifier is not
existing in the persistent store
PersistentStoreFailureException - throws exception if persistent store level error occurs
List<ServiceObject> query(String query)
throws QueryException,
PersistentStoreFailureException
query - (a JSON String)
PersistentStoreFailureException - throws exception if persistent store level error occurs
QueryException - throws exception if the query contains any query specific
error
List<ServiceObject> query(String query,
Integer skip)
throws QueryException,
PersistentStoreFailureException
query - the json string containing the queryskip - skipping the query result
ServiceObjects
QueryException
PersistentStoreFailureException
List<ServiceObject> query(String query,
Integer limit,
Integer skip)
throws QueryException,
PersistentStoreFailureException
query - the json string containing the queryskip - skipping the query resultlimit - total number of results to return
QueryException
PersistentStoreFailureException
List<ServiceObject> findAll()
throws org.codehaus.jettison.json.JSONException
org.codehaus.jettison.json.JSONException
org.codehaus.jettison.json.JSONArray queryJSON(String query)
throws QueryException,
PersistentStoreFailureException,
com.mongodb.MongoException,
org.codehaus.jettison.json.JSONException
query -
QueryException
PersistentStoreFailureException
org.codehaus.jettison.json.JSONException
com.mongodb.MongoException
org.codehaus.jettison.json.JSONArray queryJSON(String query,
Integer limit,
Integer skip)
throws QueryException,
PersistentStoreFailureException
query - limit - skip -
QueryException
PersistentStoreFailureException
org.codehaus.jettison.json.JSONArray queryJSON(String query,
Integer skip)
throws QueryException,
PersistentStoreFailureException
query - skip -
QueryException
PersistentStoreFailureException
org.codehaus.jettison.json.JSONArray queryJSONWithLimit(String s,
Integer limit)
s - limit -
org.codehaus.jettison.json.JSONArray queryDistinctJSON(String attributeName)
attributeName -
org.codehaus.jettison.json.JSONArray paginatedQuery(String query,
Integer pageSize,
String id)
String getDBVersion()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||