Class ObjectRetrievalFailureException
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.orm.ObjectRetrievalFailureException
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- JpaObjectRetrievalFailureException
Exception thrown if a mapped object could not be retrieved via its identifier.
Provides information about the persistent class and the identifier.
- Since:
- 13.10.2003
- Author:
- Juergen Hoeller
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionObjectRetrievalFailureException(@Nullable String msg, Throwable cause) Create a general ObjectRetrievalFailureException with the given message, without any information on the affected object.ObjectRetrievalFailureException(Class<?> persistentClass, @Nullable Object identifier, String msg, @Nullable Throwable cause) Create a new ObjectRetrievalFailureException for the given object, with the given explicit message and exception.ObjectRetrievalFailureException(Class<?> persistentClass, Object identifier) Create a new ObjectRetrievalFailureException for the given object, with the default "not found" message.ObjectRetrievalFailureException(String persistentClassName, @Nullable Object identifier, @Nullable String msg, @Nullable Throwable cause) Create a new ObjectRetrievalFailureException for the given object, with the given explicit message and exception.ObjectRetrievalFailureException(String persistentClassName, Object identifier) Create a new ObjectRetrievalFailureException for the given object, with the default "not found" message.
- 
Method SummaryModifier and TypeMethodDescriptionReturn the identifier of the object that was not found.Return the persistent class of the object that was not found.Return the name of the persistent class of the object that was not found.Methods inherited from class NestedRuntimeExceptioncontains, getMostSpecificCause, getRootCauseMethods inherited from class ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
- 
Constructor Details- 
ObjectRetrievalFailureException
- 
ObjectRetrievalFailureExceptionCreate a new ObjectRetrievalFailureException for the given object, with the default "not found" message.- Parameters:
- persistentClass- the persistent class
- identifier- the ID of the object that should have been retrieved
 
- 
ObjectRetrievalFailureExceptionpublic ObjectRetrievalFailureException(Class<?> persistentClass, @Nullable Object identifier, String msg, @Nullable Throwable cause) Create a new ObjectRetrievalFailureException for the given object, with the given explicit message and exception.- Parameters:
- persistentClass- the persistent class
- identifier- the ID of the object that should have been retrieved
- msg- the detail message
- cause- the source exception
 
- 
ObjectRetrievalFailureExceptionCreate a new ObjectRetrievalFailureException for the given object, with the default "not found" message.- Parameters:
- persistentClassName- the name of the persistent class
- identifier- the ID of the object that should have been retrieved
 
- 
ObjectRetrievalFailureExceptionpublic ObjectRetrievalFailureException(String persistentClassName, @Nullable Object identifier, @Nullable String msg, @Nullable Throwable cause) Create a new ObjectRetrievalFailureException for the given object, with the given explicit message and exception.- Parameters:
- persistentClassName- the name of the persistent class
- identifier- the ID of the object that should have been retrieved
- msg- the detail message
- cause- the source exception
 
 
- 
- 
Method Details- 
getPersistentClass
- 
getPersistentClassName
- 
getIdentifier
 
-