|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IDao<T,PK extends Serializable>
Interface of a Generic (java-5 meaning) data access object
IGisDao| Method Summary | |
|---|---|
long |
count()
|
int |
deleteAll()
Delete all the object from the datastore |
void |
deleteAll(List<T> list)
Delete all the specified object from the datastore |
boolean |
exists(PK id)
Checks for existence of an object of type T using the id arg. |
void |
flushAndClear()
Flush all Memory Objects to the database, and clear the L1 cache, of the current thread-bound Hibernate Session. |
T |
get(PK id)
Retrieve the Object whith the specified primary key |
List<T> |
getAll()
Generic method used to get all objects of a particular type. |
List<T> |
getAllPaginate(int from,
int maxResults)
Returns all object of a particular type (i.e getAllPaginate(2,5) will return the [2,3,4,5,6] object |
Class<T> |
getPersistenceClass()
|
void |
remove(T o)
remove the object from the datastore |
T |
save(T o)
Saves the passed object, and returns an attached entity. |
void |
setFlushMode(org.hibernate.FlushMode flushMode)
Sets the flush mode (i.e. when objects are flushed to the database) of the current thread-bound session. |
| Method Detail |
|---|
Class<T> getPersistenceClass()
List<T> getAll()
List<T> getAllPaginate(int from,
int maxResults)
from - The first result to return numbered from 1maxResults - The maximum list size to return
org.hibernate.HibernateException - if thrown by the Hibernate API
SQLException - if thrown by JDBC APIvoid flushAndClear()
org.hibernate.HibernateException - that Indicates problems flushing the session or talking
to the databaseT save(T o)
o - The object to save
org.springframework.dao.DataAccessException - in case of errorsvoid setFlushMode(org.hibernate.FlushMode flushMode)
FlushModeType.AUTO, which lets the
persistence framework handle that issue. However, for performance
reasons, it might be necessary to set it to FlushModeType.COMMIT.
Warning : this sets the default flush mode of the session (either
hibernate Session, JPA EntityManager, or similar) that
is currently bound to the current thread. This means that it has
absolutely no effect if no transaction is currently opened.
flushMode - The flush mode To set for this dao
org.hibernate.HibernateException - if thrown by the Hibernate API
SQLException - if thrown by JDBC APIvoid remove(T o)
o - The object to remove
org.springframework.dao.DataAccessException - In case of errorsboolean exists(PK id)
id - the id of the entity
org.springframework.dao.DataAccessException - in case of errorsT get(PK id)
id - the primarey key
org.springframework.dao.DataAccessException - in case of errorslong count()
org.hibernate.HibernateException - if thrown by the Hibernate API
SQLException - if thrown by JDBC APIvoid deleteAll(List<T> list)
list - the list of element to delete
org.springframework.dao.DataAccessException - in case of errorsint deleteAll()
org.springframework.dao.DataAccessException - in case of errors
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||