public class JdbcUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
JdbcUtils.ColumnId |
static class |
JdbcUtils.TableDefinition |
static class |
JdbcUtils.TableId |
| Constructor and Description |
|---|
JdbcUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
buildDeleteSql(JdbcUtils.TableDefinition table) |
static PreparedStatement |
buildDeleteStatement(Connection connection,
String deleteSQL) |
static String |
buildInsertSql(JdbcUtils.TableDefinition table) |
static PreparedStatement |
buildInsertStatement(Connection connection,
String insertSQL) |
static String |
buildUpdateSql(JdbcUtils.TableDefinition table) |
static PreparedStatement |
buildUpdateStatement(Connection connection,
String updateSQL) |
static String |
combationWhere(List<JdbcUtils.ColumnId> columnIds) |
static String |
getDriverClassName(String jdbcUrl) |
static JdbcUtils.TableDefinition |
getTableDefinition(Connection connection,
JdbcUtils.TableId tableId,
List<String> keyList,
List<String> nonKeyList)
Get the
JdbcUtils.TableDefinition for the given table. |
static JdbcUtils.TableId |
getTableId(Connection connection,
String tableName)
Get the
JdbcUtils.TableId for the given tableName. |
public static JdbcUtils.TableId getTableId(Connection connection, String tableName) throws Exception
JdbcUtils.TableId for the given tableName.Exceptionpublic static JdbcUtils.TableDefinition getTableDefinition(Connection connection, JdbcUtils.TableId tableId, List<String> keyList, List<String> nonKeyList) throws Exception
JdbcUtils.TableDefinition for the given table.Exceptionpublic static String buildInsertSql(JdbcUtils.TableDefinition table)
public static PreparedStatement buildInsertStatement(Connection connection, String insertSQL) throws SQLException
SQLExceptionpublic static String combationWhere(List<JdbcUtils.ColumnId> columnIds)
public static String buildUpdateSql(JdbcUtils.TableDefinition table)
public static PreparedStatement buildUpdateStatement(Connection connection, String updateSQL) throws SQLException
SQLExceptionpublic static String buildDeleteSql(JdbcUtils.TableDefinition table)
public static PreparedStatement buildDeleteStatement(Connection connection, String deleteSQL) throws SQLException
SQLExceptionCopyright © 2017–2022 Apache Software Foundation. All rights reserved.