|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.mockobjects.MockObject com.mockobjects.sql.CommonMockResultSetMetaData com.mockobjects.sql.MockResultSetMetaData
Minimal implementation of ResultSetMetaData for testing. Supports column count, column names, and column sql types.
Field Summary |
Fields inherited from interface java.sql.ResultSetMetaData |
columnNoNulls, columnNullable, columnNullableUnknown |
Constructor Summary | |
MockResultSetMetaData()
|
Method Summary | |
void |
addExpectedColumnClassNameIndex(int aColumnIndex)
Adds an expectation for a column index to be passed to getColumnClassName |
void |
addExpectedColumnNameIndex(int aColumnIndex)
Adds an expectation for a column index to be passed to getColumnName |
void |
addExpectedColumnTypeIndex(int aColumnIndex)
Adds an expectation for a column index to be passed to getColumnType |
java.lang.String |
getCatalogName(int arg0)
Calls notImplemented. |
java.lang.String |
getColumnClassName(int aColumnIndex)
Returns the column class name. |
int |
getColumnCount()
Returns value passed to setupGetColumnCount. |
int |
getColumnDisplaySize(int arg0)
Calls notImplemented. |
java.lang.String |
getColumnLabel(int arg0)
Calls notImplemented. |
java.lang.String |
getColumnName(int aColumnIndex)
Returns the column name. |
int |
getColumnType(int aColumnIndex)
Returns the column SQL type. |
java.lang.String |
getColumnTypeName(int arg0)
Calls notImplemented. |
int |
getPrecision(int arg0)
Calls notImplemented. |
int |
getScale(int arg0)
Calls notImplemented. |
java.lang.String |
getSchemaName(int arg0)
Calls notImplemented. |
java.lang.String |
getTableName(int arg0)
Calls notImplemented. |
boolean |
isAutoIncrement(int arg0)
Calls notImplemented. |
boolean |
isCaseSensitive(int arg0)
Calls notImplemented. |
boolean |
isCurrency(int arg0)
Calls notImplemented. |
boolean |
isDefinitelyWritable(int arg0)
Calls notImplemented. |
int |
isNullable(int arg0)
Calls notImplemented. |
boolean |
isReadOnly(int arg0)
Calls notImplemented. |
boolean |
isSearchable(int arg0)
Calls notImplemented. |
boolean |
isSigned(int arg0)
Calls notImplemented. |
boolean |
isWritable(int arg0)
Calls notImplemented. |
void |
setupAddColumnClassName(java.lang.String aName)
The next column class name in the resultSet. |
void |
setupAddColumnClassNames(java.lang.String[] allNames)
An array of column class names in the order they appear in the resultSet. |
void |
setupAddColumnName(java.lang.String aName)
The next column name in the resultSet. |
void |
setupAddColumnNames(java.lang.String[] allNames)
An array of column names in the order they appear in the resultSet. |
void |
setupAddColumnType(int aType)
The next column's SQL type in the resultSet as an int. |
void |
setupAddColumnTypes(int[] allTypes)
An array of column SQL types in the order they appear in the resultSet. |
void |
setupGetColumnCount(int aColumnCount)
Value to return from getColumnCount. |
Methods inherited from class com.mockobjects.MockObject |
notImplemented, notYetImplemented, verify |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MockResultSetMetaData()
Method Detail |
public void setupGetColumnCount(int aColumnCount)
public void setupAddColumnNames(java.lang.String[] allNames)
public void setupAddColumnName(java.lang.String aName)
public void setupAddColumnTypes(int[] allTypes)
public void setupAddColumnType(int aType)
public int getColumnCount() throws java.sql.SQLException
getColumnCount
in interface java.sql.ResultSetMetaData
java.sql.SQLException
ResultSetMetaData.getColumnCount()
public java.lang.String getColumnName(int aColumnIndex) throws java.sql.SQLException
getColumnName
in interface java.sql.ResultSetMetaData
java.sql.SQLException
ResultSetMetaData.getColumnName(int)
public void addExpectedColumnNameIndex(int aColumnIndex)
CommonMockResultSetMetaData.getColumnName(int)
public int getColumnType(int aColumnIndex) throws java.sql.SQLException
getColumnType
in interface java.sql.ResultSetMetaData
java.sql.SQLException
ResultSetMetaData.getColumnType(int)
public void addExpectedColumnTypeIndex(int aColumnIndex)
CommonMockResultSetMetaData.getColumnType(int)
public boolean isAutoIncrement(int arg0) throws java.sql.SQLException
isAutoIncrement
in interface java.sql.ResultSetMetaData
java.sql.SQLException
ResultSetMetaData.isAutoIncrement(int)
public boolean isCaseSensitive(int arg0) throws java.sql.SQLException
isCaseSensitive
in interface java.sql.ResultSetMetaData
java.sql.SQLException
ResultSetMetaData.isCaseSensitive(int)
public boolean isSearchable(int arg0) throws java.sql.SQLException
isSearchable
in interface java.sql.ResultSetMetaData
java.sql.SQLException
ResultSetMetaData.isSearchable(int)
public boolean isCurrency(int arg0) throws java.sql.SQLException
isCurrency
in interface java.sql.ResultSetMetaData
java.sql.SQLException
ResultSetMetaData.isCurrency(int)
public int isNullable(int arg0) throws java.sql.SQLException
isNullable
in interface java.sql.ResultSetMetaData
java.sql.SQLException
ResultSetMetaData.isNullable(int)
public boolean isSigned(int arg0) throws java.sql.SQLException
isSigned
in interface java.sql.ResultSetMetaData
java.sql.SQLException
ResultSetMetaData.isSigned(int)
public int getColumnDisplaySize(int arg0) throws java.sql.SQLException
getColumnDisplaySize
in interface java.sql.ResultSetMetaData
java.sql.SQLException
ResultSetMetaData.getColumnDisplaySize(int)
public java.lang.String getColumnLabel(int arg0) throws java.sql.SQLException
getColumnLabel
in interface java.sql.ResultSetMetaData
java.sql.SQLException
ResultSetMetaData.getColumnLabel(int)
public java.lang.String getColumnTypeName(int arg0) throws java.sql.SQLException
getColumnTypeName
in interface java.sql.ResultSetMetaData
java.sql.SQLException
ResultSetMetaData.getColumnTypeName(int)
public java.lang.String getSchemaName(int arg0) throws java.sql.SQLException
getSchemaName
in interface java.sql.ResultSetMetaData
java.sql.SQLException
ResultSetMetaData.getSchemaName(int)
public int getPrecision(int arg0) throws java.sql.SQLException
getPrecision
in interface java.sql.ResultSetMetaData
java.sql.SQLException
ResultSetMetaData.getPrecision(int)
public int getScale(int arg0) throws java.sql.SQLException
getScale
in interface java.sql.ResultSetMetaData
java.sql.SQLException
ResultSetMetaData.getScale(int)
public java.lang.String getTableName(int arg0) throws java.sql.SQLException
getTableName
in interface java.sql.ResultSetMetaData
java.sql.SQLException
ResultSetMetaData.getTableName(int)
public java.lang.String getCatalogName(int arg0) throws java.sql.SQLException
getCatalogName
in interface java.sql.ResultSetMetaData
java.sql.SQLException
ResultSetMetaData.getCatalogName(int)
public boolean isReadOnly(int arg0) throws java.sql.SQLException
isReadOnly
in interface java.sql.ResultSetMetaData
java.sql.SQLException
ResultSetMetaData.isReadOnly(int)
public boolean isWritable(int arg0) throws java.sql.SQLException
isWritable
in interface java.sql.ResultSetMetaData
java.sql.SQLException
ResultSetMetaData.isWritable(int)
public boolean isDefinitelyWritable(int arg0) throws java.sql.SQLException
isDefinitelyWritable
in interface java.sql.ResultSetMetaData
java.sql.SQLException
ResultSetMetaData.isDefinitelyWritable(int)
public void setupAddColumnClassNames(java.lang.String[] allNames)
public void setupAddColumnClassName(java.lang.String aName)
public java.lang.String getColumnClassName(int aColumnIndex) throws java.sql.SQLException
getColumnClassName
in interface java.sql.ResultSetMetaData
java.sql.SQLException
ResultSetMetaData.getColumnClassName(int)
public void addExpectedColumnClassNameIndex(int aColumnIndex)
CommonMockResultSetMetaData.getColumnClassName(int)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |