Examples of buildSessionFactory()


Examples of org.hibernate.ogm.cfg.OgmConfiguration.buildSessionFactory()

      .entity( GolfPlayer.class )
        .writeConcern( WriteConcernType.REPLICA_ACKNOWLEDGED )
        .property( "playedCourses", ElementType.FIELD )
          .writeConcern( WriteConcernType.ACKNOWLEDGED );

    sessions = configuration.buildSessionFactory();

    Session session = sessions.openSession();
    Transaction transaction = session.beginTransaction();

    // when inserting a player with an associated course
View Full Code Here

Examples of org.hibernate.ogm.cfg.OgmConfiguration.buildSessionFactory()

    if ( associationStorage != null ) {
      configuration.getProperties().put( DocumentStoreProperties.ASSOCIATIONS_STORE, associationStorage );
    }

    sessions = configuration.buildSessionFactory();
  }

  private BasicDBObject getGolfCourse() {
    BasicDBObject bepplePeach = new BasicDBObject();
    bepplePeach.put( "_id", 1L );
View Full Code Here

Examples of org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory()

    @Bean(name = "sessionFactory")
    public SessionFactory getSessionFactory(BasicDataSource dataSource) {
        LocalSessionFactoryBuilder sessionBuilder = new LocalSessionFactoryBuilder(dataSource);
        sessionBuilder.addAnnotatedClasses(Book.class);
        sessionBuilder.addProperties(getHibernateProperties());
        return sessionBuilder.buildSessionFactory();
    }

    @Autowired
    @Bean(name = "transactionManager")
    public HibernateTransactionManager getTransactionManager(SessionFactory sessionFactory) {
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.