[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2896) unified approach for id and natural-id loading

Steve Ebersole (JIRA) noreply at atlassian.com
Thu Jan 12 16:36:12 EST 2012


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2896?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45119#comment-45119 ] 

Steve Ebersole commented on HHH-2896:
-------------------------------------

Contemplating an additional distinction in this API to make it easier for the cases with a simple natural-id versus a compound one by splitting {{org.hibernate.NaturalIdLoadAccess}} up into 2 separate interfaces:

{code:title=SimpleNaturalIdLoadAccess.java|borderStyle=solid}
public interface SimpleNaturalIdLoadAccess {
    public SimpleNaturalIdLoadAccess with(LockOptions lockOptions);
    public Object getReference(Object naturalIdValue);
    public Object load(Object naturalIdValue);
}
{code}

{code:title=CompoundNaturalIdLoadAccess.java|borderStyle=solid}
public interface CompoundNaturalIdLoadAccess {
    public CompoundNaturalIdLoadAccess with(LockOptions lockOptions);
    public CompoundNaturalIdLoadAccess using(String attributeName, Object value);
    public Object getReference();
    public Object load();
}
{code}

>  unified approach for id and natural-id loading
> -----------------------------------------------
>
>                 Key: HHH-2896
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2896
>             Project: Hibernate ORM
>          Issue Type: Improvement
>          Components: core
>            Reporter: Steve Ebersole
>            Assignee: Steve Ebersole
>         Attachments: hhh-2896_irc_discussion.txt
>
>
> A follow-on to HHH-2879 in regards to unifying the loading of entities by pk or natural-id.

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