Top Description Fields Constructors Methods
org.springframework.dao

public Class IncorrectResultSizeDataAccessException

extends DataRetrievalFailureException
Class Inheritance
Known Direct Subclasses
org.springframework.dao.EmptyResultDataAccessException
Annotations
@SuppressWarnings:serial

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.
Authors
Juergen Hoeller, Chris Beams
Since
1.0.2
See Also
EmptyResultDataAccessException

Field Summary

Modifier and TypeField and Description
private final int
private final int

Constructor Summary

AccessConstructor and Description
public
IncorrectResultSizeDataAccessException(int
the expected result size
expectedSize
)

Constructor for IncorrectResultSizeDataAccessException.

public
IncorrectResultSizeDataAccessException(int
the expected result size
expectedSize
,
int
the actual result size (or -1 if unknown)
actualSize
)

Constructor for IncorrectResultSizeDataAccessException.

public
IncorrectResultSizeDataAccessException(String
the detail message
msg
,
int
the expected result size
expectedSize
)

Constructor for IncorrectResultSizeDataAccessException.

public
IncorrectResultSizeDataAccessException(String
the detail message
msg
,
int
the expected result size
expectedSize
,
Throwable
the wrapped exception
ex
)

Constructor for IncorrectResultSizeDataAccessException.

public
IncorrectResultSizeDataAccessException(String
the detail message
msg
,
int
the expected result size
expectedSize
,
int
the actual result size (or -1 if unknown)
actualSize
)

Constructor for IncorrectResultSizeDataAccessException.

public
IncorrectResultSizeDataAccessException(String
the detail message
msg
,
int
the expected result size
expectedSize
,
int
the actual result size (or -1 if unknown)
actualSize
,
Throwable
the wrapped exception
ex
)

Constructor for IncorrectResultSizeDataAccessException.

Method Summary

Modifier and TypeMethod and Description
public int
getActualSize()

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

public int
getExpectedSize()

Return the expected result size.

Field Detail

actualSizeback to summary
private final int actualSize
expectedSizeback to summary
private final int expectedSize

Constructor Detail

IncorrectResultSizeDataAccessExceptionback to summary
public IncorrectResultSizeDataAccessException(int expectedSize)

Constructor for IncorrectResultSizeDataAccessException.

Parameters
expectedSize:int

the expected result size

IncorrectResultSizeDataAccessExceptionback to summary
public IncorrectResultSizeDataAccessException(int expectedSize, int actualSize)

Constructor for IncorrectResultSizeDataAccessException.

Parameters
expectedSize:int

the expected result size

actualSize:int

the actual result size (or -1 if unknown)

IncorrectResultSizeDataAccessExceptionback to summary
public IncorrectResultSizeDataAccessException(String msg, int expectedSize)

Constructor for IncorrectResultSizeDataAccessException.

Parameters
msg:String

the detail message

expectedSize:int

the expected result size

IncorrectResultSizeDataAccessExceptionback to summary
public IncorrectResultSizeDataAccessException(String msg, int expectedSize, Throwable ex)

Constructor for IncorrectResultSizeDataAccessException.

Parameters
msg:String

the detail message

expectedSize:int

the expected result size

ex:Throwable

the wrapped exception

IncorrectResultSizeDataAccessExceptionback to summary
public IncorrectResultSizeDataAccessException(String msg, int expectedSize, int actualSize)

Constructor for IncorrectResultSizeDataAccessException.

Parameters
msg:String

the detail message

expectedSize:int

the expected result size

actualSize:int

the actual result size (or -1 if unknown)

IncorrectResultSizeDataAccessExceptionback to summary
public IncorrectResultSizeDataAccessException(String msg, int expectedSize, int actualSize, Throwable ex)

Constructor for IncorrectResultSizeDataAccessException.

Parameters
msg:String

the detail message

expectedSize:int

the expected result size

actualSize:int

the actual result size (or -1 if unknown)

ex:Throwable

the wrapped exception

Method Detail

getActualSizeback to summary
public int getActualSize()

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

getExpectedSizeback to summary
public int getExpectedSize()

Return the expected result size.