Package org.hibernate.tuple.entity
Class EntityTuplizerFactory
- java.lang.Object
-
- org.hibernate.tuple.entity.EntityTuplizerFactory
-
- All Implemented Interfaces:
java.io.Serializable
public class EntityTuplizerFactory extends java.lang.Object implements java.io.SerializableA registry allowing users to define the defaultEntityTuplizerclass to use perEntityMode.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.Class[]ENTITY_TUP_CTOR_SIG
-
Constructor Summary
Constructors Constructor Description EntityTuplizerFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EntityTuplizerconstructDefaultTuplizer(EntityMode entityMode, EntityMetamodel metamodel, PersistentClass persistentClass)Construct an instance of the default tuplizer for the given entity-mode.EntityTuplizerconstructTuplizer(java.lang.Class<? extends EntityTuplizer> tuplizerClass, EntityMetamodel metamodel, PersistentClass persistentClass)Construct an instance of the given tuplizer class.EntityTuplizerconstructTuplizer(java.lang.String tuplizerClassName, EntityMetamodel metamodel, PersistentClass persistentClass)Construct an instance of the given tuplizer class.voidregisterDefaultTuplizerClass(EntityMode entityMode, java.lang.Class<? extends EntityTuplizer> tuplizerClass)Method allowing registration of the tuplizer class to use as default for a particular entity-mode.
-
-
-
Method Detail
-
registerDefaultTuplizerClass
public void registerDefaultTuplizerClass(EntityMode entityMode, java.lang.Class<? extends EntityTuplizer> tuplizerClass)
Method allowing registration of the tuplizer class to use as default for a particular entity-mode.- Parameters:
entityMode- The entity-mode for which to register the tuplizer classtuplizerClass- The class to use as the default tuplizer for the given entity-mode.
-
constructTuplizer
public EntityTuplizer constructTuplizer(java.lang.String tuplizerClassName, EntityMetamodel metamodel, PersistentClass persistentClass)
Construct an instance of the given tuplizer class.- Parameters:
tuplizerClassName- The name of the tuplizer class to instantiatemetamodel- The metadata for the entity.persistentClass- The mapping info for the entity.- Returns:
- The instantiated tuplizer
- Throws:
HibernateException- If class name cannot be resolved to a class reference, or if theConstructor.newInstance(java.lang.Object...)call fails.
-
constructTuplizer
public EntityTuplizer constructTuplizer(java.lang.Class<? extends EntityTuplizer> tuplizerClass, EntityMetamodel metamodel, PersistentClass persistentClass)
Construct an instance of the given tuplizer class.- Parameters:
tuplizerClass- The tuplizer class to instantiatemetamodel- The metadata for the entity.persistentClass- The mapping info for the entity.- Returns:
- The instantiated tuplizer
- Throws:
HibernateException- if theConstructor.newInstance(java.lang.Object...)call fails.
-
constructDefaultTuplizer
public EntityTuplizer constructDefaultTuplizer(EntityMode entityMode, EntityMetamodel metamodel, PersistentClass persistentClass)
Construct an instance of the default tuplizer for the given entity-mode.- Parameters:
entityMode- The entity mode for which to build a default tuplizer.metamodel- The entity metadata.persistentClass- The entity mapping info.- Returns:
- The instantiated tuplizer
- Throws:
HibernateException- If no default tuplizer found for that entity-mode; may be re-thrown fromconstructTuplizer(java.lang.String, org.hibernate.tuple.entity.EntityMetamodel, org.hibernate.mapping.PersistentClass)too.
-
-