From e3bfdf4ec6d012998a6af7ed8d8b4fa74406fb6f Mon Sep 17 00:00:00 2001 From: Gavin King Date: Sun, 6 Feb 2005 04:37:14 +0000 Subject: [PATCH] revised usertype sect git-svn-id: https://svn.jboss.org/repos/hibernate/trunk/Hibernate3/doc@5577 1b8cb986-b30d-0410-93ca-fae66ebed9b2 --- reference/en/modules/basic_mapping.xml | 53 ++++++++++++++------------ 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/reference/en/modules/basic_mapping.xml b/reference/en/modules/basic_mapping.xml index bdbbcff2a4..6687d0a65a 100644 --- a/reference/en/modules/basic_mapping.xml +++ b/reference/en/modules/basic_mapping.xml @@ -2622,36 +2622,45 @@ Notice the use of <column> tags to map a property to multiple columns. + - You may also supply parameters to a UserType in the mapping file. To do this, your UserType - has to implement the org.hibernate.usertype.ParameterizedType interface. - To supply parameters to your UserType, you can use the <type> element - in your mapping files. + The CompositeUserType, EnhancedUserType, + and UserCollectionType and UserVersionType + interfaces provide support for more specialized uses. - - - 1 + + + You may even supply parameters to a UserType in the mapping file. To + do this, your UserType must implement the + org.hibernate.usertype.ParameterizedType interface. To supply parameters + to your custom type, you can use the <type> element in your mapping + files. + + + + + 0 ]]> - The UserType can now retrieve the value for the parameter named default - from the Properties object passed to it. + The UserType can now retrieve the value for the parameter named + default from the Properties object passed to it. + - If you use a certain UserType very often, it may be useful to define a shorter name for it. - You can do this using the <typedef> element in your mapping files. - Typedefs contain a UserType and a defined name for it, and may also contain a list of default - paramter values if the type defined implements ParameterizedType. After - defining the name, it can be used everywhere the original classname can be used. + If you use a certain UserType very often, it may be useful to define a + shorter name for it. You can do this using the <typedef> element. + Typedefs assign a name to a custom type, and may also contain a list of default + parameter values if the type is parameterized. - - 2 - + + + 0 +]]> + + ]]> - - -]]> It is also possible to override the parameters supplied in a typedef on a case-by-case basis by using type parameters on the property mapping. @@ -2669,10 +2678,6 @@ - - - TODO: document parameterizable usertypes -