|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate3.support.HibernateDaoSupport
com.elasticpath.persistence.impl.HibernatePersistenceEngineImpl
public class HibernatePersistenceEngineImpl
A wrapper of Hibernate to provide implementation of PersistenceEngine.
| Constructor Summary | |
|---|---|
HibernatePersistenceEngineImpl()
|
|
| Method Summary | |
|---|---|
int |
bulkUpdate(java.lang.String query)
Update/delete all objects according to the given query. |
int |
bulkUpdate(java.lang.String query,
java.lang.Object[] parameters)
Update/delete all objects according to the given query. |
void |
clear()
Clear the cache. |
void |
delete(Persistence object)
Delete the given persistent instance. |
int |
executeSessionUpdate(java.lang.String sql)
Excute the bulk update with the specified query. |
java.util.List |
find(java.lang.Class objClass,
java.util.List propertyCriteria)
Retrieve a list of persistent instances of the specified class with the specified property criteria. |
java.util.List |
find(java.lang.Class objClass,
PropertyCriterion propertyCriterion)
Retrieve a list of persistent instances of the specified class with the specified property criterion. |
java.util.List |
find(java.lang.Class objClass,
RelationCriterion relationCriterion)
Retrieve a list of persistent instances of the specified class with the specified relation criterion. |
void |
flush()
Flush the cache. |
Persistence |
get(java.lang.Class persistenceClass,
long uidPk)
Get a persistent instance with the given id. |
PersistenceSession |
getPersistenceSession()
Returns hibernate session. |
void |
initialize(java.lang.Object object)
Initialize the given object. |
Persistence |
load(java.lang.Class persistenceClass,
long uidPk)
Load a persistent instance with the given id. |
void |
merge(Persistence object)
Merge the given persistent instance. |
java.util.List |
retrieve(java.util.List queries)
Retrieve a list of persistent instances with the given list of queries. |
java.util.List |
retrieve(java.util.List queries,
java.lang.Object[] parameters)
Retrieve a list of persistent instances with the given list of queries. |
java.util.List |
retrieve(java.lang.String query)
Retrieve a list of persistent instances with the specified query. |
java.util.List |
retrieve(java.lang.String queryStr,
int firstResult,
int maxRestuls)
Retrieve a list of persistent instances with the specified query and bounds, namely, the maximum number of rows to retrieve and / or the first row to retrieve. |
java.util.List |
retrieve(java.lang.String query,
java.lang.Object[] parameters)
Retrieve a list of persistent instances with the specified query. |
java.util.List |
retrieve(java.lang.String query,
java.lang.Object[] parameters,
boolean cacheQuery)
Retrieve a list of persistent instances with the specified query. |
java.util.List |
retrieve(java.lang.String queryStr,
java.lang.Object[] parameters,
int firstResult,
int maxRestuls)
Retrieve a list of persistent instances with the specified query and bounds, namely, the maximum number of rows to retrieve and / or the first row to retrieve. |
void |
save(Persistence object)
Persist the given instance. |
void |
saveOrMerge(Persistence object)
Save the persistence instance if it's new or merge the persistent instance if it exists. |
void |
saveOrUpdate(Persistence object)
Save the persistence instance if it's new or update the persistent instance if it exists. |
void |
update(Persistence object)
Update the given persistent instance. |
| Methods inherited from class org.springframework.orm.hibernate3.support.HibernateDaoSupport |
|---|
getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactory |
| Methods inherited from class org.springframework.dao.support.DaoSupport |
|---|
afterPropertiesSet |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HibernatePersistenceEngineImpl()
| Method Detail |
|---|
public int bulkUpdate(java.lang.String query)
throws EpPersistenceException
bulkUpdate in interface PersistenceEnginequery - the HQL query
EpPersistenceException - - in case of persistence errors
public int bulkUpdate(java.lang.String query,
java.lang.Object[] parameters)
throws EpPersistenceException
bulkUpdate in interface PersistenceEnginequery - the HQL queryparameters - the prameters to be used with the criteria
EpPersistenceException - - in case of persistence errorspublic void clear()
clear in interface PersistenceEngine
public void delete(Persistence object)
throws EpPersistenceException
delete in interface PersistenceEngineobject - the instance to delete
EpPersistenceException - - in case of persistence errors
public int executeSessionUpdate(java.lang.String sql)
throws EpPersistenceException
sql - the HQL sql statement
EpPersistenceException - - in case of persistence errors
public java.util.List find(java.lang.Class objClass,
java.util.List propertyCriteria)
throws EpPersistenceException
find in interface PersistenceEngineobjClass - Class of the objectpropertyCriteria - property criteria for retrieving
EpPersistenceException - - in case of persistence errors
public java.util.List find(java.lang.Class objClass,
PropertyCriterion propertyCriterion)
throws EpPersistenceException
find in interface PersistenceEngineobjClass - Class of the objectpropertyCriterion - property criterion for retrieving
EpPersistenceException - - in case of persistence errors
public java.util.List find(java.lang.Class objClass,
RelationCriterion relationCriterion)
throws EpPersistenceException
find in interface PersistenceEngineobjClass - Class of the objectrelationCriterion - relation criterion for retrieving
EpPersistenceException - - in case of persistence errorspublic void flush()
flush in interface PersistenceEngine
public Persistence get(java.lang.Class persistenceClass,
long uidPk)
throws EpPersistenceException
get in interface PersistenceEnginepersistenceClass - the persistent class of the given id.uidPk - the persistent instance id.
EpPersistenceException - - in case of persistence errorspublic PersistenceSession getPersistenceSession()
getPersistenceSession in interface PersistenceEnginepublic void initialize(java.lang.Object object)
initialize in interface PersistenceEngineobject - the object to initialize.
public Persistence load(java.lang.Class persistenceClass,
long uidPk)
throws EpPersistenceException
load in interface PersistenceEnginepersistenceClass - the persistent class of the given id.uidPk - The persistent instance id.
EpPersistenceException - - in case of persistence errors
public void merge(Persistence object)
throws EpPersistenceException
merge in interface PersistenceEngineobject - the instance to merge
EpPersistenceException - - in case of persistence errors
public java.util.List retrieve(java.util.List queries)
throws EpPersistenceException
Note: all queries must return the same type of data. Their results will be merged into the list returned by this method.
retrieve in interface PersistenceEnginequeries - the list of queries
EpPersistenceException - - in case of persistence errors
public java.util.List retrieve(java.util.List queries,
java.lang.Object[] parameters)
throws EpPersistenceException
Note: all queries must return the same type of data. Their results will be merged into the list returned by this method.
retrieve in interface PersistenceEnginequeries - the list of queriesparameters - the prameters to be used with the given query
EpPersistenceException - - in case of persistence errors
public java.util.List retrieve(java.lang.String query)
throws EpPersistenceException
retrieve in interface PersistenceEnginequery - the HQL query
EpPersistenceException - - in case of persistence errors
public java.util.List retrieve(java.lang.String queryStr,
int firstResult,
int maxRestuls)
throws EpPersistenceException
retrieve in interface PersistenceEnginequeryStr - the HQL query string to be executed.firstResult - the first row to retrieve.maxRestuls - the maximum number of rows to retrieve.
EpPersistenceException - - in case of persistence errors
public java.util.List retrieve(java.lang.String query,
java.lang.Object[] parameters)
throws EpPersistenceException
retrieve in interface PersistenceEnginequery - the HQL queryparameters - the prameters to be used with the criteria
EpPersistenceException - - in case of persistence errors
public java.util.List retrieve(java.lang.String query,
java.lang.Object[] parameters,
boolean cacheQuery)
throws EpPersistenceException
retrieve in interface PersistenceEnginequery - the HQL queryparameters - the prameters to be used with the criteriacacheQuery - set it to true to cache the query result
EpPersistenceException - - in case of persistence errors
public java.util.List retrieve(java.lang.String queryStr,
java.lang.Object[] parameters,
int firstResult,
int maxRestuls)
throws EpPersistenceException
retrieve in interface PersistenceEnginequeryStr - the HQL query string to be executed.firstResult - the first row to retrieve.maxRestuls - the maximum number of rows to retrieve.parameters - the prameters to be used with the criteria
EpPersistenceException - - in case of persistence errors
public void save(Persistence object)
throws EpPersistenceException
save in interface PersistenceEngineobject - the instance to save.
EpPersistenceException - - in case of persistence errors
public void saveOrMerge(Persistence object)
throws EpPersistenceException
saveOrMerge in interface PersistenceEngineobject - the instance to save or merge
EpPersistenceException - - in case of persistence errors
public void saveOrUpdate(Persistence object)
throws EpPersistenceException
saveOrUpdate in interface PersistenceEngineobject - the instance to save or update
EpPersistenceException - - in case of persistence errors
public void update(Persistence object)
throws EpPersistenceException
update in interface PersistenceEngineobject - the instance to update
EpPersistenceException - - in case of persistence errors
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||