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

Steve Ebersole (JIRA) noreply at atlassian.com
Wed Oct 1 10:11:04 EDT 2008


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.4, 4.x


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.
-
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