类 IncorrectResultSizeDataAccessException
- java.lang.Object
- java.lang.Throwable
- java.lang.Exception
- java.lang.RuntimeException
- org.springframework.core.NestedRuntimeException
- org.springframework.dao.DataAccessException
- org.springframework.dao.NonTransientDataAccessException
- org.springframework.dao.DataRetrievalFailureException
- org.springframework.dao.IncorrectResultSizeDataAccessException
- 所有已实现的接口:
Serializable
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.- 从以下版本开始:
- 1.0.2
- 作者:
- Juergen Hoeller, Chris Beams
- 另请参阅:
EmptyResultDataAccessException
, 序列化表格
构造器概要
构造器 构造器 说明 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.IncorrectResultSizeDataAccessException(String msg, int expectedSize, int actualSize, Throwable ex)
Constructor for IncorrectResultSizeDataAccessException.IncorrectResultSizeDataAccessException(String msg, int expectedSize, Throwable ex)
Constructor for IncorrectResultSizeDataAccessException.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 int
getActualSize()
Return the actual result size (or -1 if unknown).int
getExpectedSize()
Return the expected result size.从类继承的方法 org.springframework.core.NestedRuntimeException
contains, getMessage, getMostSpecificCause, getRootCause
构造器详细资料
IncorrectResultSizeDataAccessException
public IncorrectResultSizeDataAccessException(int expectedSize)
Constructor for IncorrectResultSizeDataAccessException.- 参数:
expectedSize
- the expected result size
IncorrectResultSizeDataAccessException
public IncorrectResultSizeDataAccessException(int expectedSize, int actualSize)
Constructor for IncorrectResultSizeDataAccessException.- 参数:
expectedSize
- the expected result sizeactualSize
- the actual result size (or -1 if unknown)
IncorrectResultSizeDataAccessException
public IncorrectResultSizeDataAccessException(String msg, int expectedSize)
Constructor for IncorrectResultSizeDataAccessException.- 参数:
msg
- the detail messageexpectedSize
- the expected result size
IncorrectResultSizeDataAccessException
public IncorrectResultSizeDataAccessException(String msg, int expectedSize, Throwable ex)
Constructor for IncorrectResultSizeDataAccessException.- 参数:
msg
- the detail messageexpectedSize
- the expected result sizeex
- the wrapped exception
IncorrectResultSizeDataAccessException
public IncorrectResultSizeDataAccessException(String msg, int expectedSize, int actualSize)
Constructor for IncorrectResultSizeDataAccessException.- 参数:
msg
- the detail messageexpectedSize
- the expected result sizeactualSize
- the actual result size (or -1 if unknown)
IncorrectResultSizeDataAccessException
public IncorrectResultSizeDataAccessException(String msg, int expectedSize, int actualSize, Throwable ex)
Constructor for IncorrectResultSizeDataAccessException.- 参数:
msg
- the detail messageexpectedSize
- the expected result sizeactualSize
- the actual result size (or -1 if unknown)ex
- the wrapped exception
方法详细资料
getExpectedSize
public int getExpectedSize()
Return the expected result size.
getActualSize
public int getActualSize()
Return the actual result size (or -1 if unknown).