|
spring-orm | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.orm.hibernate3.TypeDefinitionBean
public class TypeDefinitionBean
Bean 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.
LocalSessionFactoryBean.setTypeDefinitions(TypeDefinitionBean[])
Constructor Summary | |
---|---|
TypeDefinitionBean()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
java.util.Properties |
getParameters()
Return the default parameters for the type. |
java.lang.String |
getTypeClass()
Return the type implementation class. |
java.lang.String |
getTypeName()
Return the name of the type. |
void |
setBeanName(java.lang.String name)
If no explicit type name has been specified, the bean name of the TypeDefinitionBean will be used. |
void |
setParameters(java.util.Properties parameters)
Specify default parameters for the type. |
void |
setTypeClass(java.lang.String typeClass)
Set the type implementation class. |
void |
setTypeName(java.lang.String typeName)
Set the name of the type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TypeDefinitionBean()
Method Detail |
---|
public void setTypeName(java.lang.String typeName)
Mappings.addTypeDef(String, String, java.util.Properties)
public java.lang.String getTypeName()
public void setTypeClass(java.lang.String typeClass)
Mappings.addTypeDef(String, String, java.util.Properties)
public java.lang.String getTypeClass()
public void setParameters(java.util.Properties parameters)
Mappings.addTypeDef(String, String, java.util.Properties)
,
ParameterizedType
public java.util.Properties getParameters()
public void setBeanName(java.lang.String name)
setBeanName
in interface org.springframework.beans.factory.BeanNameAware
setTypeName(java.lang.String)
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
|
spring-orm | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |