Top Description Fields Constructors Methods
org.hibernate

public Class WrongClassException

extends HibernateException
Class Inheritance
Imports
java.util.Locale

Thrown when loading an entity (by identifier) results in a value that cannot be treated as the subclass type requested by the caller.
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private final String
private final Object

Constructor Summary

AccessConstructor and Description
public
WrongClassException(String
A message explaining the exception condition
message
,
Object
The identifier of the entity
identifier
,
String
The entity-type requested
entityName
)

Constructs a WrongClassException using the supplied information.

public
WrongClassException(String resolvedEntityName, Object identifier, String expectedEntityName, Object discriminatorValue)

Method Summary

Modifier and TypeMethod and Description
public String
public Object

Field Detail

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

Constructor Detail

WrongClassExceptionback to summary
public WrongClassException(String message, Object identifier, String entityName)

Constructs a WrongClassException using the supplied information.

Parameters
message:String

A message explaining the exception condition

identifier:Object

The identifier of the entity

entityName:String

The entity-type requested

WrongClassExceptionback to summary
public WrongClassException(String resolvedEntityName, Object identifier, String expectedEntityName, Object discriminatorValue)

Method Detail

getEntityNameback to summary
public String getEntityName()
getIdentifierback to summary
public Object getIdentifier()