T - The type of elements managed by this dao.public interface GenericDAO<T>
| Modifier and Type | Method and Description |
|---|---|
void |
delete(T entity)
Deletes the given element.
|
List<T> |
getAll()
Returns all elements.
|
T |
getById(String id)
Returns the element with the given id.
|
T |
getUniqueResult(eu.dnetlib.domain.SearchCriteria criteria)
Performs a search and returns the unique result.
|
T |
save(T entity)
Saves the given element.
|
List<T> |
search(eu.dnetlib.domain.SearchCriteria criteria)
Returns all elements that comply with the restrictions described by the criteria
object.
|
T getById(String id) throws DAOException
id - The element's id.DAOExceptionT save(T entity) throws DAOException
entity - The element to save.DAOExceptionvoid delete(T entity) throws DAOException
entity - The element to delete.DAOExceptionList<T> getAll() throws DAOException
DAOExceptionList<T> search(eu.dnetlib.domain.SearchCriteria criteria) throws DAOException
criteria - The searh criteria.DAOExceptionT getUniqueResult(eu.dnetlib.domain.SearchCriteria criteria) throws DAOException
criteria - the search criteria;DAOException - If there was a problem in the search or there were
more than one results in the query.Copyright © 2017. All rights reserved.