站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 3.2.4 正式版 API 英文文档

EntityModeToTuplizerMapping (Hibernate API Documentation) - Hibernate 3.2.4 正式版 API 英文文档


org.hibernate.tuple
Class EntityModeToTuplizerMapping

java.lang.Object
  extended byorg.hibernate.tuple.EntityModeToTuplizerMapping
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
EntityEntityModeToTuplizerMapping

public abstract class EntityModeToTuplizerMapping
extends Object
implements Serializable

Centralizes handling of EntityMode to Tuplizer mappings.

Author:
Steve Ebersole
See Also:
Serialized Form

Constructor Summary
EntityModeToTuplizerMapping()
           
 
Method Summary
protected  void addTuplizer(EntityMode entityMode, Tuplizer tuplizer)
           
 Tuplizer getTuplizer(EntityMode entityMode)
          Locate the tuplizer contained within this mapping which is responsible for the given entity-mode.
 Tuplizer getTuplizerOrNull(EntityMode entityMode)
          Locate the contained tuplizer responsible for the given entity-mode.
 EntityMode guessEntityMode(Object object)
          Given a supposed instance of an entity/component, guess its entity mode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityModeToTuplizerMapping

public EntityModeToTuplizerMapping()
Method Detail

addTuplizer

protected void addTuplizer(EntityMode entityMode,
                           Tuplizer tuplizer)

guessEntityMode

public EntityMode guessEntityMode(Object object)
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

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 - The entity-mode for which the caller wants a tuplizer.
Returns:
The tuplizer, or null if not found.

getTuplizer

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 - The entity-mode for which the caller wants a tuplizer.
Returns:
The tuplizer.
Throws:
HibernateException - Unable to locate the requested tuplizer.