T - the type of the domain objectPK - the type of the primary key from the domain objectpublic interface BusinessService<T,PK extends Serializable> extends Serializable
| Modifier and Type | Method and Description |
|---|---|
void |
delete(List<T> objects)
Delete all persistent objects in the given list.
|
void |
delete(PK id)
Deletes an object of a given Id.
|
void |
delete(T object)
Deletes the given object from persistent storage in the database.
|
void |
deleteAndFlush(List<T> objects)
Delete all persistent objects in the given list and flush.
|
void |
deleteAndFlush(PK id)
Deletes an object of a given Id and flush after.
|
void |
deleteAndFlush(T object)
Delete and flush.
|
void |
evict(T object)
Remove this instance from the session cache.
|
boolean |
exists(PK id)
Checks if an entry exists with the given id.
|
List<T> |
find(String hqlQuery,
String[] params,
Object[] paramValues,
org.hibernate.type.Type[] paramTypes,
Integer start,
Integer count)
Returns a list from the result from the given hqlquery.
|
List<T> |
findAll()
Returns a list of objects.
|
List<T> |
findByCriteria(org.hibernate.criterion.Criterion... criterion)
Hibernate wrapper.
|
List<T> |
findByExample(T exampleInstance,
String... excludeProperty)
Find by example.
|
void |
flush()
Flush.
|
T |
get(PK id)
Retrieve a persisted object with a given id from the database.
|
org.hibernate.Session |
getSession()
Gets the hibernate session.
|
T |
load(PK id)
Retrieve a persisted object with a given id from the database.
|
T |
merge(T object)
Merges the given object.
|
T |
mergeAndFlush(T object)
Merge and flush.
|
void |
refresh(T object)
Re-read the state of the given instance from the underlying database.
|
List<PK> |
save(List<T> objects)
Save all new objects in the given list.
|
PK |
save(T object)
Persist the given object into database.
|
List<PK> |
saveAndFlush(List<T> objects)
Save all given objects into database and flush.
|
PK |
saveAndFlush(T object)
Save the given object into database and flush.
|
void |
saveOrUpdate(List<T> objects)
Save or update all given objects into database.
|
void |
saveOrUpdate(T object)
Save or update the given object into database.
|
void |
saveOrUpdateAndFlush(List<T> objects)
Save or update all given objects into database and flush.
|
void |
saveOrUpdateAndFlush(T object)
Save or update the given object into database and flush.
|
void |
setSession(org.hibernate.Session session)
Sets the hibernate session.
|
void delete(List<T> objects)
objects - the list with the persistent objects to deletevoid delete(PK id)
id - the idvoid delete(T object)
object - the persistent objectvoid deleteAndFlush(List<T> objects)
objects - the objects to deletevoid deleteAndFlush(PK id)
id - the id to deletevoid deleteAndFlush(T object)
object - the objectvoid evict(T object)
object - the object to evict.boolean exists(PK id)
id - the id to checkList<T> find(String hqlQuery, String[] params, Object[] paramValues, org.hibernate.type.Type[] paramTypes, Integer start, Integer count)
hqlQuery - the hql query.params - Array from the parameter for the query.paramValues - Array from the values from the parameters for the query.paramTypes - Array which defines what kind of type the the parameter is.start - Defines from where to start the result.count - Defines how much rows to get from the query.List<T> findByCriteria(org.hibernate.criterion.Criterion... criterion)
criterion - the criterionList<T> findByExample(T exampleInstance, String... excludeProperty)
exampleInstance - the example instanceexcludeProperty - the exclude propertyvoid flush()
T get(PK id)
id - the idorg.hibernate.Session getSession()
void setSession(org.hibernate.Session session)
session - The hibernate session to set.T load(PK id)
id - the idT merge(T object)
object - the objectT mergeAndFlush(T object)
object - the objectvoid refresh(T object)
object - the object to refresh.List<PK> save(List<T> objects)
objects - the list to savePK save(T object)
object - the new instance to save.List<PK> saveAndFlush(List<T> objects)
objects - the objects to save.PK saveAndFlush(T object)
object - the object to save.void saveOrUpdate(List<T> objects)
objects - the objects to save or update.void saveOrUpdate(T object)
object - the object to save or update.void saveOrUpdateAndFlush(List<T> objects)
objects - the objects to save or update.void saveOrUpdateAndFlush(T object)
object - the object to save or update.Copyright © 2015 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.