|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DAO<T>
Data Access Object (DAO) generic interface.
| Method Summary | |
|---|---|
void |
clear()
Clear the session cache. |
void |
delete(T obj)
Delete the given instance from the persistent store. |
void |
detach(T obj)
Evict an object from the session cache. |
void |
flush()
Flush outstanding changes to the persistent store. |
List<T> |
getAll()
Get all instances. |
T |
getById(long id)
Get an instance by ID. |
T |
getReference(long id)
Get a reference to an instance by ID. |
boolean |
isReadOnly()
Determine if the current transaction is read-only. |
T |
merge(T obj)
Merge the given object into the current session. |
void |
refresh(T obj)
Refresh the given object from the database. |
void |
save(T obj)
Save a newly created instance. |
void |
setFlushMode(FlushModeType flushMode)
Set flush mode. |
| Method Detail |
|---|
T getById(long id)
List<T> getAll()
T getReference(long id)
Note if the instance does not exist, then an exception may be thrown either here or later upon first access.
void save(T obj)
void delete(T obj)
T merge(T obj)
void refresh(T obj)
void detach(T obj)
void flush()
void setFlushMode(FlushModeType flushMode)
void clear()
boolean isReadOnly()
IllegalStateException - if no transaction is associated with the current thread
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||