org.springframework.dao
Class IncorrectResultSizeDataAccessException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byorg.springframework.core.NestedRuntimeException
                  extended byorg.springframework.dao.DataAccessException
                      extended byorg.springframework.dao.InvalidDataAccessApiUsageException
                          extended byorg.springframework.dao.IncorrectResultSizeDataAccessException
All Implemented Interfaces:
Serializable

public class IncorrectResultSizeDataAccessException
extends InvalidDataAccessApiUsageException

Data access exception thrown when a result was not of the expected size, for example when expecting a single row but getting 0 or more than 1 rows.

Since:
1.0.2
Author:
Juergen Hoeller
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.lang.RuntimeException
 
Constructor Summary
IncorrectResultSizeDataAccessException(int expectedSize, int actualSize)
          Constructor for IncorrectResultSizeDataAccessException.
IncorrectResultSizeDataAccessException(String msg, int expectedSize, int actualSize)
          Constructor for IncorrectResultSizeDataAccessException.
 
Method Summary
 int getActualSize()
          Return the actual result size (or -1 if unknown).
 int getExpectedSize()
          Return the expected result size.
 
Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getCause, getMessage, 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

IncorrectResultSizeDataAccessException

public IncorrectResultSizeDataAccessException(int expectedSize,
                                              int actualSize)
Constructor for IncorrectResultSizeDataAccessException.

Parameters:
expectedSize - the expected result size
actualSize - the actual result size (or -1 if unknown)

IncorrectResultSizeDataAccessException

public IncorrectResultSizeDataAccessException(String msg,
                                              int expectedSize,
                                              int actualSize)
Constructor for IncorrectResultSizeDataAccessException.

Parameters:
msg - message
expectedSize - the expected result size
actualSize - the actual result size (or -1 if unknown)
Method Detail

getExpectedSize

public int getExpectedSize()
Return the expected result size.


getActualSize

public int getActualSize()
Return the actual result size (or -1 if unknown).



Copyright (C) 2003-2004 The Spring Framework Project.