|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.dao.support.DataAccessUtils
Miscellaneous utility methods for DAO implementations. Useful with any data access technology.
Constructor Summary | |
DataAccessUtils()
|
Method Summary | |
static int |
intResult(Collection results)
Return a unique int result from the given Collection. |
static long |
longResult(Collection results)
Return a unique long result from the given Collection. |
static Object |
objectResult(Collection results,
Class requiredType)
Return a unique result object from the given Collection. |
static Object |
requiredUniqueResult(Collection results)
Return a unique result object from the given Collection. |
static Object |
uniqueResult(Collection results)
Return a unique result object from the given Collection. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DataAccessUtils()
Method Detail |
public static Object uniqueResult(Collection results) throws IncorrectResultSizeDataAccessException
results
- the result Collection
IncorrectResultSizeDataAccessException
- if more than one
result object has been found in the given Collectionpublic static Object requiredUniqueResult(Collection results) throws IncorrectResultSizeDataAccessException
results
- the result Collection
IncorrectResultSizeDataAccessException
- if more than one
result object or none at all has been found in the given Collectionpublic static Object objectResult(Collection results, Class requiredType) throws IncorrectResultSizeDataAccessException, TypeMismatchDataAccessException
results
- the result Collection
IncorrectResultSizeDataAccessException
- if more than one
result object or none at all has been found in the given Collection
TypeMismatchDataAccessException
- if the unique object does
not match the specified required typepublic static int intResult(Collection results) throws IncorrectResultSizeDataAccessException, TypeMismatchDataAccessException
results
- the result Collection
IncorrectResultSizeDataAccessException
- if more than one
result object or none at all has been found in the given Collection
TypeMismatchDataAccessException
- if the unique object
in the collection is not convertable to an intpublic static long longResult(Collection results) throws IncorrectResultSizeDataAccessException, TypeMismatchDataAccessException
results
- the result Collection
IncorrectResultSizeDataAccessException
- if more than one
result object or none at all has been found in the given Collection
TypeMismatchDataAccessException
- if the unique object
in the collection is not convertable to a long
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |