org.hibernate.type
Class TypeFactory

java.lang.Object
  extended by org.hibernate.type.TypeFactory
All Implemented Interfaces:
Serializable

public final class TypeFactory
extends Object
implements Serializable

Used internally to build instances of Type, specifically it builds instances of Used internally to obtain instances of Type. Applications should use static methods and constants on org.hibernate.Hibernate.

See Also:
Serialized Form

Nested Class Summary
static interface TypeFactory.TypeScope
           
 
Constructor Summary
TypeFactory()
           
 
Method Summary
 Type any(Type metaType, Type identifierType)
           
 CollectionType array(String role, String propertyRef, boolean embedded, Class elementClass)
          Deprecated. Use array(String, String, Class) instead. See Jira issue: HHH-7771
 CollectionType array(String role, String propertyRef, Class elementClass)
           
 CollectionType bag(String role, String propertyRef)
           
 CollectionType bag(String role, String propertyRef, boolean embedded)
          Deprecated. Use bag(String, String) instead. See Jira issue: HHH-7771
 Type byClass(Class clazz, Properties parameters)
           
 ComponentType component(ComponentMetamodel metamodel)
           
 CustomType custom(Class<UserType> typeClass, Properties parameters)
           
static CustomType custom(Class<UserType> typeClass, Properties parameters, TypeFactory.TypeScope scope)
          Deprecated. Only for use temporary use by Hibernate
 CollectionType customCollection(String typeName, Properties typeParameters, String role, String propertyRef)
           
 CollectionType customCollection(String typeName, Properties typeParameters, String role, String propertyRef, boolean embedded)
          Deprecated. Use customCollection(String, java.util.Properties, String, String) instead. See Jira issue: HHH-7771
 CompositeCustomType customComponent(Class<CompositeUserType> typeClass, Properties parameters)
           
static CompositeCustomType customComponent(Class<CompositeUserType> typeClass, Properties parameters, TypeFactory.TypeScope scope)
          Deprecated. Only for use temporary use by Hibernate
 EmbeddedComponentType embeddedComponent(ComponentMetamodel metamodel)
           
 CollectionType idbag(String role, String propertyRef)
           
 CollectionType idbag(String role, String propertyRef, boolean embedded)
          Deprecated. Use idbag(String, String) instead. See Jira issue: HHH-7771
static void injectParameters(Object type, Properties parameters)
           
 void injectSessionFactory(SessionFactoryImplementor factory)
           
 CollectionType list(String role, String propertyRef)
           
 CollectionType list(String role, String propertyRef, boolean embedded)
          Deprecated. Use list(String, String) instead. See Jira issue: HHH-7771
 EntityType manyToOne(String persistentClass)
           
 EntityType manyToOne(String persistentClass, boolean lazy)
           
 EntityType manyToOne(String persistentClass, boolean referenceToPrimaryKey, String uniqueKeyPropertyName, boolean lazy, boolean unwrapProxy, boolean ignoreNotFound, boolean isLogicalOneToOne)
           
 EntityType manyToOne(String persistentClass, String uniqueKeyPropertyName, boolean lazy, boolean unwrapProxy, boolean ignoreNotFound, boolean isLogicalOneToOne)
          Deprecated. Use manyToOne(String, boolean, String, boolean, boolean, boolean, boolean) instead.
 EntityType manyToOne(String persistentClass, String uniqueKeyPropertyName, boolean lazy, boolean unwrapProxy, boolean isEmbeddedInXML, boolean ignoreNotFound, boolean isLogicalOneToOne)
          Deprecated. Use manyToOne(String, boolean, String, boolean, boolean, boolean, boolean) instead. See Jira issue: HHH-7771
 CollectionType map(String role, String propertyRef)
           
 CollectionType map(String role, String propertyRef, boolean embedded)
          Deprecated. Use map(String, String) instead. See Jira issue: HHH-7771
 EntityType oneToOne(String persistentClass, ForeignKeyDirection foreignKeyType, boolean referenceToPrimaryKey, String uniqueKeyPropertyName, boolean lazy, boolean unwrapProxy, String entityName, String propertyName)
           
 EntityType oneToOne(String persistentClass, ForeignKeyDirection foreignKeyType, String uniqueKeyPropertyName, boolean lazy, boolean unwrapProxy, boolean isEmbeddedInXML, String entityName, String propertyName)
          Deprecated. Use #oneToOne(String, ForeignKeyDirection, String, boolean, boolean, String, String, boolean) instead. See Jira issue: HHH-7771
 EntityType oneToOne(String persistentClass, ForeignKeyDirection foreignKeyType, String uniqueKeyPropertyName, boolean lazy, boolean unwrapProxy, String entityName, String propertyName)
          Deprecated. Use #oneToOne(String, ForeignKeyDirection, String, boolean, boolean, String, String, boolean) instead.
 CollectionType orderedMap(String role, String propertyRef)
           
 CollectionType orderedMap(String role, String propertyRef, boolean embedded)
          Deprecated. Use orderedMap(String, String) instead. See Jira issue: HHH-7771
 CollectionType orderedSet(String role, String propertyRef)
           
 CollectionType orderedSet(String role, String propertyRef, boolean embedded)
          Deprecated. Use orderedSet(String, String) instead. See Jira issue: HHH-7771
 SessionFactoryImplementor resolveSessionFactory()
           
static
<T extends Serializable>
SerializableType<T>
serializable(Class<T> serializableClass)
          Build a SerializableType from the given Serializable class.
 CollectionType set(String role, String propertyRef)
           
 CollectionType set(String role, String propertyRef, boolean embedded)
          Deprecated. Use set(String, String) instead. See Jira issue: HHH-7771
 CollectionType sortedMap(String role, String propertyRef, boolean embedded, Comparator comparator)
          Deprecated. Use sortedMap(String, String, java.util.Comparator) instead. See Jira issue: HHH-7771
 CollectionType sortedMap(String role, String propertyRef, Comparator comparator)
           
 CollectionType sortedSet(String role, String propertyRef, boolean embedded, Comparator comparator)
          Deprecated. Use sortedSet(String, String, java.util.Comparator) instead. See Jira issue: HHH-7771
 CollectionType sortedSet(String role, String propertyRef, Comparator comparator)
           
 EntityType specialOneToOne(String persistentClass, ForeignKeyDirection foreignKeyType, boolean referenceToPrimaryKey, String uniqueKeyPropertyName, boolean lazy, boolean unwrapProxy, String entityName, String propertyName)
           
 EntityType specialOneToOne(String persistentClass, ForeignKeyDirection foreignKeyType, String uniqueKeyPropertyName, boolean lazy, boolean unwrapProxy, String entityName, String propertyName)
          Deprecated. Use #specialOneToOne(String, ForeignKeyDirection, String, boolean, boolean, String, String, boolean) instead.
 Type type(Class<Type> typeClass, Properties parameters)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeFactory

public TypeFactory()
Method Detail

injectSessionFactory

public void injectSessionFactory(SessionFactoryImplementor factory)

resolveSessionFactory

public SessionFactoryImplementor resolveSessionFactory()

byClass

public Type byClass(Class clazz,
                    Properties parameters)

type

public Type type(Class<Type> typeClass,
                 Properties parameters)

injectParameters

public static void injectParameters(Object type,
                                    Properties parameters)

customComponent

public CompositeCustomType customComponent(Class<CompositeUserType> typeClass,
                                           Properties parameters)

customComponent

@Deprecated
public static CompositeCustomType customComponent(Class<CompositeUserType> typeClass,
                                                             Properties parameters,
                                                             TypeFactory.TypeScope scope)
Deprecated. Only for use temporary use by Hibernate


customCollection

@Deprecated
public CollectionType customCollection(String typeName,
                                                  Properties typeParameters,
                                                  String role,
                                                  String propertyRef,
                                                  boolean embedded)
Deprecated. Use customCollection(String, java.util.Properties, String, String) instead. See Jira issue: HHH-7771


customCollection

public CollectionType customCollection(String typeName,
                                       Properties typeParameters,
                                       String role,
                                       String propertyRef)

custom

public CustomType custom(Class<UserType> typeClass,
                         Properties parameters)

custom

@Deprecated
public static CustomType custom(Class<UserType> typeClass,
                                           Properties parameters,
                                           TypeFactory.TypeScope scope)
Deprecated. Only for use temporary use by Hibernate


serializable

public static <T extends Serializable> SerializableType<T> serializable(Class<T> serializableClass)
Build a SerializableType from the given Serializable class.

Type Parameters:
T - The actual class type (extends Serializable)
Parameters:
serializableClass - The Serializable class.
Returns:
The built SerializableType

oneToOne

@Deprecated
public EntityType oneToOne(String persistentClass,
                                      ForeignKeyDirection foreignKeyType,
                                      String uniqueKeyPropertyName,
                                      boolean lazy,
                                      boolean unwrapProxy,
                                      boolean isEmbeddedInXML,
                                      String entityName,
                                      String propertyName)
Deprecated. Use #oneToOne(String, ForeignKeyDirection, String, boolean, boolean, String, String, boolean) instead. See Jira issue: HHH-7771


oneToOne

@Deprecated
public EntityType oneToOne(String persistentClass,
                                      ForeignKeyDirection foreignKeyType,
                                      String uniqueKeyPropertyName,
                                      boolean lazy,
                                      boolean unwrapProxy,
                                      String entityName,
                                      String propertyName)
Deprecated. Use #oneToOne(String, ForeignKeyDirection, String, boolean, boolean, String, String, boolean) instead.


oneToOne

public EntityType oneToOne(String persistentClass,
                           ForeignKeyDirection foreignKeyType,
                           boolean referenceToPrimaryKey,
                           String uniqueKeyPropertyName,
                           boolean lazy,
                           boolean unwrapProxy,
                           String entityName,
                           String propertyName)

specialOneToOne

@Deprecated
public EntityType specialOneToOne(String persistentClass,
                                             ForeignKeyDirection foreignKeyType,
                                             String uniqueKeyPropertyName,
                                             boolean lazy,
                                             boolean unwrapProxy,
                                             String entityName,
                                             String propertyName)
Deprecated. Use #specialOneToOne(String, ForeignKeyDirection, String, boolean, boolean, String, String, boolean) instead.


specialOneToOne

public EntityType specialOneToOne(String persistentClass,
                                  ForeignKeyDirection foreignKeyType,
                                  boolean referenceToPrimaryKey,
                                  String uniqueKeyPropertyName,
                                  boolean lazy,
                                  boolean unwrapProxy,
                                  String entityName,
                                  String propertyName)

manyToOne

public EntityType manyToOne(String persistentClass)

manyToOne

public EntityType manyToOne(String persistentClass,
                            boolean lazy)

manyToOne

@Deprecated
public EntityType manyToOne(String persistentClass,
                                       String uniqueKeyPropertyName,
                                       boolean lazy,
                                       boolean unwrapProxy,
                                       boolean isEmbeddedInXML,
                                       boolean ignoreNotFound,
                                       boolean isLogicalOneToOne)
Deprecated. Use manyToOne(String, boolean, String, boolean, boolean, boolean, boolean) instead. See Jira issue: HHH-7771


manyToOne

@Deprecated
public EntityType manyToOne(String persistentClass,
                                       String uniqueKeyPropertyName,
                                       boolean lazy,
                                       boolean unwrapProxy,
                                       boolean ignoreNotFound,
                                       boolean isLogicalOneToOne)
Deprecated. Use manyToOne(String, boolean, String, boolean, boolean, boolean, boolean) instead.


manyToOne

public EntityType manyToOne(String persistentClass,
                            boolean referenceToPrimaryKey,
                            String uniqueKeyPropertyName,
                            boolean lazy,
                            boolean unwrapProxy,
                            boolean ignoreNotFound,
                            boolean isLogicalOneToOne)

array

@Deprecated
public CollectionType array(String role,
                                       String propertyRef,
                                       boolean embedded,
                                       Class elementClass)
Deprecated. Use array(String, String, Class) instead. See Jira issue: HHH-7771


array

public CollectionType array(String role,
                            String propertyRef,
                            Class elementClass)

list

@Deprecated
public CollectionType list(String role,
                                      String propertyRef,
                                      boolean embedded)
Deprecated. Use list(String, String) instead. See Jira issue: HHH-7771


list

public CollectionType list(String role,
                           String propertyRef)

bag

@Deprecated
public CollectionType bag(String role,
                                     String propertyRef,
                                     boolean embedded)
Deprecated. Use bag(String, String) instead. See Jira issue: HHH-7771


bag

public CollectionType bag(String role,
                          String propertyRef)

idbag

@Deprecated
public CollectionType idbag(String role,
                                       String propertyRef,
                                       boolean embedded)
Deprecated. Use idbag(String, String) instead. See Jira issue: HHH-7771


idbag

public CollectionType idbag(String role,
                            String propertyRef)

map

@Deprecated
public CollectionType map(String role,
                                     String propertyRef,
                                     boolean embedded)
Deprecated. Use map(String, String) instead. See Jira issue: HHH-7771


map

public CollectionType map(String role,
                          String propertyRef)

orderedMap

@Deprecated
public CollectionType orderedMap(String role,
                                            String propertyRef,
                                            boolean embedded)
Deprecated. Use orderedMap(String, String) instead. See Jira issue: HHH-7771


orderedMap

public CollectionType orderedMap(String role,
                                 String propertyRef)

sortedMap

@Deprecated
public CollectionType sortedMap(String role,
                                           String propertyRef,
                                           boolean embedded,
                                           Comparator comparator)
Deprecated. Use sortedMap(String, String, java.util.Comparator) instead. See Jira issue: HHH-7771


sortedMap

public CollectionType sortedMap(String role,
                                String propertyRef,
                                Comparator comparator)

set

@Deprecated
public CollectionType set(String role,
                                     String propertyRef,
                                     boolean embedded)
Deprecated. Use set(String, String) instead. See Jira issue: HHH-7771


set

public CollectionType set(String role,
                          String propertyRef)

orderedSet

@Deprecated
public CollectionType orderedSet(String role,
                                            String propertyRef,
                                            boolean embedded)
Deprecated. Use orderedSet(String, String) instead. See Jira issue: HHH-7771


orderedSet

public CollectionType orderedSet(String role,
                                 String propertyRef)

sortedSet

@Deprecated
public CollectionType sortedSet(String role,
                                           String propertyRef,
                                           boolean embedded,
                                           Comparator comparator)
Deprecated. Use sortedSet(String, String, java.util.Comparator) instead. See Jira issue: HHH-7771


sortedSet

public CollectionType sortedSet(String role,
                                String propertyRef,
                                Comparator comparator)

component

public ComponentType component(ComponentMetamodel metamodel)

embeddedComponent

public EmbeddedComponentType embeddedComponent(ComponentMetamodel metamodel)

any

public Type any(Type metaType,
                Type identifierType)


Copyright © 2001-2015 Red Hat, Inc. All Rights Reserved.