public class DataStoreManager extends Object implements DataStoreService
| Constructor and Description |
|---|
DataStoreManager(javax.persistence.EntityManagerFactory emf,
org.slf4j.Logger log)
Construct the instance to use the provided entity manager factory
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
execute(ReadQuery<T> query)
Executes a query operation on the persistence layer.
|
<T> T |
execute(WriteQuery<T> update)
Executes an update operation on the persistence layer.
|
public DataStoreManager(javax.persistence.EntityManagerFactory emf,
org.slf4j.Logger log)
emf - the entity manager factory to be used.log - the Logger implementation to usepublic <T> T execute(ReadQuery<T> query) throws Exception
DataStoreServiceexecute in interface DataStoreServiceT - type of the query result.query - the query to execute.Exception - if exception happen while executing the query.public <T> T execute(WriteQuery<T> update) throws Exception
DataStoreServiceexecute in interface DataStoreServiceT - type of the update result.update - the database update to execute.Exception - if exception happen while executing the update.Copyright © 2014. All Rights Reserved.