public class GenericISDao<D extends eu.dnetlib.domain.DriverResource> extends Object implements GenericDAO<D>
| Modifier and Type | Field and Description |
|---|---|
protected ISLookUp<D> |
lookUp |
protected ISRegistry<D> |
registry |
| Constructor and Description |
|---|
GenericISDao() |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(D entity)
Deletes the given element.
|
List<D> |
getAll()
Returns all elements.
|
D |
getById(String id)
Returns the element with the given id.
|
D |
getUniqueResult(eu.dnetlib.domain.SearchCriteria criteria)
Performs a search and returns the unique result.
|
D |
save(D entity)
Saves the given element.
|
List<D> |
search(eu.dnetlib.domain.SearchCriteria criteria)
Returns all elements that comply with the restrictions described by the criteria
object.
|
void |
setLookUp(ISLookUp<D> lookUp) |
void |
setRegistry(ISRegistry<D> registry) |
protected ISRegistry<D extends eu.dnetlib.domain.DriverResource> registry
public void setRegistry(ISRegistry<D> registry)
public D getById(String id) throws DAOException
GenericDAOgetById in interface GenericDAO<D extends eu.dnetlib.domain.DriverResource>id - The element's id.DAOExceptionpublic D save(D entity) throws DAOException
GenericDAOsave in interface GenericDAO<D extends eu.dnetlib.domain.DriverResource>entity - The element to save.DAOExceptionpublic void delete(D entity) throws DAOException
GenericDAOdelete in interface GenericDAO<D extends eu.dnetlib.domain.DriverResource>entity - The element to delete.DAOExceptionpublic List<D> getAll() throws DAOException
GenericDAOgetAll in interface GenericDAO<D extends eu.dnetlib.domain.DriverResource>DAOExceptionpublic List<D> search(eu.dnetlib.domain.SearchCriteria criteria) throws DAOException
GenericDAOsearch in interface GenericDAO<D extends eu.dnetlib.domain.DriverResource>criteria - The searh criteria.DAOExceptionpublic D getUniqueResult(eu.dnetlib.domain.SearchCriteria criteria) throws DAOException
GenericDAOgetUniqueResult in interface GenericDAO<D extends eu.dnetlib.domain.DriverResource>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.