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.apache.isis.persistence.jdo.spring.exceptions.ObjectRetrievalFailureException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
JdoObjectRetrievalFailureException
public class ObjectRetrievalFailureException extends org.springframework.dao.DataRetrievalFailureException
Exception thrown if a mapped object could not be retrieved via its identifier. Provides information about the persistent class and the identifier.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ObjectRetrievalFailureException(Class<?> persistentClass, Object identifier)Create a new ObjectRetrievalFailureException for the given object, with the default "not found" message.ObjectRetrievalFailureException(Class<?> persistentClass, Object identifier, String msg, 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.ObjectRetrievalFailureException(String persistentClassName, Object identifier, String msg, Throwable cause)Create a new ObjectRetrievalFailureException for the given object, with the given explicit message and exception.ObjectRetrievalFailureException(String msg, Throwable cause)Create a general ObjectRetrievalFailureException with the given message, without any information on the affected object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetIdentifier()Return the identifier of the object that was not found.Class<?>getPersistentClass()Return the persistent class of the object that was not found.StringgetPersistentClassName()Return the name of the persistent class of the object that was not found.-
Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getMessage, getMostSpecificCause, getRootCause
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
ObjectRetrievalFailureException
public ObjectRetrievalFailureException(String msg, Throwable cause)
Create a general ObjectRetrievalFailureException with the given message, without any information on the affected object.- Parameters:
msg- the detail messagecause- the source exception
-
ObjectRetrievalFailureException
public ObjectRetrievalFailureException(Class<?> persistentClass, Object identifier)
Create a new ObjectRetrievalFailureException for the given object, with the default "not found" message.- Parameters:
persistentClass- the persistent classidentifier- the ID of the object that should have been retrieved
-
ObjectRetrievalFailureException
public ObjectRetrievalFailureException(Class<?> persistentClass, Object identifier, String msg, Throwable cause)
Create a new ObjectRetrievalFailureException for the given object, with the given explicit message and exception.- Parameters:
persistentClass- the persistent classidentifier- the ID of the object that should have been retrievedmsg- the detail messagecause- the source exception
-
ObjectRetrievalFailureException
public ObjectRetrievalFailureException(String persistentClassName, Object identifier)
Create a new ObjectRetrievalFailureException for the given object, with the default "not found" message.- Parameters:
persistentClassName- the name of the persistent classidentifier- the ID of the object that should have been retrieved
-
ObjectRetrievalFailureException
public ObjectRetrievalFailureException(String persistentClassName, Object identifier, String msg, Throwable cause)
Create a new ObjectRetrievalFailureException for the given object, with the given explicit message and exception.- Parameters:
persistentClassName- the name of the persistent classidentifier- the ID of the object that should have been retrievedmsg- the detail messagecause- the source exception
-
-
Method Detail
-
getPersistentClass
public Class<?> getPersistentClass()
Return the persistent class of the object that was not found. If no Class was specified, this method returns null.
-
getPersistentClassName
public String getPersistentClassName()
Return the name of the persistent class of the object that was not found. Will work for both Class objects and String names.
-
getIdentifier
public Object getIdentifier()
Return the identifier of the object that was not found.
-
-