Package step.core.accessors
Interface CRUDAccessor<T extends step.core.accessors.AbstractIdentifiableObject>
-
- All Superinterfaces:
Accessor<T>
- All Known Subinterfaces:
ParameterAccessor,ResourceAccessor,ResourceRevisionAccessor
- All Known Implementing Classes:
InMemoryCRUDAccessor,InMemoryResourceAccessor,InMemoryResourceRevisionAccessor,LayeredCRUDAccessor
public interface CRUDAccessor<T extends step.core.accessors.AbstractIdentifiableObject> extends Accessor<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidremove(org.bson.types.ObjectId id)voidsave(java.util.Collection<? extends T> entities)Save a list of entities.Tsave(T entity)Save an entity.-
Methods inherited from interface step.core.accessors.Accessor
findByAttributes, findByAttributes, findManyByAttributes, findManyByAttributes, get, get, getAll, getRange
-
-
-
-
Method Detail
-
remove
void remove(org.bson.types.ObjectId id)
-
save
T save(T entity)
Save an entity. If an entity with the same id exists, it will be updated otherwise inserted.- Parameters:
entity- the entity instance to be saved- Returns:
- the saved entity
-
save
void save(java.util.Collection<? extends T> entities)
Save a list of entities.- Parameters:
entities- the list of entities to be saved
-
-