com.mockrunner.mock.jdbc
Class MockResultSetMetaData

java.lang.Object
  extended by com.mockrunner.mock.jdbc.MockResultSetMetaData
All Implemented Interfaces:
java.lang.Cloneable, java.sql.ResultSetMetaData, java.sql.Wrapper

public class MockResultSetMetaData
extends java.lang.Object
implements java.sql.ResultSetMetaData, java.lang.Cloneable

Mock implementation of ResultSetMetaData.


Field Summary
 
Fields inherited from interface java.sql.ResultSetMetaData
columnNoNulls, columnNullable, columnNullableUnknown
 
Constructor Summary
MockResultSetMetaData()
           
 
Method Summary
 java.lang.Object clone()
           
 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 column)
           
 boolean isSearchable(int column)
           
 boolean isSigned(int column)
           
 boolean isWrapperFor(java.lang.Class iface)
           
 boolean isWritable(int column)
           
 void setAutoIncrement(int column, boolean autoIncrement)
           
 void setCaseSensitive(int column, boolean caseSensitive)
           
 void setCatalogName(int column, java.lang.String catalogName)
           
 void setColumnClassName(int column, java.lang.String columnClassName)
           
 void setColumnCount(int columnCount)
           
 void setColumnDisplaySize(int column, int displaySize)
           
 void setColumnLabel(int column, java.lang.String columnLabel)
           
 void setColumnName(int column, java.lang.String columnName)
           
 void setColumnType(int column, int columnType)
           
 void setColumnTypeName(int column, java.lang.String columnTypeName)
           
 void setCurrency(int column, boolean currency)
           
 void setDefinitelyWritable(int column, boolean definitelyWritable)
           
 void setNullable(int column, int nullable)
           
 void setPrecision(int column, int precision)
           
 void setReadOnly(int column, boolean readOnly)
           
 void setScale(int column, int scale)
           
 void setSchemaName(int column, java.lang.String schemaName)
           
 void setSearchable(int column, boolean searchable)
           
 void setSigned(int column, boolean signed)
           
 void setTableName(int column, java.lang.String tableName)
           
 void setWritable(int column, boolean writable)
           
 java.lang.Object unwrap(java.lang.Class iface)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockResultSetMetaData

public MockResultSetMetaData()
Method Detail

setColumnCount

public void setColumnCount(int columnCount)

setColumnDisplaySize

public void setColumnDisplaySize(int column,
                                 int displaySize)

setColumnType

public void setColumnType(int column,
                          int columnType)

setPrecision

public void setPrecision(int column,
                         int precision)

setScale

public void setScale(int column,
                     int scale)

setNullable

public void setNullable(int column,
                        int nullable)

setAutoIncrement

public void setAutoIncrement(int column,
                             boolean autoIncrement)

setCaseSensitive

public void setCaseSensitive(int column,
                             boolean caseSensitive)

setCurrency

public void setCurrency(int column,
                        boolean currency)

setDefinitelyWritable

public void setDefinitelyWritable(int column,
                                  boolean definitelyWritable)

setReadOnly

public void setReadOnly(int column,
                        boolean readOnly)

setSearchable

public void setSearchable(int column,
                          boolean searchable)

setSigned

public void setSigned(int column,
                      boolean signed)

setWritable

public void setWritable(int column,
                        boolean writable)

setCatalogName

public void setCatalogName(int column,
                           java.lang.String catalogName)

setColumnClassName

public void setColumnClassName(int column,
                               java.lang.String columnClassName)

setColumnLabel

public void setColumnLabel(int column,
                           java.lang.String columnLabel)

setColumnName

public void setColumnName(int column,
                          java.lang.String columnName)

setColumnTypeName

public void setColumnTypeName(int column,
                              java.lang.String columnTypeName)

setSchemaName

public void setSchemaName(int column,
                          java.lang.String schemaName)

setTableName

public void setTableName(int column,
                         java.lang.String tableName)

getColumnCount

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

getColumnDisplaySize

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

getColumnType

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

getPrecision

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

getScale

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

isNullable

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

isAutoIncrement

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

isCaseSensitive

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

isCurrency

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

isDefinitelyWritable

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

isReadOnly

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

isSearchable

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

isSigned

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

isWritable

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

getCatalogName

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

getColumnClassName

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

getColumnLabel

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

getColumnName

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

getColumnTypeName

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

getSchemaName

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

getTableName

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

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

isWrapperFor

public boolean isWrapperFor(java.lang.Class iface)
                     throws java.sql.SQLException
Specified by:
isWrapperFor in interface java.sql.Wrapper
Throws:
java.sql.SQLException

unwrap

public java.lang.Object unwrap(java.lang.Class iface)
                        throws java.sql.SQLException
Specified by:
unwrap in interface java.sql.Wrapper
Throws:
java.sql.SQLException