Top Description Fields Constructors Methods
org.hibernate

public Class UnresolvableObjectException

extends HibernateException
Class Inheritance
Known Direct Subclasses
org.hibernate.ObjectDeletedException, org.hibernate.ObjectNotFoundException
Imports
java.io.Serializable, org.hibernate.pretty.MessageHelper

Thrown when Hibernate could not resolve an object by id, especially when loading an association.
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private final String
private final Serializable

Constructor Summary

AccessConstructor and Description
public
UnresolvableObjectException(Serializable
The identifier of the entity which could not be resolved
identifier
,
String
The name of the entity which could not be resolved
entityName
)

Constructs an UnresolvableObjectException using the specified information.

protected

Method Summary

Modifier and TypeMethod and Description
public String
public Serializable
public String
getMessage()

Overrides java.lang.Throwable.getMessage.

Returns the detail message string of this throwable.
public static void
throwIfNull(Object
The entity to check for nullness
entity
,
Serializable
The identifier of the entity
identifier
,
String
The name of the entity
entityName
)

Factory method for building and throwing an UnresolvableObjectException if the entity is null.

Field Detail

entityNameback to summary
private final String entityName
identifierback to summary
private final Serializable identifier

Constructor Detail

UnresolvableObjectExceptionback to summary
public UnresolvableObjectException(Serializable identifier, String entityName)

Constructs an UnresolvableObjectException using the specified information.

Parameters
identifier:Serializable

The identifier of the entity which could not be resolved

entityName:String

The name of the entity which could not be resolved

UnresolvableObjectExceptionback to summary
protected UnresolvableObjectException(String message, Serializable identifier, String clazz)

Method Detail

getEntityNameback to summary
public String getEntityName()
getIdentifierback to summary
public Serializable getIdentifier()
getMessageback to summary
public String getMessage()

Overrides java.lang.Throwable.getMessage.

Doc from java.lang.Throwable.getMessage.

Returns the detail message string of this throwable.

Returns:String

the detail message string of this Throwable instance (which may be null).

Annotations
@Override
throwIfNullback to summary
public static void throwIfNull(Object entity, Serializable identifier, String entityName) throws UnresolvableObjectException

Factory method for building and throwing an UnresolvableObjectException if the entity is null.

Parameters
entity:Object

The entity to check for nullness

identifier:Serializable

The identifier of the entity

entityName:String

The name of the entity

Exceptions
UnresolvableObjectException:
Thrown if entity is null