Top Description Fields Constructors Methods
org.hibernate.tuple.entity

public Class EntityTuplizerFactory

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.io.Serializable, java.lang.reflect.Constructor, java.util.Map, java.util.concurrent.ConcurrentHashMap, org.hibernate.EntityMode, .HibernateException, org.hibernate.internal.util.ReflectHelper, org.hibernate.mapping.PersistentClass

A registry allowing users to define the default EntityTuplizer class to use per EntityMode.
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private Map<EntityMode, Class<? extends EntityTuplizer>>
public static final Class<T>[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static Map<EntityMode, Class<? extends EntityTuplizer>>
public EntityTuplizer

Returns:

The instantiated tuplizer
constructDefaultTuplizer
(EntityMode
The entity mode for which to build a default tuplizer.
entityMode
,
EntityMetamodel
The entity metadata.
metamodel
,
PersistentClass
The entity mapping info.
persistentClass
)

Construct an instance of the default tuplizer for the given entity-mode.

public EntityTuplizer

Returns:

The instantiated tuplizer
constructTuplizer
(String
The name of the tuplizer class to instantiate
tuplizerClassName
,
EntityMetamodel
The metadata for the entity.
metamodel
,
PersistentClass
The mapping info for the entity.
persistentClass
)

Construct an instance of the given tuplizer class.

public EntityTuplizer

Returns:

The instantiated tuplizer
constructTuplizer
(Class<? extends EntityTuplizer>
The tuplizer class to instantiate
tuplizerClass
,
EntityMetamodel
The metadata for the entity.
metamodel
,
PersistentClass
The mapping info for the entity.
persistentClass
)

Construct an instance of the given tuplizer class.

private Constructor<? extends EntityTuplizer>
getProperConstructor(Class<? extends EntityTuplizer> clazz, Class<T>[] constructorArgs)

private boolean
hasProperConstructor(Class<? extends EntityTuplizer> tuplizerClass, Class<T>[] constructorArgs)

private boolean
public void
registerDefaultTuplizerClass(EntityMode
The entity-mode for which to register the tuplizer class
entityMode
,
Class<? extends EntityTuplizer>
The class to use as the default tuplizer for the given entity-mode.
tuplizerClass
)

Method allowing registration of the tuplizer class to use as default for a particular entity-mode.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

defaultImplClassByModeback to summary
private Map<EntityMode, Class<? extends EntityTuplizer>> defaultImplClassByMode
ENTITY_TUP_CTOR_SIGback to summary
public static final Class<T>[] ENTITY_TUP_CTOR_SIG

Constructor Detail

EntityTuplizerFactoryback to summary
public EntityTuplizerFactory()

Method Detail

buildBaseMappingback to summary
private static Map<EntityMode, Class<? extends EntityTuplizer>> buildBaseMapping()
constructDefaultTuplizerback to summary
public EntityTuplizer constructDefaultTuplizer(EntityMode entityMode, EntityMetamodel metamodel, PersistentClass persistentClass)

Construct an instance of the default tuplizer for the given entity-mode.

Parameters
entityMode:EntityMode

The entity mode for which to build a default tuplizer.

metamodel:EntityMetamodel

The entity metadata.

persistentClass:PersistentClass

The entity mapping info.

Returns:EntityTuplizer

The instantiated tuplizer

Exceptions
HibernateException:
If no default tuplizer found for that entity-mode; may be re-thrown from constructTuplizer too.
constructTuplizerback to summary
public EntityTuplizer constructTuplizer(String tuplizerClassName, EntityMetamodel metamodel, PersistentClass persistentClass)

Construct an instance of the given tuplizer class.

Parameters
tuplizerClassName:String

The name of the tuplizer class to instantiate

metamodel:EntityMetamodel

The metadata for the entity.

persistentClass:PersistentClass

The mapping info for the entity.

Returns:EntityTuplizer

The instantiated tuplizer

Annotations
@SuppressWarnings:unchecked
Exceptions
HibernateException:
If class name cannot be resolved to a class reference, or if the Constructor#newInstance call fails.
constructTuplizerback to summary
public EntityTuplizer constructTuplizer(Class<? extends EntityTuplizer> tuplizerClass, EntityMetamodel metamodel, PersistentClass persistentClass)

Construct an instance of the given tuplizer class.

Parameters
tuplizerClass:Class<? extends EntityTuplizer>

The tuplizer class to instantiate

metamodel:EntityMetamodel

The metadata for the entity.

persistentClass:PersistentClass

The mapping info for the entity.

Returns:EntityTuplizer

The instantiated tuplizer

Exceptions
HibernateException:
if the Constructor#newInstance call fails.
getProperConstructorback to summary
private Constructor<? extends EntityTuplizer> getProperConstructor(Class<? extends EntityTuplizer> clazz, Class<T>[] constructorArgs)
hasProperConstructorback to summary
private boolean hasProperConstructor(Class<? extends EntityTuplizer> tuplizerClass, Class<T>[] constructorArgs)
isEntityTuplizerImplementorback to summary
private boolean isEntityTuplizerImplementor(Class<T> tuplizerClass)
registerDefaultTuplizerClassback to summary
public void registerDefaultTuplizerClass(EntityMode entityMode, Class<? extends EntityTuplizer> tuplizerClass)

Method allowing registration of the tuplizer class to use as default for a particular entity-mode.

Parameters
entityMode:EntityMode

The entity-mode for which to register the tuplizer class

tuplizerClass:Class<? extends EntityTuplizer>

The class to use as the default tuplizer for the given entity-mode.