E - The type of the concrete NoSql EntityT - The type of the serializable class for id attributepublic abstract class AbstractNoSqlServiceImpl<E extends NoSqlEntity,T extends Serializable> extends Object implements AbstractNoSqlService<E,T>
AbstractNoSqlService| Constructor and Description |
|---|
AbstractNoSqlServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
long |
count()
Returns a count of all records
|
boolean |
exists(T id)
Checks if a entity with the given ID exists.
|
Iterable<E> |
findAll()
Find all elements for this service.
|
E |
findByID(T id) |
protected NosqlDao<E,T> |
getDao()
Getter for DAO, only available for internal usage.
|
void |
remove(T id) |
void |
setDao(NosqlDao<E,T> dao)
Used by Bean configuration to inject Entity based DAO.
|
E |
store(E object) |
public void remove(T id)
remove in interface AbstractNoSqlService<E extends NoSqlEntity,T extends Serializable>id - - the database id of the object to be deletedpublic E findByID(T id)
findByID in interface AbstractNoSqlService<E extends NoSqlEntity,T extends Serializable>id - the database ID for the object persisted in the databasepublic Iterable<E> findAll()
AbstractNoSqlServicefindAll in interface AbstractNoSqlService<E extends NoSqlEntity,T extends Serializable>public E store(E object)
store in interface AbstractNoSqlService<E extends NoSqlEntity,T extends Serializable>object - - the object to be stored in the databasepublic boolean exists(T id)
AbstractNoSqlServiceexists in interface AbstractNoSqlService<E extends NoSqlEntity,T extends Serializable>id - - the database IDpublic long count()
AbstractNoSqlServicecount in interface AbstractNoSqlService<E extends NoSqlEntity,T extends Serializable>public final void setDao(NosqlDao<E,T> dao)
dao - DAO object with entity based generic setCopyright © 2017 Europeana Foundation + AIT. All rights reserved.