Package com.objectsql
Class SQLServiceImpl
java.lang.Object
com.objectsql.SQLServiceImpl
- All Implemented Interfaces:
SQLService
- Direct Known Subclasses:
BaseServiceImpl
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ResultSetHandlerprotected Class<?> protected Class<?> -
Constructor Summary
ConstructorsConstructorDescriptionSQLServiceImpl(ObjectSQLManager objectSQLManager) SQLServiceImpl(DataSource dataSource) -
Method Summary
Modifier and TypeMethodDescription<S> List<S> batchInserts(List<S> ts, boolean rollback) <S> List<S> batchInserts(List<S> ts, int batchCount) <S> List<S> batchInserts(List<S> ts, int batchCount, boolean autoCommit) <S> List<S> batchInserts(List<S> ts, int batchCount, boolean autoCommit, boolean rollback) 批量保存booleanbatchUpdates(List<?> ts, boolean rollback) booleanbatchUpdates(List<?> ts, int batchCount) booleanbatchUpdates(List<?> ts, int batchCount, boolean autoCommit) booleanbatchUpdates(List<?> ts, int batchCount, boolean autoCommit, boolean rollback) booleanbatchUpdates(List<?> ts, String[] columns, boolean rollback) booleanbatchUpdates(List<?> ts, String[] columns, int batchCount) booleanbatchUpdates(List<?> ts, String[] columns, int batchCount, boolean autoCommit) booleanbatchUpdates(List<?> ts, String[] columns, int batchCount, boolean autoCommit, boolean rollback) 批量更新,根据sql更新,若更新列为null,则将被更新voidchangeDataSource(String alias) voidcloseConnection(ResultSet rs, Statement stmt, Connection conn) voidcreateOrUpdate(Table table, List<TableColumn> tableColumns) voidcreateOrUpdate(Class<?> table) voidbooleanbooleanexecuteBatch(String sql, boolean autoCommit, boolean rollback, Object[]... params) booleanexecuteBatch(String sql, Object[]... params) getTableName(Class<?> clazz) voidquery(String sql, Object[] params, ResultSetFunction function) intqueryCount(String sql, Object... params) queryMapList(String sql, Object... params) <T> TqueryObject(Class<T> clazz, String sql, Object... params) <T> List<T> queryObjectList(Class<T> clazz, String sql, Object... params) queryResult(String sql, Object... params) voidsetObjectSQLManager(ObjectSQLManager objectSQLManager) voidsetResultSetHandler(ResultSetHandler resultSetHandler) voidtableColumns(String tableName) tableColumns(Connection temp, String tableName) tableColumnsClass(String tableName) tableColumnsClass(Connection temp, String tableName) booleantableExists(String table) tables()<T> TtxCommit(int propagation, int isolationLevel, ExecuteHandler<T> handler) <T> TtxCommit(int propagation, int isolationLevel, ExecuteHandler<T> handler, CommitHandler<T> commitHandler) <T> TtxCommit(int propagation, ExecuteHandler<T> handler) <T> TtxCommit(int propagation, ExecuteHandler<T> handler, CommitHandler<T> commitHandler) <T> TtxCommit(ExecuteHandler<T> handler) <T> TtxCommit(ExecuteHandler<T> handler, CommitHandler<T> commitHandler)
-
Field Details
-
objectSQLManager
-
thisClass
-
serviceClass
-
resultSetHandler
-
-
Constructor Details
-
SQLServiceImpl
public SQLServiceImpl() -
SQLServiceImpl
-
SQLServiceImpl
-
-
Method Details
-
getSchema
- Specified by:
getSchemain interfaceSQLService
-
setSchema
- Specified by:
setSchemain interfaceSQLService
-
getResultSetHandler
-
setResultSetHandler
-
getObjectSQLManager
- Specified by:
getObjectSQLManagerin interfaceSQLService
-
getOptions
- Specified by:
getOptionsin interfaceSQLService
-
currentDatabaseName
- Specified by:
currentDatabaseNamein interfaceSQLService
-
currentDatabaseType
- Specified by:
currentDatabaseTypein interfaceSQLService
-
getDataSource
- Specified by:
getDataSourcein interfaceSQLService
-
changeDataSource
- Specified by:
changeDataSourcein interfaceSQLService
-
setObjectSQLManager
- Specified by:
setObjectSQLManagerin interfaceSQLService
-
execute
- Specified by:
executein interfaceSQLService
-
executeBatch
- Specified by:
executeBatchin interfaceSQLService
-
query
- Specified by:
queryin interfaceSQLService
-
executeBatch
- Specified by:
executeBatchin interfaceSQLService
-
queryObject
- Specified by:
queryObjectin interfaceSQLService
-
queryObjectList
- Specified by:
queryObjectListin interfaceSQLService
-
queryMap
- Specified by:
queryMapin interfaceSQLService
-
queryMapList
- Specified by:
queryMapListin interfaceSQLService
-
queryCount
- Specified by:
queryCountin interfaceSQLService
-
queryResult
- Specified by:
queryResultin interfaceSQLService
-
closeConnection
-
getConnection
- Specified by:
getConnectionin interfaceSQLService
-
getDatabaseDateTime
- Specified by:
getDatabaseDateTimein interfaceSQLService
-
getDatabaseNanoTime
- Specified by:
getDatabaseNanoTimein interfaceSQLService
-
batchInserts
- Specified by:
batchInsertsin interfaceSQLService
-
batchInserts
- Specified by:
batchInsertsin interfaceSQLService
-
batchInserts
- Specified by:
batchInsertsin interfaceSQLService
-
batchInserts
Description copied from interface:SQLService批量保存- Specified by:
batchInsertsin interfaceSQLService- Parameters:
ts- data listbatchCount- batch countautoCommit- auto commitrollback- 当autoCommit=false 有效, rollback = false 不回滚, 为true 回滚- Returns:
- List
-
batchUpdates
public boolean batchUpdates(List<?> ts, String[] columns, int batchCount, boolean autoCommit, boolean rollback) Description copied from interface:SQLService批量更新,根据sql更新,若更新列为null,则将被更新- Specified by:
batchUpdatesin interfaceSQLService- Parameters:
ts- data listcolumns- 指定更新列,未指定则更新全部batchCount- batch countautoCommit- auto commitrollback- 当autoCommit=false 有效, rollback = false 不回滚, 为true 回滚- Returns:
- boolean
-
batchUpdates
- Specified by:
batchUpdatesin interfaceSQLService
-
batchUpdates
- Specified by:
batchUpdatesin interfaceSQLService
-
batchUpdates
- Specified by:
batchUpdatesin interfaceSQLService
-
batchUpdates
- Specified by:
batchUpdatesin interfaceSQLService
-
batchUpdates
- Specified by:
batchUpdatesin interfaceSQLService
-
batchUpdates
- Specified by:
batchUpdatesin interfaceSQLService
-
batchUpdates
- Specified by:
batchUpdatesin interfaceSQLService
-
createOrUpdate
- Specified by:
createOrUpdatein interfaceSQLService- Throws:
ORMException
-
drop
- Specified by:
dropin interfaceSQLService- Throws:
ORMException
-
createOrUpdate
- Specified by:
createOrUpdatein interfaceSQLService- Throws:
ORMException
-
tableExists
- Specified by:
tableExistsin interfaceSQLService
-
getTableName
- Specified by:
getTableNamein interfaceSQLService- Throws:
ORMException
-
table
- Specified by:
tablein interfaceSQLService- Throws:
ORMException
-
table
- Specified by:
tablein interfaceSQLService
-
columns
- Specified by:
columnsin interfaceSQLService- Throws:
ORMException
-
tables
- Specified by:
tablesin interfaceSQLService
-
tables
- Specified by:
tablesin interfaceSQLService
-
tableColumns
- Specified by:
tableColumnsin interfaceSQLService
-
tableColumns
- Specified by:
tableColumnsin interfaceSQLService
-
tableColumnsClass
- Specified by:
tableColumnsClassin interfaceSQLService
-
tableColumnsClass
- Specified by:
tableColumnsClassin interfaceSQLService
-
txCommit
- Specified by:
txCommitin interfaceSQLService
-
txCommit
- Specified by:
txCommitin interfaceSQLService
-
txCommit
- Specified by:
txCommitin interfaceSQLService
-
txCommit
- Specified by:
txCommitin interfaceSQLService
-
txCommit
- Specified by:
txCommitin interfaceSQLService
-
txCommit
public <T> T txCommit(int propagation, int isolationLevel, ExecuteHandler<T> handler, CommitHandler<T> commitHandler) - Specified by:
txCommitin interfaceSQLService
-