uk.org.ogsadai.converters.webrowset.metadata
Class ColumnMetaData

java.lang.Object
  |
  +--uk.org.ogsadai.converters.webrowset.metadata.ColumnMetaData
All Implemented Interfaces:
java.sql.ResultSetMetaData

public class ColumnMetaData
extends java.lang.Object
implements java.sql.ResultSetMetaData

Handler for java.sql.ResultSet metadata, in particular that relating to the columns of a relational table.

The metadata is stored in a MetaDataContainer.

Author:
The OGSA-DAI Team.

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
           
private  int mColumnCount
           
private  MetaDataContainer[] mMetaData
           
 
Fields inherited from interface java.sql.ResultSetMetaData
columnNoNulls, columnNullable, columnNullableUnknown
 
Constructor Summary
ColumnMetaData()
           
 
Method Summary
 java.lang.String getCatalogName(int column)
           
 java.lang.String getColumnClassName(int column)
           
 int getColumnCount()
           
 int getColumnDisplaySize(int column)
           
 java.lang.String getColumnLabel(int column)
           
 java.lang.String getColumnName(int column)
           
 int getColumnType(int column)
           
 java.lang.String getColumnTypeName(int column)
           
 int getPrecision(int column)
           
 int getScale(int column)
           
 java.lang.String getSchemaName(int column)
           
 java.lang.String getTableName(int column)
           
 boolean isAutoIncrement(int column)
           
 boolean isCaseSensitive(int column)
           
 boolean isCurrency(int column)
           
 boolean isDefinitelyWritable(int column)
           
 int isNullable(int column)
           
 boolean isReadOnly(int arg0)
           
 boolean isSearchable(int column)
           
 boolean isSigned(int column)
           
 boolean isWritable(int column)
           
 void setColumnCount(int count)
          Set the number of columns in the table.
 void storeData(int column, java.lang.String name, java.lang.String value)
          Store the metadata for a given column.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
See Also:
Constant Field Values

mColumnCount

private int mColumnCount

mMetaData

private MetaDataContainer[] mMetaData
Constructor Detail

ColumnMetaData

public ColumnMetaData()
Method Detail

setColumnCount

public void setColumnCount(int count)
Set the number of columns in the table.

Parameters:
count - Number of columns.

storeData

public void storeData(int column,
                      java.lang.String name,
                      java.lang.String value)
Store the metadata for a given column.

Parameters:
column - Column number.
name - Metadata element name.
value - Metadata element value.
Throws:
java.lang.IllegalArgumentException - if the name of the expected metadata is not equal in value that being given (as determined by name).
java.lang.IllegalStateException - if there is there is no more metadata expected for column.

getColumnCount

public int getColumnCount()
                   throws java.sql.SQLException
Specified by:
getColumnCount in interface java.sql.ResultSetMetaData
java.sql.SQLException

getColumnDisplaySize

public int getColumnDisplaySize(int column)
                         throws java.sql.SQLException
Specified by:
getColumnDisplaySize in interface java.sql.ResultSetMetaData
java.sql.SQLException

getColumnType

public int getColumnType(int column)
                  throws java.sql.SQLException
Specified by:
getColumnType in interface java.sql.ResultSetMetaData
java.sql.SQLException

getPrecision

public int getPrecision(int column)
                 throws java.sql.SQLException
Specified by:
getPrecision in interface java.sql.ResultSetMetaData
java.sql.SQLException

getScale

public int getScale(int column)
             throws java.sql.SQLException
Specified by:
getScale in interface java.sql.ResultSetMetaData
java.sql.SQLException

isNullable

public int isNullable(int column)
               throws java.sql.SQLException
Specified by:
isNullable in interface java.sql.ResultSetMetaData
java.sql.SQLException

isAutoIncrement

public boolean isAutoIncrement(int column)
                        throws java.sql.SQLException
Specified by:
isAutoIncrement in interface java.sql.ResultSetMetaData
java.sql.SQLException

isCaseSensitive

public boolean isCaseSensitive(int column)
                        throws java.sql.SQLException
Specified by:
isCaseSensitive in interface java.sql.ResultSetMetaData
java.sql.SQLException

isCurrency

public boolean isCurrency(int column)
                   throws java.sql.SQLException
Specified by:
isCurrency in interface java.sql.ResultSetMetaData
java.sql.SQLException

isDefinitelyWritable

public boolean isDefinitelyWritable(int column)
                             throws java.sql.SQLException
Specified by:
isDefinitelyWritable in interface java.sql.ResultSetMetaData
java.sql.SQLException

isReadOnly

public boolean isReadOnly(int arg0)
                   throws java.sql.SQLException
Specified by:
isReadOnly in interface java.sql.ResultSetMetaData
java.sql.SQLException

isSearchable

public boolean isSearchable(int column)
                     throws java.sql.SQLException
Specified by:
isSearchable in interface java.sql.ResultSetMetaData
java.sql.SQLException

isSigned

public boolean isSigned(int column)
                 throws java.sql.SQLException
Specified by:
isSigned in interface java.sql.ResultSetMetaData
java.sql.SQLException

isWritable

public boolean isWritable(int column)
                   throws java.sql.SQLException
Specified by:
isWritable in interface java.sql.ResultSetMetaData
java.sql.SQLException

getCatalogName

public java.lang.String getCatalogName(int column)
                                throws java.sql.SQLException
Specified by:
getCatalogName in interface java.sql.ResultSetMetaData
java.sql.SQLException

getColumnClassName

public java.lang.String getColumnClassName(int column)
                                    throws java.sql.SQLException
Specified by:
getColumnClassName in interface java.sql.ResultSetMetaData
java.sql.SQLException

getColumnLabel

public java.lang.String getColumnLabel(int column)
                                throws java.sql.SQLException
Specified by:
getColumnLabel in interface java.sql.ResultSetMetaData
java.sql.SQLException

getColumnName

public java.lang.String getColumnName(int column)
                               throws java.sql.SQLException
Specified by:
getColumnName in interface java.sql.ResultSetMetaData
java.sql.SQLException

getColumnTypeName

public java.lang.String getColumnTypeName(int column)
                                   throws java.sql.SQLException
Specified by:
getColumnTypeName in interface java.sql.ResultSetMetaData
java.sql.SQLException

getSchemaName

public java.lang.String getSchemaName(int column)
                               throws java.sql.SQLException
Specified by:
getSchemaName in interface java.sql.ResultSetMetaData
java.sql.SQLException

getTableName

public java.lang.String getTableName(int column)
                              throws java.sql.SQLException
Specified by:
getTableName in interface java.sql.ResultSetMetaData
java.sql.SQLException