Example usage for org.springframework.jdbc.support.rowset SqlRowSetMetaData getCatalogName

List of usage examples for org.springframework.jdbc.support.rowset SqlRowSetMetaData getCatalogName

Introduction

In this page you can find the example usage for org.springframework.jdbc.support.rowset SqlRowSetMetaData getCatalogName.

Prototype

String getCatalogName(int columnIndex) throws InvalidResultSetAccessException;

Source Link

Document

Retrieve the catalog name of the table that served as the source for the specified column.

Usage

From source file:org.restsql.core.impl.mysql.MySqlSqlResourceMetaData.java

/** Retrieves database-specific table name used in SQL statements. */
@Override/*from  ww w. j a  v a 2 s . c  om*/
protected String getQualifiedTableName(final SqlResourceDefinition definition,
        final SqlRowSetMetaData resultSetMetaData, final int colNumber) {
    return resultSetMetaData.getCatalogName(colNumber) + "." + resultSetMetaData.getTableName(colNumber);
}

From source file:org.restsql.core.impl.AbstractSqlResourceMetaData.java

/**
 * Retrieves database name from result set meta data. Hook method for
 * buildTablesAndColumns() allows database-specific overrides.
 *///  w w w .j av a2s.  co m
protected String getColumnDatabaseName(final SqlResourceDefinition definition,
        final SqlRowSetMetaData resultSetMetaData, final int colNumber) {
    return resultSetMetaData.getCatalogName(colNumber);
}