public abstract class JDBCEntityManager extends Object implements DistributableEntityManager
| Modifier and Type | Field and Description |
|---|---|
protected DDBSEntityManager<DDBSEntity<DDBSEntityProperty>> |
ddbsEntityManager
DDBS Entity manager
|
protected JDBCConditionConverter |
jdbcConditionConverter
JDBC Condition converter
|
protected JDBCConnector |
jdbcConnector
JDBC connector
|
protected JDBCPreparedStatementManager |
jdbcPreparedStatementManager
JDBC Prepared Statement Manager
|
| Constructor and Description |
|---|
JDBCEntityManager(JDBCConnector jdbcConnector)
JDBC Entity manager with a single connection
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(IEntity objectToAdd) |
void |
close() |
void |
commit(DDBSTransaction transaction) |
protected <T extends IEntity> |
conversionResultSet(ResultSet results,
T myObject) |
boolean |
createEntity(IEntity objectToCreate) |
boolean |
delete(IEntity objectToDelete) |
DDBSTransaction |
executeTransaction(DDBSTransaction transaction) |
protected String |
getDeleteSQLString(DDBSEntity<DDBSEntityProperty> ddbsEntity)
Create Delete SQL Query
|
protected String |
getInsertSQLString(DDBSEntity<DDBSEntityProperty> ddbsEntity)
Create Insert SQL Query
|
protected String |
getUpdateSQLString(DDBSEntity<DDBSEntityProperty> ddbsEntity)
Create Update SQL Query
|
boolean |
isOpen() |
<T extends IEntity> |
listAll(T object,
Conditions conditions,
OrderBy orderBy) |
<T extends IEntity> |
listAllWithQueryString(T object,
String conditionQueryString,
OrderBy orderBy) |
<T extends IEntity> |
loadArray(T objectToLoad,
String field,
OrderBy orderBy) |
void |
open() |
<T extends IEntity> |
read(T object) |
<T extends IEntity> |
readLastElement(T object) |
void |
rollback(DDBSTransaction transaction) |
void |
setAutoCommit(boolean isAutoCommit) |
boolean |
update(IEntity objectToUpdate) |
protected JDBCConnector jdbcConnector
protected JDBCPreparedStatementManager jdbcPreparedStatementManager
protected DDBSEntityManager<DDBSEntity<DDBSEntityProperty>> ddbsEntityManager
protected JDBCConditionConverter jdbcConditionConverter
public JDBCEntityManager(JDBCConnector jdbcConnector)
jdbcConnector - JDBC Connectorpublic boolean isOpen()
throws DDBSToolkitException
isOpen in interface DistributableEntityManagerDDBSToolkitExceptionpublic void open()
throws DDBSToolkitException
open in interface DistributableEntityManagerDDBSToolkitExceptionpublic void close()
throws DDBSToolkitException
close in interface DistributableEntityManagerDDBSToolkitExceptionpublic void setAutoCommit(boolean isAutoCommit)
throws DDBSToolkitException
setAutoCommit in interface DistributableEntityManagerDDBSToolkitExceptionpublic void commit(DDBSTransaction transaction) throws DDBSToolkitException
commit in interface DistributableEntityManagerDDBSToolkitExceptionpublic void rollback(DDBSTransaction transaction) throws DDBSToolkitException
rollback in interface DistributableEntityManagerDDBSToolkitExceptionpublic DDBSTransaction executeTransaction(DDBSTransaction transaction) throws DDBSToolkitException
executeTransaction in interface DistributableEntityManagerDDBSToolkitExceptionpublic <T extends IEntity> List<T> listAll(T object, Conditions conditions, OrderBy orderBy) throws DDBSToolkitException
listAll in interface DistributableEntityManagerDDBSToolkitExceptionpublic <T extends IEntity> List<T> listAllWithQueryString(T object, String conditionQueryString, OrderBy orderBy) throws DDBSToolkitException
listAllWithQueryString in interface DistributableEntityManagerDDBSToolkitExceptionpublic <T extends IEntity> T read(T object) throws DDBSToolkitException
read in interface DistributableEntityManagerDDBSToolkitExceptionpublic <T extends IEntity> T readLastElement(T object) throws DDBSToolkitException
readLastElement in interface DistributableEntityManagerDDBSToolkitExceptionprotected String getInsertSQLString(DDBSEntity<DDBSEntityProperty> ddbsEntity)
ddbsEntity - DDBSEntitypublic boolean add(IEntity objectToAdd) throws DDBSToolkitException
add in interface UpdatableEntityManagerDDBSToolkitExceptionprotected String getUpdateSQLString(DDBSEntity<DDBSEntityProperty> ddbsEntity)
ddbsEntity - DDBSEntitypublic boolean update(IEntity objectToUpdate) throws DDBSToolkitException
update in interface UpdatableEntityManagerDDBSToolkitExceptionprotected String getDeleteSQLString(DDBSEntity<DDBSEntityProperty> ddbsEntity)
ddbsEntity - DDBSEntitypublic boolean delete(IEntity objectToDelete) throws DDBSToolkitException
delete in interface UpdatableEntityManagerDDBSToolkitExceptionpublic <T extends IEntity> T loadArray(T objectToLoad, String field, OrderBy orderBy) throws DDBSToolkitException
loadArray in interface DistributableEntityManagerDDBSToolkitExceptionpublic boolean createEntity(IEntity objectToCreate) throws DDBSToolkitException
createEntity in interface UpdatableEntityManagerDDBSToolkitExceptionprotected <T extends IEntity> List<T> conversionResultSet(ResultSet results, T myObject) throws DDBSToolkitException
DDBSToolkitExceptionCopyright © 2016. All rights reserved.