Package org.apache.metamodel.jdbc
Class JdbcUtils
- java.lang.Object
-
- org.apache.metamodel.jdbc.JdbcUtils
-
public final class JdbcUtils extends Object
Various internal utility methods for the JDBC module of MetaModel.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJdbcUtils.JdbcActionType
-
Constructor Summary
Constructors Constructor Description JdbcUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static StringcreateWhereClause(List<org.apache.metamodel.query.FilterItem> whereItems, IQueryRewriter queryRewriter, boolean inlineValues)static String[]getTableTypesAsStrings(org.apache.metamodel.schema.TableType[] tableTypes)static StringgetValueAsSql(org.apache.metamodel.schema.Column column, Object value, IQueryRewriter queryRewriter)static booleanisPreparedParameterCandidate(org.apache.metamodel.query.FilterItem whereItem)Determines if a particularFilterItemwill have it's parameter (operand) replaced during SQL generation.static voidsetStatementValue(PreparedStatement st, int valueIndex, org.apache.metamodel.schema.Column column, Object value)static org.apache.metamodel.MetaModelExceptionwrapException(SQLException e, String actionDescription, JdbcUtils.JdbcActionType actionType)
-
-
-
Method Detail
-
wrapException
public static org.apache.metamodel.MetaModelException wrapException(SQLException e, String actionDescription, JdbcUtils.JdbcActionType actionType) throws org.apache.metamodel.MetaModelException
- Throws:
org.apache.metamodel.MetaModelException
-
setStatementValue
@Deprecated public static void setStatementValue(PreparedStatement st, int valueIndex, org.apache.metamodel.schema.Column column, Object value) throws SQLException
- Throws:
SQLException
-
getValueAsSql
public static String getValueAsSql(org.apache.metamodel.schema.Column column, Object value, IQueryRewriter queryRewriter)
-
createWhereClause
public static String createWhereClause(List<org.apache.metamodel.query.FilterItem> whereItems, IQueryRewriter queryRewriter, boolean inlineValues)
-
isPreparedParameterCandidate
public static boolean isPreparedParameterCandidate(org.apache.metamodel.query.FilterItem whereItem)
Determines if a particularFilterItemwill 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(org.apache.metamodel.schema.TableType[] tableTypes)
-
-