Class JdbcUtils


  • public final class JdbcUtils
    extends Object
    Various internal utility methods for the JDBC module of MetaModel.
    • Constructor Detail

      • JdbcUtils

        public JdbcUtils()
    • 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
      • 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 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​(org.apache.metamodel.schema.TableType[] tableTypes)