public final class TypeFactory extends Object implements Serializable
Type
, specifically it builds instances of
Used internally to obtain instances of Type. Applications should use static methods
and constants on org.hibernate.Hibernate.Modifier and Type | Class and Description |
---|---|
static interface |
TypeFactory.TypeScope |
Constructor and Description |
---|
TypeFactory() |
Modifier and Type | Method and Description |
---|---|
Type |
any(Type metaType,
Type identifierType) |
CollectionType |
array(String role,
String propertyRef,
Class elementClass) |
CollectionType |
bag(String role,
String propertyRef) |
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) |
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) |
static void |
injectParameters(Object type,
Properties parameters) |
void |
injectSessionFactory(SessionFactoryImplementor factory) |
CollectionType |
list(String role,
String propertyRef) |
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.
|
CollectionType |
map(String role,
String propertyRef) |
EntityType |
oneToOne(String persistentClass,
ForeignKeyDirection foreignKeyType,
boolean referenceToPrimaryKey,
String uniqueKeyPropertyName,
boolean lazy,
boolean unwrapProxy,
String entityName,
String propertyName) |
CollectionType |
orderedMap(String role,
String propertyRef) |
CollectionType |
orderedSet(String role,
String propertyRef) |
SessionFactoryImplementor |
resolveSessionFactory() |
static <T extends Serializable> |
serializable(Class<T> serializableClass)
Build a
SerializableType from the given Serializable class. |
CollectionType |
set(String role,
String propertyRef) |
CollectionType |
sortedMap(String role,
String propertyRef,
Comparator comparator) |
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) |
Type |
type(Class<Type> typeClass,
Properties parameters) |
public void injectSessionFactory(SessionFactoryImplementor factory)
public SessionFactoryImplementor resolveSessionFactory()
public Type byClass(Class clazz, Properties parameters)
public Type type(Class<Type> typeClass, Properties parameters)
public static void injectParameters(Object type, Properties parameters)
public CompositeCustomType customComponent(Class<CompositeUserType> typeClass, Properties parameters)
@Deprecated public static CompositeCustomType customComponent(Class<CompositeUserType> typeClass, Properties parameters, TypeFactory.TypeScope scope)
Hibernate
public CollectionType customCollection(String typeName, Properties typeParameters, String role, String propertyRef)
public CustomType custom(Class<UserType> typeClass, Properties parameters)
@Deprecated public static CustomType custom(Class<UserType> typeClass, Properties parameters, TypeFactory.TypeScope scope)
Hibernate
public static <T extends Serializable> SerializableType<T> serializable(Class<T> serializableClass)
SerializableType
from the given Serializable
class.T
- The actual class type (extends Serializable)serializableClass
- The Serializable
class.SerializableType
public EntityType oneToOne(String persistentClass, ForeignKeyDirection foreignKeyType, boolean referenceToPrimaryKey, String uniqueKeyPropertyName, boolean lazy, boolean unwrapProxy, String entityName, String propertyName)
public EntityType specialOneToOne(String persistentClass, ForeignKeyDirection foreignKeyType, boolean referenceToPrimaryKey, String uniqueKeyPropertyName, boolean lazy, boolean unwrapProxy, String entityName, String propertyName)
public EntityType manyToOne(String persistentClass)
public EntityType manyToOne(String persistentClass, boolean lazy)
@Deprecated public EntityType manyToOne(String persistentClass, String uniqueKeyPropertyName, boolean lazy, boolean unwrapProxy, boolean ignoreNotFound, boolean isLogicalOneToOne)
manyToOne(String, boolean, String, boolean, boolean, boolean, boolean)
instead.public EntityType manyToOne(String persistentClass, boolean referenceToPrimaryKey, String uniqueKeyPropertyName, boolean lazy, boolean unwrapProxy, boolean ignoreNotFound, boolean isLogicalOneToOne)
public CollectionType array(String role, String propertyRef, Class elementClass)
public CollectionType list(String role, String propertyRef)
public CollectionType bag(String role, String propertyRef)
public CollectionType idbag(String role, String propertyRef)
public CollectionType map(String role, String propertyRef)
public CollectionType orderedMap(String role, String propertyRef)
public CollectionType sortedMap(String role, String propertyRef, Comparator comparator)
public CollectionType set(String role, String propertyRef)
public CollectionType orderedSet(String role, String propertyRef)
public CollectionType sortedSet(String role, String propertyRef, Comparator comparator)
public ComponentType component(ComponentMetamodel metamodel)
public EmbeddedComponentType embeddedComponent(ComponentMetamodel metamodel)
Copyright © 2017 JBoss by Red Hat. All rights reserved.