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

public Class ComponentTuplizerFactory

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

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

Field Summary

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

Constructor Summary

AccessConstructor and Description
public

Method Summary

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

Returns:

The instantiated tuplizer
constructDefaultTuplizer
(EntityMode
The entity mode for which to build a default tuplizer.
entityMode
,
Component
The metadata for the component.
metadata
)

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

public ComponentTuplizer

Returns:

The instantiated tuplizer
constructTuplizer
(String
The name of the tuplizer class to instantiate
tuplizerClassName
,
Component
The metadata for the component.
metadata
)

Construct an instance of the given tuplizer class.

public ComponentTuplizer

Returns:

The instantiated tuplizer
constructTuplizer
(Class<? extends ComponentTuplizer>
The tuplizer class to instantiate
tuplizerClass
,
Component
The metadata for the component.
metadata
)

Construct an instance of the given tuplizer class.

private Constructor<? extends ComponentTuplizer>
private boolean
hasProperConstructor(Class<T> tuplizerClass)

private boolean
public void
registerDefaultTuplizerClass(EntityMode
The entity-mode for which to register the tuplizer class
entityMode
,
Class<? extends ComponentTuplizer>
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

COMPONENT_TUP_CTOR_SIGback to summary
private static final Class<T>[] COMPONENT_TUP_CTOR_SIG
defaultImplClassByModeback to summary
private Map<EntityMode, Class<? extends ComponentTuplizer>> defaultImplClassByMode

Constructor Detail

ComponentTuplizerFactoryback to summary
public ComponentTuplizerFactory()

Method Detail

buildBaseMappingback to summary
private static Map<EntityMode, Class<? extends ComponentTuplizer>> buildBaseMapping()
constructDefaultTuplizerback to summary
public ComponentTuplizer constructDefaultTuplizer(EntityMode entityMode, Component metadata)

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

Parameters
entityMode:EntityMode

The entity mode for which to build a default tuplizer.

metadata:Component

The metadata for the component.

Returns:ComponentTuplizer

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 ComponentTuplizer constructTuplizer(String tuplizerClassName, Component metadata)

Construct an instance of the given tuplizer class.

Parameters
tuplizerClassName:String

The name of the tuplizer class to instantiate

metadata:Component

The metadata for the component.

Returns:ComponentTuplizer

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 ComponentTuplizer constructTuplizer(Class<? extends ComponentTuplizer> tuplizerClass, Component metadata)

Construct an instance of the given tuplizer class.

Parameters
tuplizerClass:Class<? extends ComponentTuplizer>

The tuplizer class to instantiate

metadata:Component

The metadata for the component.

Returns:ComponentTuplizer

The instantiated tuplizer

Exceptions
HibernateException:
if the java.lang.reflect.Constructor#newInstance call fails.
getProperConstructorback to summary
private Constructor<? extends ComponentTuplizer> getProperConstructor(Class<? extends ComponentTuplizer> clazz)
hasProperConstructorback to summary
private boolean hasProperConstructor(Class<T> tuplizerClass)
Annotations
@SuppressWarnings:unchecked
isComponentTuplizerImplementorback to summary
private boolean isComponentTuplizerImplementor(Class<T> tuplizerClass)
registerDefaultTuplizerClassback to summary
public void registerDefaultTuplizerClass(EntityMode entityMode, Class<? extends ComponentTuplizer> 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 ComponentTuplizer>

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

Annotations
@SuppressWarnings:UnusedDeclaration