T - the generic typepublic class PersistenceQueryProcessor<T> extends AbstractPersistenceProcessor
| Constructor and Description |
|---|
PersistenceQueryProcessor(IEntityManagerInterceptor entityManagerInterceptor)
Instantiates a new persistence query processor.
|
| Modifier and Type | Method and Description |
|---|---|
T |
find(Connection connection,
PersistenceTableModel tableModel,
Class<T> clazz,
Object id)
Find.
|
List<T> |
findAll(Connection connection,
PersistenceTableModel tableModel,
Class<T> clazz)
Find all.
|
protected String |
generateScript(Connection connection,
PersistenceTableModel tableModel)
Generate script.
|
protected String |
generateScriptFind(Connection connection,
PersistenceTableModel tableModel)
Generate script find.
|
protected String |
generateScriptFindAll(Connection connection,
PersistenceTableModel tableModel)
Generate script find all.
|
protected String |
generateScriptLock(Connection connection,
PersistenceTableModel tableModel)
Generate script lock.
|
protected T |
get(Connection connection,
PersistenceTableModel tableModel,
Class<T> clazz,
Object id,
String sql)
Gets the.
|
T |
lock(Connection connection,
PersistenceTableModel tableModel,
Class<T> clazz,
Object id)
Lock.
|
List<T> |
query(Connection connection,
PersistenceTableModel tableModel,
Class<T> clazz,
String sql,
List<Object> values)
Query.
|
closePreparedStatement, getEntityManagerInterceptor, getPrimaryKey, getPrimaryKeyModel, getValueFromPojo, openPreparedStatement, setEntityManagerInterceptor, setValue, setValue, setValuePrimaryKey, setValuesFromPojo, setValueToPojo, setValueToPojo, shouldSetColumnValuepublic PersistenceQueryProcessor(IEntityManagerInterceptor entityManagerInterceptor)
entityManagerInterceptor - the entity manager interceptorprotected String generateScript(Connection connection, PersistenceTableModel tableModel)
AbstractPersistenceProcessorgenerateScript in class AbstractPersistenceProcessorconnection - the connectiontableModel - the table modelprotected String generateScriptFind(Connection connection, PersistenceTableModel tableModel)
connection - the connectiontableModel - the table modelprotected String generateScriptLock(Connection connection, PersistenceTableModel tableModel)
connection - the connectiontableModel - the table modelprotected String generateScriptFindAll(Connection connection, PersistenceTableModel tableModel)
connection - the connectiontableModel - the table modelpublic T find(Connection connection, PersistenceTableModel tableModel, Class<T> clazz, Object id) throws PersistenceException
connection - the connectiontableModel - the table modelclazz - the clazzid - the idPersistenceException - the persistence exceptionpublic T lock(Connection connection, PersistenceTableModel tableModel, Class<T> clazz, Object id) throws PersistenceException
connection - the connectiontableModel - the table modelclazz - the clazzid - the idPersistenceException - the persistence exceptionprotected T get(Connection connection, PersistenceTableModel tableModel, Class<T> clazz, Object id, String sql) throws PersistenceException
connection - the connectiontableModel - the table modelclazz - the clazzid - the idsql - the sqlPersistenceException - the persistence exceptionpublic List<T> findAll(Connection connection, PersistenceTableModel tableModel, Class<T> clazz) throws PersistenceException
connection - the connectiontableModel - the table modelclazz - the clazzPersistenceException - the persistence exceptionpublic List<T> query(Connection connection, PersistenceTableModel tableModel, Class<T> clazz, String sql, List<Object> values)
connection - the connectiontableModel - the table modelclazz - the clazzsql - the sqlvalues - the valuesCopyright © 2010–2018 Eclipse Foundation. All rights reserved.