Top Description Fields Constructors Methods
org.springframework.orm

public Class ObjectRetrievalFailureException

extends DataRetrievalFailureException
Class Inheritance
Known Direct Subclasses
org.springframework.orm.hibernate5.HibernateObjectRetrievalFailureException, org.springframework.orm.jpa.JpaObjectRetrievalFailureException
Annotations
@SuppressWarnings:serial
Imports
org.springframework.dao.DataRetrievalFailureException, org.springframework.lang.Nullable

Exception thrown if a mapped object could not be retrieved via its identifier. Provides information about the persistent class and the identifier.
Author
Juergen Hoeller
Since
13.10.2003

Field Summary

Modifier and TypeField and Description
private final Object
private final Object

Constructor Summary

AccessConstructor and Description
public
ObjectRetrievalFailureException(String
the detail message
msg
,
Throwable
the source exception
cause
)

Create a general ObjectRetrievalFailureException with the given message, without any information on the affected object.

public
ObjectRetrievalFailureException(Class<?>
the persistent class
persistentClass
,
Object
the ID of the object that should have been retrieved
identifier
)

Create a new ObjectRetrievalFailureException for the given object, with the default "not found" message.

public
ObjectRetrievalFailureException(Class<?>
the persistent class
persistentClass
,
Object
the ID of the object that should have been retrieved
identifier
,
String
the detail message
msg
,
Throwable
the source exception
cause
)

Create a new ObjectRetrievalFailureException for the given object, with the given explicit message and exception.

public
ObjectRetrievalFailureException(String
the name of the persistent class
persistentClassName
,
Object
the ID of the object that should have been retrieved
identifier
)

Create a new ObjectRetrievalFailureException for the given object, with the default "not found" message.

public
ObjectRetrievalFailureException(String
the name of the persistent class
persistentClassName
,
Object
the ID of the object that should have been retrieved
identifier
,
String
the detail message
msg
,
Throwable
the source exception
cause
)

Create a new ObjectRetrievalFailureException for the given object, with the given explicit message and exception.

Method Summary

Modifier and TypeMethod and Description
public Object
getIdentifier()

Return the identifier of the object that was not found.

public Class<?>
getPersistentClass()

Return the persistent class of the object that was not found.

public String
getPersistentClassName()

Return the name of the persistent class of the object that was not found.

Field Detail

identifierback to summary
private final Object identifier
Annotations
@Nullable
persistentClassback to summary
private final Object persistentClass
Annotations
@Nullable

Constructor Detail

ObjectRetrievalFailureExceptionback to summary
public ObjectRetrievalFailureException(String msg, Throwable cause)

Create a general ObjectRetrievalFailureException with the given message, without any information on the affected object.

Parameters
msg:String

the detail message

cause:Throwable

the source exception

ObjectRetrievalFailureExceptionback to summary
public ObjectRetrievalFailureException(Class<?> persistentClass, Object identifier)

Create a new ObjectRetrievalFailureException for the given object, with the default "not found" message.

Parameters
persistentClass:Class<?>

the persistent class

identifier:Object

the ID of the object that should have been retrieved

ObjectRetrievalFailureExceptionback to summary
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:Class<?>

the persistent class

identifier:Object

the ID of the object that should have been retrieved

msg:String

the detail message

cause:Throwable

the source exception

ObjectRetrievalFailureExceptionback to summary
public ObjectRetrievalFailureException(String persistentClassName, Object identifier)

Create a new ObjectRetrievalFailureException for the given object, with the default "not found" message.

Parameters
persistentClassName:String

the name of the persistent class

identifier:Object

the ID of the object that should have been retrieved

ObjectRetrievalFailureExceptionback to summary
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:String

the name of the persistent class

identifier:Object

the ID of the object that should have been retrieved

msg:String

the detail message

cause:Throwable

the source exception

Method Detail

getIdentifierback to summary
public Object getIdentifier()

Return the identifier of the object that was not found.

Annotations
@Nullable
getPersistentClassback to summary
public Class<?> getPersistentClass()

Return the persistent class of the object that was not found. If no Class was specified, this method returns null.

Annotations
@Nullable
getPersistentClassNameback to summary
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.

Annotations
@Nullable