Top Description Methods
org.hibernate

public Interface EntityNameResolver

Known Direct Implementers
org.hibernate.internal.CoordinatingEntityNameResolver
Annotations
@FunctionalInterface

An object capable of determining the entity name for a given entity instance.

A single Java class may be mapped as an entity multiple times, with each mapping distinguished by a distinct entity name. This is not currently possible using annotations, but it may be achieved using XML-based mappings. If a class is mapped multiple times, Hibernate needs a way to determine which entity is represented by a given instance of the class. There are two ways to provide this information:

Author
Steve Ebersole
See Also
org.hibernate.boot.SessionFactoryBuilder#addEntityNameResolver(EntityNameResolver...), org.hibernate.cfg.Configuration#addEntityNameResolver(EntityNameResolver)

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The corresponding entity name, or null if this implementation does not know how to perform resolution for the given entity instance.
resolveEntityName
(Object
The entity instance.
entity
)

Given an entity instance, determine its entity name.

Method Detail

resolveEntityNameback to summary
public String resolveEntityName(Object entity)

Given an entity instance, determine its entity name.

Parameters
entity:Object

The entity instance.

Returns:String

The corresponding entity name, or null if this implementation does not know how to perform resolution for the given entity instance.