/** * Get the user profile attached to the Hibernate Session or EntityManager. * * @return the attached profile. */ UserProfile getUserProfile() { // Since we aren't actually persisting anything, this doesn't do anything other than return // _userProfile /// It's just meant to demonstrate how to do it when you are using entities persisted in data // store. return EntityRetriever.getInstance().reattachIfNecessary(_userProfile); }
/** * Get the RepositoryItem whose Resources we are managing * * @return the RepositoryItem */ @Nonnull protected RI getValue() { return ensureValueState(_er.reattachIfNecessary(_value)); }