com.mockrunner.mock.jdbc
Class MockArray

java.lang.Object
  extended by com.mockrunner.mock.jdbc.MockArray
All Implemented Interfaces:
java.lang.Cloneable, java.sql.Array

public class MockArray
extends java.lang.Object
implements java.sql.Array, java.lang.Cloneable

Mock implementation of Array.


Constructor Summary
MockArray(java.lang.Object array)
           
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object obj)
           
 void free()
           
 java.lang.Object getArray()
           
 java.lang.Object getArray(long index, int count)
           
 java.lang.Object getArray(long index, int count, java.util.Map map)
           
 java.lang.Object getArray(java.util.Map map)
           
 int getBaseType()
           
 java.lang.String getBaseTypeName()
           
 java.sql.ResultSet getResultSet()
           
 java.sql.ResultSet getResultSet(long index, int count)
           
 java.sql.ResultSet getResultSet(long index, int count, java.util.Map map)
           
 java.sql.ResultSet getResultSet(java.util.Map map)
           
 int hashCode()
           
 void setBaseType(int baseType)
          Sets the base type.
 void setBaseTypeName(java.lang.String sqlTypeName)
          Sets the base type name.
 java.lang.String toString()
           
 boolean wasFreeCalled()
          Returns if free() has been called.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MockArray

public MockArray(java.lang.Object array)
Method Detail

setBaseType

public void setBaseType(int baseType)
Sets the base type.

Parameters:
baseType - the base type

setBaseTypeName

public void setBaseTypeName(java.lang.String sqlTypeName)
Sets the base type name.

Parameters:
sqlTypeName - the base type name

getBaseType

public int getBaseType()
                throws java.sql.SQLException
Specified by:
getBaseType in interface java.sql.Array
Throws:
java.sql.SQLException

getBaseTypeName

public java.lang.String getBaseTypeName()
                                 throws java.sql.SQLException
Specified by:
getBaseTypeName in interface java.sql.Array
Throws:
java.sql.SQLException

getArray

public java.lang.Object getArray()
                          throws java.sql.SQLException
Specified by:
getArray in interface java.sql.Array
Throws:
java.sql.SQLException

getArray

public java.lang.Object getArray(java.util.Map map)
                          throws java.sql.SQLException
Specified by:
getArray in interface java.sql.Array
Throws:
java.sql.SQLException

getArray

public java.lang.Object getArray(long index,
                                 int count)
                          throws java.sql.SQLException
Specified by:
getArray in interface java.sql.Array
Throws:
java.sql.SQLException

getArray

public java.lang.Object getArray(long index,
                                 int count,
                                 java.util.Map map)
                          throws java.sql.SQLException
Specified by:
getArray in interface java.sql.Array
Throws:
java.sql.SQLException

getResultSet

public java.sql.ResultSet getResultSet()
                                throws java.sql.SQLException
Specified by:
getResultSet in interface java.sql.Array
Throws:
java.sql.SQLException

getResultSet

public java.sql.ResultSet getResultSet(long index,
                                       int count)
                                throws java.sql.SQLException
Specified by:
getResultSet in interface java.sql.Array
Throws:
java.sql.SQLException

getResultSet

public java.sql.ResultSet getResultSet(long index,
                                       int count,
                                       java.util.Map map)
                                throws java.sql.SQLException
Specified by:
getResultSet in interface java.sql.Array
Throws:
java.sql.SQLException

getResultSet

public java.sql.ResultSet getResultSet(java.util.Map map)
                                throws java.sql.SQLException
Specified by:
getResultSet in interface java.sql.Array
Throws:
java.sql.SQLException

free

public void free()
          throws java.sql.SQLException
Specified by:
free in interface java.sql.Array
Throws:
java.sql.SQLException

wasFreeCalled

public boolean wasFreeCalled()
Returns if free() has been called.

Returns:
true if free() has been called, false otherwise

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

clone

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