Class TypeDefinitionBean
- java.lang.Object
- org.springframework.orm.hibernate3.TypeDefinitionBean
- All Implemented Interfaces:
Aware
,BeanNameAware
,InitializingBean
@Deprecated public class TypeDefinitionBean extends Object implements BeanNameAware, InitializingBean
Deprecated.as of Spring 4.3, in favor of Hibernate 4.x/5.xBean that encapsulates a Hibernate type definition.Typically defined as inner bean within a LocalSessionFactoryBean definition, as list element for the "typeDefinitions" bean property. For example:
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> ... <property name="typeDefinitions"> <list> <bean class="org.springframework.orm.hibernate3.TypeDefinitionBean"> <property name="typeName" value="myType"/> <property name="typeClass" value="mypackage.MyTypeClass"/> </bean> </list> </property> ... </bean>
Alternatively, specify a bean id (or name) attribute for the inner bean, instead of the "typeName" property.- Since:
- 1.2
- Author:
- Juergen Hoeller
- See Also:
LocalSessionFactoryBean.setTypeDefinitions(TypeDefinitionBean[])
Constructor Summary
Constructors Constructor Description TypeDefinitionBean()
Deprecated.
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
afterPropertiesSet()
Deprecated.Invoked by the containingBeanFactory
after it has set all bean properties and satisfiedBeanFactoryAware
,ApplicationContextAware
etc.Properties
getParameters()
Deprecated.Return the default parameters for the type.String
getTypeClass()
Deprecated.Return the type implementation class.String
getTypeName()
Deprecated.Return the name of the type.void
setBeanName(String name)
Deprecated.If no explicit type name has been specified, the bean name of the TypeDefinitionBean will be used.void
setParameters(Properties parameters)
Deprecated.Specify default parameters for the type.void
setTypeClass(String typeClass)
Deprecated.Set the type implementation class.void
setTypeName(String typeName)
Deprecated.Set the name of the type.
Constructor Detail
TypeDefinitionBean
public TypeDefinitionBean()
Deprecated.
Method Detail
setTypeName
public void setTypeName(String typeName)
Deprecated.Set the name of the type.
getTypeName
public String getTypeName()
Deprecated.Return the name of the type.
setTypeClass
public void setTypeClass(String typeClass)
Deprecated.Set the type implementation class.
getTypeClass
public String getTypeClass()
Deprecated.Return the type implementation class.
setParameters
public void setParameters(Properties parameters)
Deprecated.Specify default parameters for the type. This only applies to parameterized types.
getParameters
public Properties getParameters()
Deprecated.Return the default parameters for the type.
setBeanName
public void setBeanName(String name)
Deprecated.If no explicit type name has been specified, the bean name of the TypeDefinitionBean will be used.- Specified by:
setBeanName
in interfaceBeanNameAware
- Parameters:
name
- the name of the bean in the factory. Note that this name is the actual bean name used in the factory, which may differ from the originally specified name: in particular for inner bean names, the actual bean name might have been made unique through appending "#..." suffixes. Use theBeanFactoryUtils.originalBeanName(String)
method to extract the original bean name (without suffix), if desired.- See Also:
setTypeName(java.lang.String)
afterPropertiesSet
public void afterPropertiesSet()
Deprecated.Description copied from interface:InitializingBean
Invoked by the containingBeanFactory
after it has set all bean properties and satisfiedBeanFactoryAware
,ApplicationContextAware
etc.This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
- Specified by:
afterPropertiesSet
in interfaceInitializingBean