T - the type of the domain objectPK - the type of the primary key from the domain objectDAO - the type of the data access object.public abstract class AbstractBusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable,DAO extends de.alpharogroup.db.dao.sessionfactory.SessionFactoryDao<T,PK>> extends Object implements SessionFactoryBusinessService<T,PK>
| Constructor and Description |
|---|
AbstractBusinessService() |
| 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 id)
Deletes the given object from persistent storage in the database.
|
void |
deleteAndFlush(List<T> objects)
Delete and flush.
|
void |
deleteAndFlush(PK id)
Delete and flush.
|
void |
deleteAndFlush(T t)
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)
Find.
|
List<T> |
findAll()
Returns a list of objects.
|
List<T> |
findByCriteria(org.hibernate.criterion.Criterion... criterion)
Find by criteria.
|
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.Query |
getQuery(String s)
Gets the query.
|
org.hibernate.Session |
getSession()
Gets the session.
|
T |
load(PK id)
Retrieve a persisted object with a given id from the database.
|
List<T> |
merge(List<T> objects)
Merges all new objects in the given list.
|
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 newInstance)
Persist the given object into database.
|
List<PK> |
saveAndFlush(List<T> objects)
Save and flush.
|
PK |
saveAndFlush(T object)
Save 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 and flush.
|
void |
saveOrUpdateAndFlush(T object)
Save or update and flush.
|
void |
setSession(org.hibernate.Session session)
Sets the session.
|
public void delete(List<T> objects)
delete in interface BusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable>objects - the list with the persistent objects to deletepublic void delete(PK id)
delete in interface BusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable>id - the idpublic void delete(T id)
delete in interface BusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable>id - the persistent objectpublic void deleteAndFlush(List<T> objects)
deleteAndFlush in interface SessionFactoryBusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable>objects - the objectspublic void deleteAndFlush(PK id)
deleteAndFlush in interface SessionFactoryBusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable>id - the idpublic void deleteAndFlush(T t)
deleteAndFlush in interface SessionFactoryBusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable>t - the tpublic void evict(T object)
evict in interface BusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable>object - the object to evict.public boolean exists(PK id)
exists in interface BusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable>id - the id to checkpublic List<T> find(String hqlQuery, String[] params, Object[] paramValues, org.hibernate.type.Type[] paramTypes, Integer start, Integer count)
find in interface SessionFactoryBusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable>hqlQuery - the hql queryparams - the paramsparamValues - the param valuesparamTypes - the param typesstart - the startcount - the countpublic List<T> findAll()
findAll in interface BusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable>public List<T> findByCriteria(org.hibernate.criterion.Criterion... criterion)
findByCriteria in interface SessionFactoryBusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable>criterion - the criterionpublic List<T> findByExample(T exampleInstance, String... excludeProperty)
findByExample in interface SessionFactoryBusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable>exampleInstance - the example instanceexcludeProperty - the exclude propertypublic void flush()
flush in interface SessionFactoryBusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable>public T get(PK id)
get in interface BusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable>id - the idpublic org.hibernate.Query getQuery(String s)
s - the spublic org.hibernate.Session getSession()
getSession in interface SessionFactoryBusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable>public T load(PK id)
load in interface BusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable>id - the idpublic List<T> merge(List<T> objects)
merge in interface BusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable>objects - the list to savepublic T merge(T object)
merge in interface BusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable>object - the objectpublic T mergeAndFlush(T object)
mergeAndFlush in interface SessionFactoryBusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable>object - the objectpublic void refresh(T object)
refresh in interface BusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable>object - the object to refresh.public List<PK> save(List<T> objects)
save in interface BusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable>objects - the list to savepublic PK save(T newInstance)
save in interface BusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable>newInstance - the new instance to save.public List<PK> saveAndFlush(List<T> objects)
saveAndFlush in interface SessionFactoryBusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable>objects - the objectspublic PK saveAndFlush(T object)
saveAndFlush in interface SessionFactoryBusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable>object - the objectpublic void saveOrUpdate(List<T> objects)
saveOrUpdate in interface BusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable>objects - the objects to save or update.public void saveOrUpdate(T object)
saveOrUpdate in interface BusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable>object - the object to save or update.public void saveOrUpdateAndFlush(List<T> objects)
saveOrUpdateAndFlush in interface SessionFactoryBusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable>objects - the objectspublic void saveOrUpdateAndFlush(T object)
saveOrUpdateAndFlush in interface SessionFactoryBusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable>object - the objectpublic void setSession(org.hibernate.Session session)
setSession in interface SessionFactoryBusinessService<T extends de.alpharogroup.db.entity.BaseEntity<PK>,PK extends Serializable>session - the new sessionCopyright © 2015–2016 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.