Examples of configureOptionsFor()


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

    MockMongoClient mockClient = mockClient().build();

    OgmConfiguration configuration = TestHelper.getDefaultTestConfiguration( getAnnotatedClasses() );
    configuration.getProperties().put( OgmProperties.DATASTORE_PROVIDER, new MongoDBDatastoreProvider( mockClient.getClient() ) );
    configuration.getProperties().put( DocumentStoreProperties.ASSOCIATIONS_STORE, AssociationStorageType.ASSOCIATION_DOCUMENT );
    configuration.configureOptionsFor( MongoDB.class )
      .entity( GolfPlayer.class )
        .writeConcern( WriteConcernType.REPLICA_ACKNOWLEDGED )
        .property( "playedCourses", ElementType.FIELD )
          .writeConcern( WriteConcernType.ACKNOWLEDGED );
View Full Code Here

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

  }

  @Test
  public void testThatEntityOptionCanBeSetAndRetrieved() throws Exception {
    OgmConfiguration configuration = getConfiguration();
    configuration.configureOptionsFor( SampleNoSqlDatastore.class )
      .entity( Refrigerator.class )
        .force( true );

    setupSessionFactory( configuration );
View Full Code Here

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

  }

  @Test
  public void testThatEntityOptionsCanBeSetAndRetrievedOnMultipleTypes() throws Exception {
    OgmConfiguration configuration = getConfiguration();
    configuration.configureOptionsFor( SampleNoSqlDatastore.class )
      .entity( Refrigerator.class )
        .force( true )
      .entity( Microwave.class )
        .name( "test" );
View Full Code Here

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

  }

  @Test
  public void testThatPropertyOptionCanBeSetAndRetrieved() throws Exception {
    OgmConfiguration configuration = getConfiguration();
    configuration.configureOptionsFor( SampleNoSqlDatastore.class )
      .entity( Refrigerator.class )
        .property( "temperature", ElementType.FIELD )
          .embed( "Embedded" );

    setupSessionFactory( configuration );
View Full Code Here

Examples of org.hibernate.ogm.cfg.impl.ConfigurableImpl.configureOptionsFor()

  @Override
  public <D extends DatastoreConfiguration<G>, G extends GlobalContext<?, ?>> G configureOptionsFor(Class<D> datastoreType) {
    ConfigurableImpl configurable = new ConfigurableImpl();
    getProperties().put( InternalProperties.OGM_OPTION_CONTEXT, configurable.getContext() );

    return configurable.configureOptionsFor( datastoreType );
  }
}
View Full Code Here

Examples of org.hibernate.ogm.cfg.impl.ConfigurableImpl.configureOptionsFor()

  @Override
  public <D extends DatastoreConfiguration<G>, G extends GlobalContext<?, ?>> G configureOptionsFor(Class<D> datastoreType) {
    ConfigurableImpl configurable = new ConfigurableImpl();
    getProperties().put( InternalProperties.OGM_OPTION_CONTEXT, configurable.getContext() );

    return configurable.configureOptionsFor( datastoreType );
  }
}
View Full Code Here

Examples of org.hibernate.ogm.cfg.impl.ConfigurableImpl.configureOptionsFor()

  @Override
  public <D extends DatastoreConfiguration<G>, G extends GlobalContext<?, ?>> G configureOptionsFor(Class<D> datastoreType) {
    ConfigurableImpl configurable = new ConfigurableImpl();
    getProperties().put( InternalProperties.OGM_OPTION_CONTEXT, configurable.getContext() );

    return configurable.configureOptionsFor( datastoreType );
  }
}
View Full Code Here

Examples of org.hibernate.ogm.cfg.impl.ConfigurableImpl.configureOptionsFor()

  @Override
  public <D extends DatastoreConfiguration<G>, G extends GlobalContext<?, ?>> G configureOptionsFor(Class<D> datastoreType) {
    ConfigurableImpl configurable = new ConfigurableImpl();
    getProperties().put( InternalProperties.OGM_OPTION_CONTEXT, configurable.getContext() );

    return configurable.configureOptionsFor( datastoreType );
  }
}
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.