public final class JdbcUtils extends Object
Constructor and Description |
---|
JdbcUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
createWhereClause(List<FilterItem> whereItems,
IQueryRewriter queryRewriter,
boolean inlineValues) |
static String[] |
getTableTypesAsStrings(TableType[] tableTypes) |
static String |
getValueAsSql(Column column,
Object value,
IQueryRewriter queryRewriter) |
static boolean |
isPreparedParameterCandidate(FilterItem whereItem)
Determines if a particular
FilterItem will have it's parameter
(operand) replaced during SQL generation. |
static void |
setStatementValue(PreparedStatement st,
int valueIndex,
Column column,
Object value)
Method which handles the action of setting a parameterized value on a
statement.
|
static MetaModelException |
wrapException(SQLException e,
String actionDescription) |
public static MetaModelException wrapException(SQLException e, String actionDescription) throws MetaModelException
MetaModelException
public static void setStatementValue(PreparedStatement st, int valueIndex, Column column, Object value) throws SQLException
PreparedStatement.setObject(int, Object)
method but for some
types we use more specific setter methods.st
- valueIndex
- column
- value
- SQLException
public static String getValueAsSql(Column column, Object value, IQueryRewriter queryRewriter)
public static String createWhereClause(List<FilterItem> whereItems, IQueryRewriter queryRewriter, boolean inlineValues)
public static boolean isPreparedParameterCandidate(FilterItem whereItem)
FilterItem
will have it's parameter
(operand) replaced during SQL generation. Such filter items should
succesively have their parameters set at execution time.whereItem
- Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.