|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ricebridge.xmlman.in.XmlResultSetMetaData
Implementation of ResultSetMetaData to present headers from XML data (if defined).
This ResultSetMetaData implementation provides much the same interface as a normal ResultSetMetaData.
It assumes that the first data record from XML file specifies the column headers, which are
are returned by getColumnName(int).
Apart from methods relating to column names, all other methods return default values which assume
that all data is in the form of Strings.
The Source Code of this Java class is available under a BSD-style license.
| Field Summary | |
protected int |
iColumnCount
Number of columns of data. |
protected HashMap |
iColumnMap
Map from column name to index. |
protected String[] |
iColumnName
Column names |
| Fields inherited from interface java.sql.ResultSetMetaData |
columnNoNulls, columnNullable, columnNullableUnknown |
| Constructor Summary | |
XmlResultSetMetaData(String[] pFieldNames)
Initialised with a List of String[] containing column field names. |
|
| Method Summary | |
int |
findColumn(String pColumnName)
Find the index (starting at one, not zero) of a named column. |
String |
getCatalogName(int pColumn)
|
String |
getColumnClassName(int pColumn)
|
int |
getColumnCount()
Get the number of columns. |
int |
getColumnDisplaySize(int pColumn)
|
String |
getColumnLabel(int pColumn)
Get the name of a column. |
String |
getColumnName(int pColumn)
Get the name of a column. |
int |
getColumnType(int pColumn)
|
String |
getColumnTypeName(int pColumn)
|
int |
getPrecision(int pColumn)
|
int |
getScale(int pColumn)
|
String |
getSchemaName(int pColumn)
|
String |
getTableName(int pColumn)
|
boolean |
isAutoIncrement(int pColumn)
|
boolean |
isCaseSensitive(int pColumn)
|
boolean |
isCurrency(int pColumn)
|
boolean |
isDefinitelyWritable(int pColumn)
|
int |
isNullable(int pColumn)
|
boolean |
isReadOnly(int pColumn)
|
boolean |
isSearchable(int pColumn)
|
boolean |
isSigned(int pColumn)
|
boolean |
isWritable(int pColumn)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int iColumnCount
protected String[] iColumnName
protected HashMap iColumnMap
| Constructor Detail |
public XmlResultSetMetaData(String[] pFieldNames)
List of String[] containing column field names.
pFieldNames - header names| Method Detail |
public int findColumn(String pColumnName)
pColumnName - name of column
public int getColumnCount()
throws SQLException
getColumnCount in interface ResultSetMetaDataSQLException
public String getColumnLabel(int pColumn)
throws SQLException
getColumnLabel in interface ResultSetMetaDatapColumn - index of column (from one, not zero)
SQLException
public String getColumnName(int pColumn)
throws SQLException
getColumnName in interface ResultSetMetaDatapColumn - index of column (from one, not zero)
SQLException
public boolean isAutoIncrement(int pColumn)
throws SQLException
isAutoIncrement in interface ResultSetMetaDataSQLException
public boolean isCaseSensitive(int pColumn)
throws SQLException
isCaseSensitive in interface ResultSetMetaDataSQLException
public boolean isSearchable(int pColumn)
throws SQLException
isSearchable in interface ResultSetMetaDataSQLException
public boolean isCurrency(int pColumn)
throws SQLException
isCurrency in interface ResultSetMetaDataSQLException
public int isNullable(int pColumn)
throws SQLException
isNullable in interface ResultSetMetaDataSQLException
public boolean isSigned(int pColumn)
throws SQLException
isSigned in interface ResultSetMetaDataSQLException
public int getColumnDisplaySize(int pColumn)
throws SQLException
getColumnDisplaySize in interface ResultSetMetaDataSQLException
public String getSchemaName(int pColumn)
throws SQLException
getSchemaName in interface ResultSetMetaDataSQLException
public int getPrecision(int pColumn)
throws SQLException
getPrecision in interface ResultSetMetaDataSQLException
public int getScale(int pColumn)
throws SQLException
getScale in interface ResultSetMetaDataSQLException
public String getTableName(int pColumn)
throws SQLException
getTableName in interface ResultSetMetaDataSQLException
public String getCatalogName(int pColumn)
throws SQLException
getCatalogName in interface ResultSetMetaDataSQLException
public int getColumnType(int pColumn)
throws SQLException
getColumnType in interface ResultSetMetaDataSQLException
public String getColumnTypeName(int pColumn)
throws SQLException
getColumnTypeName in interface ResultSetMetaDataSQLException
public boolean isReadOnly(int pColumn)
throws SQLException
isReadOnly in interface ResultSetMetaDataSQLException
public boolean isWritable(int pColumn)
throws SQLException
isWritable in interface ResultSetMetaDataSQLException
public boolean isDefinitelyWritable(int pColumn)
throws SQLException
isDefinitelyWritable in interface ResultSetMetaDataSQLException
public String getColumnClassName(int pColumn)
throws SQLException
getColumnClassName in interface ResultSetMetaDataSQLException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||