[hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-5957) Provide a way for dialects to override a SqlTypeDescriptor

Gail Badner (JIRA) noreply at atlassian.com
Fri Feb 25 15:03:08 EST 2011


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gail Badner resolved HHH-5957.
------------------------------

    Resolution: Fixed

Fixed in hibernate:master. Any loose ends will be covered by HHH-5966.

> Provide a way for dialects to override a SqlTypeDescriptor
> ----------------------------------------------------------
>
>                 Key: HHH-5957
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5957
>             Project: Hibernate Core
>          Issue Type: New Feature
>          Components: core
>            Reporter: Gail Badner
>            Assignee: Gail Badner
>             Fix For: 4.0.0.Alpha1
>
>
> Provide a way for dialects to override a SqlTypeDescriptor.
> This involves the following API changes:
> 1) Add to Dialect:
> public SqlTypeDescriptor resolveSqlTypeDescriptor(SqlTypeDescriptor sqlTypeDescriptor)
> The default implementation determines if sqlTypeDescriptor is a "standard-basic" SqlTypeDescriptor (see 2)). If it is, then getSqlTypeDescriptorOverride(int sqlCode) is called to get an override. If there is no override, then sqlTypeDescriptor is simply returned,
> protected SqlTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode)
> 2) Add StandardBasicTypes.isStandardBasicSqlTypeDescriptor(SqlTypeDescriptor sqlTypeDescriptor)
> Returns true if sqlTypeDescriptor is defined for any "standard-basic" types registered in StandardBasicTypes
> 3) Add WrapperOptions.resolveSqlTypeDescriptor(SqlTypeDescriptor sqlTypeDescriptor);
> 4) Add to TypeResolver.resolveSqlTypeDescriptor(SqlTypeDescriptor sqlTypeDescriptor)
> Here are some implementation details.
> The final AbstractStandardBasicType.nullSafeGet()/nullSafeSet() methods will resolve the actual SqlTypeDescriptor to use by calling:
> WrapperOptions.resolveSqlTypeDescriptor( sqlTypeDescriptor )
> The implementation of WrapperOptions.resolveSqlTypeDescriptor( sqlTypeDescriptor ) in AbstractStandardBasicType calls:
> TypeResolver.resolveSqlTypeDescriptor( sqlTypeDescriptor )
> TypeResolver maintains a map that caches the resolved SqlTypeDescriptors. If it is not found in the cache, it is added from what is returned by:
> Dialect.resolveSqlTypeDescriptor( sqlTypeDescriptor )

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list