站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.0.5 API 文档英文版

IncorrectResultSizeDataAccessException (Spring Framework API 2.0) - Spring Framework 2.0.5 API 文档英文版

The Spring Framework

org.springframework.dao
Class IncorrectResultSizeDataAccessException

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.dao.IncorrectResultSizeDataAccessException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
EmptyResultDataAccessException

public class IncorrectResultSizeDataAccessException
extends DataRetrievalFailureException

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:
EmptyResultDataAccessException, Serialized Form

Constructor Summary
IncorrectResultSizeDataAccessException(int expectedSize)
          Constructor for IncorrectResultSizeDataAccessException.
IncorrectResultSizeDataAccessException(int expectedSize, int actualSize)
          Constructor for IncorrectResultSizeDataAccessException.
IncorrectResultSizeDataAccessException(String msg, int expectedSize)
          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, getMostSpecificCause, 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

IncorrectResultSizeDataAccessException

public IncorrectResultSizeDataAccessException(int expectedSize)
Constructor for IncorrectResultSizeDataAccessException.

Parameters:
expectedSize - the expected result size

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)
Constructor for IncorrectResultSizeDataAccessException.

Parameters:
msg - the detail message
expectedSize - the expected result size

IncorrectResultSizeDataAccessException

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

Parameters:
msg - the detail 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).


The Spring Framework

Copyright © 2002-2007 The Spring Framework.