I
- type of the persistent object and transport object id. This type
should be immutable. It is critical this type implements equals()
and hashCode() correctly.P
- type of model persistent objectT
- type of the transport objectF
- type of the associated filterS
- type of the associated sort specification typepublic interface Dao<I extends Serializable,P extends Storable<I>,T extends Transportable<? super T,I>,F,S> extends BaseDao<I,P,T,F,S>, Converter<P,T>
Modifier and Type | Method and Description |
---|---|
P |
create(T transportable,
DataStoreContext context)
Creates a new persistent object with the data from the given transport
object.
|
long |
delete(F filter,
DataStoreContext context)
Deletes all persistent objects matching the given filter.
|
boolean |
delete(Id<T,I> id,
DataStoreContext context)
Deletes the persistent object with the given id.
|
void |
delete(P storable,
DataStoreContext context)
Deletes a persistent object.
|
long |
deleteAll(DataStoreContext context)
Deletes all the persistent objects.
|
P |
update(T transportable,
DataStoreContext context)
Updates the persistent object related to the given transport object.
|
P create(T transportable, DataStoreContext context)
transportable
- transport object to get the data fromcontext
- data store contextP update(T transportable, DataStoreContext context)
transportable
- transport object to get the data fromcontext
- data store contextvoid delete(P storable, DataStoreContext context)
Concrete classes could override this method to do any pre-processing / post-processing work.
storable
- the persistent object to deletecontext
- data store contextboolean delete(Id<T,I> id, DataStoreContext context)
id
- persistent object's idcontext
- data store contexttrue
if the persistent object was found and deleted,
false
if it was not foundlong delete(F filter, DataStoreContext context)
filter
- filtercontext
- data store contextlong deleteAll(DataStoreContext context)
context
- data store contextCopyright © 2015. All Rights Reserved.