public interface GenericDAO<T>
Modifier and Type | Method and Description |
---|---|
void |
delete(Serializable id)
Deletes the given object of the generic's type from the database.
|
T |
get(Serializable id)
Returns the database object of the generic's type with the given
database Id.
|
Class<T> |
getPersistentClass() |
T |
insert(T t)
Saves the given object of the generic's type to the database.
|
T |
merge(T t)
Merges (updates) the given object of the generic's type in the database.
|
T |
refresh(T t)
Refreshes (reloads, reverts) the given object of the generic's type from the database.
|
T |
update(T t)
Updates the given object of the generic's type in the database.
|
Class<T> getPersistentClass()
T
.T get(Serializable id)
id
- The database Id of the object to be retrieved.T insert(T t)
t
- The object to be save to the database.T update(T t)
t
- The object to be updated in the database.T merge(T t)
t
- The object to be updated in the database.T refresh(T t)
t
- The object to be reloaded from the database.void delete(Serializable id)
id
- Database-Id of object to be deleted from the database.Copyright © 2016 Clazzes.org. All rights reserved.