private void loadByDerivedIdentitySimplePkValue( LoadEvent event, LoadEventListener.LoadType options, EntityPersister dependentPersister, EmbeddedComponentType dependentIdType, EntityPersister parentPersister) { final EntityKey parentEntityKey = event.getSession().generateEntityKey( event.getEntityId(), parentPersister ); final Object parent = doLoad( event, parentPersister, parentEntityKey, options ); final Serializable dependent = (Serializable) dependentIdType.instantiate( parent, event.getSession() ); dependentIdType.setPropertyValues( dependent, new Object[] {parent}, dependentPersister.getEntityMode() ); final EntityKey dependentEntityKey = event.getSession().generateEntityKey( dependent, dependentPersister ); event.setEntityId( dependent ); event.setResult( doLoad( event, dependentPersister, dependentEntityKey, options ) ); }
private Type buildType() { // TODO : temporary initial step towards HHH-1907 ComponentMetamodel metamodel = new ComponentMetamodel( this ); if ( isEmbedded() ) { return new EmbeddedComponentType( metamodel ); } else { return new ComponentType( metamodel ); } }