Java 类org.hibernate.type.EmbeddedComponentType 实例源码

项目:lams    文件:DefaultLoadEventListener.java   
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 ) );
}
项目:cacheonix-core    文件:Component.java   
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 );
    }
}