org.apache.metamodel.jdbc
Class JdbcUtils
java.lang.Object
org.apache.metamodel.jdbc.JdbcUtils
public final class JdbcUtils
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JdbcUtils
public JdbcUtils()
wrapException
public static MetaModelException wrapException(SQLException e,
String actionDescription)
throws MetaModelException
- Throws:
MetaModelException
setStatementValue
public static void setStatementValue(PreparedStatement st,
int valueIndex,
Column column,
Object value)
throws SQLException
- Method which handles the action of setting a parameterized value on a
statement. Traditionally this is done using the
PreparedStatement.setObject(int, Object) method but for some
types we use more specific setter methods.
- Parameters:
st - valueIndex - column - value -
- Throws:
SQLException
getValueAsSql
public static String getValueAsSql(Column column,
Object value,
IQueryRewriter queryRewriter)
createWhereClause
public static String createWhereClause(List<FilterItem> whereItems,
IQueryRewriter queryRewriter,
boolean inlineValues)
isPreparedParameterCandidate
public static boolean isPreparedParameterCandidate(FilterItem whereItem)
- Determines if a particular
FilterItem will have it's parameter
(operand) replaced during SQL generation. Such filter items should
succesively have their parameters set at execution time.
- Parameters:
whereItem -
- Returns:
getTableTypesAsStrings
public static String[] getTableTypesAsStrings(TableType[] tableTypes)
Copyright © 2007-2014 The Apache Software Foundation. All Rights Reserved.