Package org.hibernate.ogm.loader.impl

Examples of org.hibernate.ogm.loader.impl.OgmLoader.loadEntities()


    OgmLoader loader = new OgmLoader( new OgmEntityPersister[] { persister } );
    List<Tuple> tuples = new ArrayList<Tuple>();
    tuples.add( tuple );
    OgmLoadingContext ogmLoadingContext = new OgmLoadingContext();
    ogmLoadingContext.setTuples( tuples );
    List<Object> entities = loader.loadEntities( (SessionImplementor) session, LockOptions.NONE, ogmLoadingContext );
    return entities.get( 0 );
  }

}
View Full Code Here


    OgmLoader loader = new OgmLoader( new OgmEntityPersister[] { (OgmEntityPersister) persister } );
    OgmLoadingContext ogmLoadingContext = new OgmLoadingContext();
    List<Tuple> tuples = new ArrayList<Tuple>();
    tuples.add( tuple );
    ogmLoadingContext.setTuples( tuples );
    List<Object> entities = loader.loadEntities( (SessionImplementor) session, LockOptions.NONE, ogmLoadingContext );
    assertThat( entities.size() ).isEqualTo( 1 );
    assertThat( ( (Feeling) entities.get( 0 ) ).getName() ).isEqualTo( "Moody" );
    transaction.commit();
    session.close();
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.