Interface Dao
- All Known Implementing Classes:
BaseDao
public interface Dao
CRUD operations for Entity Types.
-
Method Summary
Modifier and TypeMethodDescriptionvoidCreate a new entity.voidDelete an entity.find(Entity parent, NavigationPropertyEntity npe) Find the entity related to the given parent, like the Thing for a Datastream.Find an entity.Find an entity.voidUpdate the given entity with the given patch.query()Start a query to find an entity collection.voidUpdate an entity.
-
Method Details
-
create
Create a new entity.- Parameters:
entity- the entity to create- Throws:
ServiceFailureException- the operation failed
-
find
Find an entity.- Parameters:
primaryKeyValues- the values for the entity's unique id- Returns:
- the entity
- Throws:
ServiceFailureException- the operation failed
-
find
Find an entity.- Parameters:
uri- the entity's URI- Returns:
- the entity
- Throws:
ServiceFailureException- the operation failed
-
update
Update an entity.- Parameters:
entity- the entity to update- Throws:
ServiceFailureException- the operation failed
-
patch
void patch(Entity entity, List<com.github.fge.jsonpatch.JsonPatchOperation> patch) throws ServiceFailureException Update the given entity with the given patch. Does not update the entity object itself. To see the result, fetch it anew from the server.- Parameters:
entity- The entity to update on the server.patch- The patch to apply to the entity.- Throws:
ServiceFailureException- the operation failed
-
delete
Delete an entity.- Parameters:
entity- the entity to delete- Throws:
ServiceFailureException- the operation failed
-
query
Query query()Start a query to find an entity collection.- Returns:
- the query
-