[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3512) Registration of IdentifierGenerators (short naming)

Steve Ebersole (JIRA) noreply at atlassian.com
Tue Dec 27 12:35:19 EST 2011


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

Steve Ebersole updated HHH-3512:
--------------------------------

    Fix Version/s:     (was: 4.x)

> Registration of IdentifierGenerators (short naming)
> ---------------------------------------------------
>
>                 Key: HHH-3512
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3512
>             Project: Hibernate Core
>          Issue Type: New Feature
>          Components: core, metamodel
>            Reporter: Steve Ebersole
>            Assignee: Steve Ebersole
>             Fix For: 3.5.0.Beta-1
>
>
> Another way to look  at this is to allow configuration of IdentifierGeneratorFactory.
> Either allow explicit registration under a short name in config:
> <identifier-generator name="sequence-style" class="org.hibernate.id.enhanced.SequenceStyleGenerator"/>
> or via an explicit contract:
> public interface Registerable {
>     public String getRegistrationName();
> }
> public class SequenceStyleGenerator implements IdentifierGenerator, Registerable {
>     ...
>     public String getRegistrationName() {
>         return "sequence-style";
>     }
> }
> The second, while certainly more verbose, can be used applied to other situations where we want to allow registration moving forward (types, property-accessor, etc).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list