public class RepositoryImpl extends GeneralDAOImpl implements Repository
| Constructor and Description |
|---|
RepositoryImpl()
Constructs the DAO
|
RepositoryImpl(SessionFactory sessionFactory)
Constructs the DAO
|
| Modifier and Type | Method and Description |
|---|---|
void |
evict(Object object)
Remove the provided instance from the session cache.
|
<T> T |
first(Class<T> type,
Query query)
Returns the first result of a query returning instances of a specified
class.
|
Query |
getNamedQuery(String queryName)
Returns a externally defined named query.
|
<T> List<T> |
list(Class<T> type,
Query query)
Returns the results of a query as a list of a specified class.
|
<T> List<T> |
list(Class<T> type,
String queryName,
Object value)
Returns the results of a named query with a single parameter as a list of a specified class.
|
<T> T |
unique(Class<T> type,
Query query)
Returns the unique result of a query returning instances of a specified
class.
|
<T> T |
unique(Class<T> type,
String queryName,
Object value)
Returns the unique result of a named query with a single parameter returning instances of a specified
class.
|
delete, deleteById, findAll, findByCriteria, findById, newCriteria, save, saveOrUpdate, updateclear, flush, getSession, setSessionFactory, syncclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdelete, deleteById, findAll, findById, save, saveOrUpdate, updatepublic RepositoryImpl(SessionFactory sessionFactory)
sessionFactory - Hibernate Session factory.public RepositoryImpl()
public void evict(Object object)
AbstractDAOImplevict in interface Repositoryevict in class AbstractDAOImplobject - The persistent instance to remove.public <T> T first(Class<T> type, Query query)
AbstractDAOImplfirst in interface Repositoryfirst in class AbstractDAOImpltype - Entity type.query - Query to execute.null if there are no results.public Query getNamedQuery(String queryName)
AbstractDAOImplgetNamedQuery in interface RepositorygetNamedQuery in class AbstractDAOImplqueryName - Query name.public <T> List<T> list(Class<T> type, Query query)
AbstractDAOImpllist in interface Repositorylist in class AbstractDAOImpltype - Entity type.query - Query to execute.public <T> List<T> list(Class<T> type, String queryName, Object value)
AbstractDAOImpllist in interface Repositorylist in class AbstractDAOImpltype - Entity type.queryName - Query name.value - Non-null parameter value.public <T> T unique(Class<T> type, Query query)
AbstractDAOImplunique in interface Repositoryunique in class AbstractDAOImpltype - Entity type.query - Query to execute.null if there are no results.public <T> T unique(Class<T> type, String queryName, Object value)
AbstractDAOImplunique in interface Repositoryunique in class AbstractDAOImpltype - Entity type.queryName - Query name.value - Non-null parameter value.null if there are no results.Copyright © 2014. All rights reserved.