The Spring Framework

org.springframework.jdbc
Class IncorrectResultSetColumnCountException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.springframework.core.NestedRuntimeException
                  extended by org.springframework.dao.DataAccessException
                      extended by org.springframework.dao.DataRetrievalFailureException
                          extended by org.springframework.jdbc.IncorrectResultSetColumnCountException
All Implemented Interfaces:
Serializable

public class IncorrectResultSetColumnCountException
extends DataRetrievalFailureException

Data access exception thrown when a result set did not have the correct column count, for example when expecting a single column but getting 0 or more than 1 columns.

Since:
2.0
Author:
Juergen Hoeller
See Also:
IncorrectResultSizeDataAccessException, Serialized Form

Constructor Summary
IncorrectResultSetColumnCountException(int expectedCount, int actualCount)
          Constructor for IncorrectResultSetColumnCountException.
IncorrectResultSetColumnCountException(String msg, int expectedCount, int actualCount)
          Constructor for IncorrectResultCountDataAccessException.
 
Method Summary
 int getActualCount()
          Return the actual column count.
 int getExpectedCount()
          Return the expected column count.
 
Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getCause, getMessage, getRootCause, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IncorrectResultSetColumnCountException

public IncorrectResultSetColumnCountException(int expectedCount,
                                              int actualCount)
Constructor for IncorrectResultSetColumnCountException.

Parameters:
expectedCount - the expected column count
actualCount - the actual column count

IncorrectResultSetColumnCountException

public IncorrectResultSetColumnCountException(String msg,
                                              int expectedCount,
                                              int actualCount)
Constructor for IncorrectResultCountDataAccessException.

Parameters:
msg - the detail message
expectedCount - the expected column count
actualCount - the actual column count
Method Detail

getExpectedCount

public int getExpectedCount()
Return the expected column count.


getActualCount

public int getActualCount()
Return the actual column count.


The Spring Framework

Copyright © 2002-2006 The Spring Framework.