public interface GeneralDAO
Modifier and Type | Method and Description |
---|---|
int |
count(ISearch search)
Returns the total number of results that would be returned using the
given
ISearch if there were no paging or maxResult limits. |
void |
create(java.lang.Object object)
Add the specified object as a new entry in the datastore.
|
boolean |
createOrUpdate(java.lang.Object object)
If the id of the object is null or zero, create, otherwise update.
|
boolean |
deleteById(java.lang.Class<?> klass,
java.io.Serializable id)
Remove the object with the specified id and class from the datastore.
|
boolean |
deleteEntity(java.lang.Object object)
Remove the specified object from the datastore.
|
<T> T |
fetch(java.lang.Class<T> klass,
java.io.Serializable id)
Get the object with the specified id and class from the datastore.
|
<T> java.util.List<T> |
fetchAll(java.lang.Class<T> klass)
Get a list of all the objects of the specified type.
|
void |
flush()
Flushes changes in the Hibernate session to the datastore.
|
Filter |
getFilterFromExample(java.lang.Object example)
Generates a search filter from the given example using default options.
|
Filter |
getFilterFromExample(java.lang.Object example,
ExampleOptions options)
Generates a search filter from the given example using the specified options.
|
boolean |
isConnected(java.lang.Object object)
Returns true if the object is connected to the current Hibernate session.
|
void |
refresh(java.lang.Object object)
Refresh the content of the given entity from the current datastore state.
|
java.util.List |
search(ISearch search)
Search for objects given the search parameters in the specified
ISearch object. |
SearchResult |
searchAndCount(ISearch search)
Returns a
SearchResult object that includes the list of
results like search() and the total length like
searchLength . |
java.lang.Object |
searchUnique(ISearch search)
ISearch for a single result using the given parameters.
|
void |
update(java.lang.Object object)
Update the corresponding object in the datastore with the properties of
the specified object.
|
void create(java.lang.Object object)
boolean createOrUpdate(java.lang.Object object)
true
if create; false
if update.boolean deleteById(java.lang.Class<?> klass, java.io.Serializable id)
true
if the object is found in the datastore and
removed, false
if the item is not found.boolean deleteEntity(java.lang.Object object)
true
if the object is found in the datastore and
removed, false
if the item is not found.<T> T fetch(java.lang.Class<T> klass, java.io.Serializable id)
<T> java.util.List<T> fetchAll(java.lang.Class<T> klass)
void update(java.lang.Object object)
java.util.List search(ISearch search)
ISearch
object.int count(ISearch search)
ISearch
if there were no paging or maxResult limits.SearchResult searchAndCount(ISearch search)
SearchResult
object that includes the list of
results like search()
and the total length like
searchLength
.java.lang.Object searchUnique(ISearch search) throws org.hibernate.NonUniqueResultException
org.hibernate.NonUniqueResultException
void flush()
boolean isConnected(java.lang.Object object)
void refresh(java.lang.Object object)
Filter getFilterFromExample(java.lang.Object example)
Filter getFilterFromExample(java.lang.Object example, ExampleOptions options)