|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DataService
DataService allows you to interact with your data on StackMob
| Method Summary | |
|---|---|
SMObject |
createObject(String schema,
SMObject toCreate)
Creates a new object in the datastore. |
Boolean |
deleteObject(String schema,
String id)
Deletes an object in the datastore. |
Set<String> |
getObjectModelNames()
Retrieves a list of the object models declared for the current application. |
List<SMObject> |
readObjects(String schema,
List<SMCondition> conditions)
Reads a list of objects matching the given query fields from the datastore. |
List<SMObject> |
readObjects(String schema,
List<SMCondition> conditions,
List<String> fields)
Reads a list of objects matching the given query fields from the datastore, returning only the specified fields |
SMObject |
updateObject(String schema,
String id,
List<SMUpdate> updateActions)
Updates an object in the datastore. |
void |
updateObjects(String schema,
List<SMCondition> conditions,
List<SMUpdate> updateActions)
Updates all objects matching the given query in the datastore |
| Method Detail |
|---|
SMObject createObject(String schema,
SMObject toCreate)
throws InvalidSchemaException,
DatastoreException
schema - the name of the relevant object schematoCreate - the object to create; must match the schema declared for the relevant object type
InvalidSchemaException - if the object to create does not match the relevant schema
DatastoreException - if the connection to the datastore fails or the datastore encounters an error
List<SMObject> readObjects(String schema,
List<SMCondition> conditions)
throws InvalidSchemaException,
DatastoreException
schema - the name of the relevant object modelconditions - the list of conditions which comprise the query
InvalidSchemaException - if the schema specified does not exist, or the query is incompatible with the schema
DatastoreException - if the connection to the datastore fails or the datastore encounters an error
List<SMObject> readObjects(String schema,
List<SMCondition> conditions,
List<String> fields)
throws InvalidSchemaException,
DatastoreException
schema - the name of the relevant object modelconditions - the list of conditions which comprise the queryfields - the list of fields to be returned; regardless of what is specified, the id will always be returned
InvalidSchemaException - if the schema specified does not exist, or the query is incompatible with the schema
DatastoreException - if the connection to the datastore fails or the datastore encounters an error
SMObject updateObject(String schema,
String id,
List<SMUpdate> updateActions)
throws InvalidSchemaException,
DatastoreException
schema - the name of the relevant object model; must be a type already declared for the current applicationid - the id of the object to updateupdateActions - the actions to take on the object being updated
InvalidSchemaException - if the schema does not exist, or the update actions are incompatible with it
DatastoreException - if the connection to the datastore fails or the datastore encounters an error
void updateObjects(String schema,
List<SMCondition> conditions,
List<SMUpdate> updateActions)
throws InvalidSchemaException,
DatastoreException
schema - the name of the relevant object model; must be a type already declared for the current applicationquery - the query used to find objects to updateupdateActions - the actions to take on the object being updated
InvalidSchemaException - if the schema does not exist, or the update actions are incompatible with it
DatastoreException - if the connection to the datastore fails or the datastore encounters an error
Boolean deleteObject(String schema,
String id)
throws InvalidSchemaException,
DatastoreException
schema - the name of the relevant object model; must be a type already declared for the current applicationid - the id of the object to delete
InvalidSchemaException - if the object model specified does not exist
DatastoreException - if the connection to the datastore fails or the datastore encounters an error
Set<String> getObjectModelNames()
throws ConnectException
ConnectException - if the list of object models cannot be retrieved
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||