Package org.hibernate.tuple
Class EntityModeToTuplizerMapping
java.lang.Object
org.hibernate.tuple.EntityModeToTuplizerMapping
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
EntityEntityModeToTuplizerMapping
Centralizes handling of
EntityMode to Tuplizer mappings.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddTuplizer(EntityMode entityMode, Tuplizer tuplizer) getTuplizer(EntityMode entityMode) Locate the tuplizer contained within this mapping which is responsible for the given entity-mode.getTuplizerOrNull(EntityMode entityMode) Locate the contained tuplizer responsible for the given entity-mode.guessEntityMode(Object object) Given a supposed instance of an entity/component, guess its entity mode.Allow iteration over all definedTuplizers.
-
Constructor Details
-
EntityModeToTuplizerMapping
public EntityModeToTuplizerMapping() -
EntityModeToTuplizerMapping
-
-
Method Details
-
addTuplizer
-
iterateTuplizers
Allow iteration over all definedTuplizers.- Returns:
- Iterator over defined tuplizers
-
guessEntityMode
Given a supposed instance of an entity/component, guess its entity mode.- Parameters:
object- The supposed instance of the entity/component.- Returns:
- The guessed entity mode.
-
getTuplizerOrNull
Locate the contained tuplizer responsible for the given entity-mode. If no such tuplizer is defined on this mapping, then return null.- Parameters:
entityMode- The entity-mode for which the caller wants a tuplizer.- Returns:
- The tuplizer, or null if not found.
-
getTuplizer
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- The entity-mode for which the caller wants a tuplizer.- Returns:
- The tuplizer.
- Throws:
HibernateException- Unable to locate the requested tuplizer.
-