[hibernate-issues] [Hibernate-JIRA] Issue Comment Edited: (HHH-7161) The type SessionImpl.IdentifierLoadAccessImpl is not visible (not public) so the new API session.byId(..) is not useable

Steve Ebersole (JIRA) noreply at atlassian.com
Fri Mar 9 10:12:49 EST 2012


    [ https://hibernate.onjira.com/browse/HHH-7161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45882#comment-45882 ] 

Steve Ebersole edited comment on HHH-7161 at 3/9/12 9:11 AM:
-------------------------------------------------------------

Um, they are all private inner classes:

{code:title=SessionImpl.java|borderStyle=solid}
    ...

    private class IdentifierLoadAccessImpl implements IdentifierLoadAccess {
        ...
    }

    private abstract class BaseNaturalIdLoadAccessImpl  {
        ...
    }

    private class NaturalIdLoadAccessImpl extends BaseNaturalIdLoadAccessImpl implements NaturalIdLoadAccess {
        ...
    }

    private class SimpleNaturalIdLoadAccessImpl extends BaseNaturalIdLoadAccessImpl implements SimpleNaturalIdLoadAccess {
        ...
    }

{code}

You are trying to do something special here to cause this.

      was (Author: steve):
    Um, they are all private inner classes:

{code:title=SessionImpl.java|borderStyle=solid}
    
    private class IdentifierLoadAccessImpl implements IdentifierLoadAccess {
        ...
    }

    private abstract class BaseNaturalIdLoadAccessImpl  {
        ...
    }

    private class NaturalIdLoadAccessImpl extends BaseNaturalIdLoadAccessImpl implements NaturalIdLoadAccess {
        ...
    }

    private class SimpleNaturalIdLoadAccessImpl extends BaseNaturalIdLoadAccessImpl implements SimpleNaturalIdLoadAccess {
        ...
    }

{code}

You are trying to do something special here to cause this.
  
> The type SessionImpl.IdentifierLoadAccessImpl is not visible (not public) so the new API session.byId(..) is not useable
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HHH-7161
>                 URL: https://hibernate.onjira.com/browse/HHH-7161
>             Project: Hibernate ORM
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 4.1.0, 4.1.1
>            Reporter: Guenther Demetz
>            Priority: Minor
>              Labels: byId
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Document http://in.relation.to/Bloggers/41FeatureLoadingByNaturalId
> says that the new approach has been made available for identifier based loading as well,
> by listing following 2 new public methods:
> public IdentifierLoadAccess byId(String entityName);
> public IdentifierLoadAccess byId(Class entityClass);
> Unfortunately IdentifierLoadAccess is a private inner class of SessionImpl so 
> session.byId(C.class).load(id);
> gives following compile-error:
> java.lang.Error: Unresolved compilation problem: 
> 	The type SessionImpl.IdentifierLoadAccessImpl is not visible

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