Class Querier
java.lang.Object
org.conical.common.bbl.db.querier.Querier
- Direct Known Subclasses:
MySqlQuerier
,OracleQuerier
,PostgresQuerier
Abstract class which provides an interface allowing callers to look up table
and column names in a database. Children should implement the parts of this
class that are vendor-specific.
- Author:
- rdoherty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
assignKeyInformation
(Set<ColumnModel> columnSet, String tableName) protected abstract ColumnModel
getColumnsFromTable
(String tableName) Retrieves a set of all the columns in the table with the given nameprotected Connection
protected abstract PreparedStatement
getPsForColumnLookup
(Connection conn, String tableName) Retrieves a set of all readable table names in the database this Querier was configured forprotected abstract String
-
Constructor Details
-
Querier
-
-
Method Details
-
getTableSelectionSql
-
getPsForColumnLookup
protected abstract PreparedStatement getPsForColumnLookup(Connection conn, String tableName) throws SQLException - Throws:
SQLException
-
getColumnModelFromResult
- Throws:
SQLException
-
assignKeyInformation
-
getConnection
- Throws:
SQLException
-
getTableNames
Retrieves a set of all readable table names in the database this Querier was configured for- Returns:
- a set of table names
-
getColumnsFromTable
Retrieves a set of all the columns in the table with the given name- Parameters:
tableName
- name for which to retrieve columns- Returns:
- set of columns
-