Top Description Fields Constructors Methods
org.hibernate.tuple

public abstract Class EntityModeToTuplizerMapping

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Known Direct Subclasses
org.hibernate.tuple.component.ComponentEntityModeToTuplizerMapping, org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping
Imports
java.io.Serializable, java.util.Iterator, .Map, java.util.concurrent.ConcurrentHashMap, org.hibernate.EntityMode, .HibernateException

Centralizes handling of EntityMode to Tuplizer mappings.
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final Map<EntityMode, Tuplizer>

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
protected void
addTuplizer(EntityMode entityMode, Tuplizer tuplizer)

public Tuplizer

Returns:

The tuplizer.
getTuplizer
(EntityMode
The entity-mode for which the caller wants a tuplizer.
entityMode
)

Locate the tuplizer contained within this mapping which is responsible for the given entity-mode.

public Tuplizer

Returns:

The tuplizer, or null if not found.
getTuplizerOrNull
(EntityMode
The entity-mode for which the caller wants a tuplizer.
entityMode
)

Locate the contained tuplizer responsible for the given entity-mode.

public EntityMode

Returns:

The guessed entity mode.
guessEntityMode
(Object
The supposed instance of the entity/component.
object
)

Given a supposed instance of an entity/component, guess its entity mode.

public Iterator<E>

Returns:

Iterator over defined tuplizers
iterateTuplizers
()

Allow iteration over all defined Tuplizers.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

tuplizersback to summary
private final Map<EntityMode, Tuplizer> tuplizers

Constructor Detail

EntityModeToTuplizerMappingback to summary
public EntityModeToTuplizerMapping()
EntityModeToTuplizerMappingback to summary
public EntityModeToTuplizerMapping(Map<K, V> tuplizers)
Annotations
@SuppressWarnings:unchecked, UnusedDeclaration

Method Detail

addTuplizerback to summary
protected void addTuplizer(EntityMode entityMode, Tuplizer tuplizer)
getTuplizerback to summary
public Tuplizer getTuplizer(EntityMode entityMode)

Locate the tuplizer contained within this mapping which is responsible for the given entity-mode. If no such tuplizer is defined on this mapping, then an exception is thrown.

Parameters
entityMode:EntityMode

The entity-mode for which the caller wants a tuplizer.

Returns:Tuplizer

The tuplizer.

Exceptions
HibernateException:
Unable to locate the requested tuplizer.
getTuplizerOrNullback to summary
public Tuplizer getTuplizerOrNull(EntityMode entityMode)

Locate the contained tuplizer responsible for the given entity-mode. If no such tuplizer is defined on this mapping, then return null.

Parameters
entityMode:EntityMode

The entity-mode for which the caller wants a tuplizer.

Returns:Tuplizer

The tuplizer, or null if not found.

guessEntityModeback to summary
public EntityMode guessEntityMode(Object object)

Given a supposed instance of an entity/component, guess its entity mode.

Parameters
object:Object

The supposed instance of the entity/component.

Returns:EntityMode

The guessed entity mode.

iterateTuplizersback to summary
public Iterator<E> iterateTuplizers()

Allow iteration over all defined Tuplizers.

Returns:Iterator<E>

Iterator over defined tuplizers