Examples of OgmConfiguration


Examples of org.hibernate.ogm.cfg.OgmConfiguration

    assertThat( microwaveOptions.getUnique( NameExampleOption.class ) ).isEqualTo( "test" );
  }

  @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.OgmConfiguration

    assertThat( temperatureOptions.getUnique( EmbedExampleOption.class ) ).isEqualTo( "Embedded" );
  }

  @Test
  public void testThatOptionsCanBeSetAndRetrievedUsingOptionConfiguratorInstance() throws Exception {
    OgmConfiguration configuration = getConfiguration();
    configuration.getProperties().put( OgmProperties.OPTION_CONFIGURATOR, new SampleOptionConfigurator() );
    setupSessionFactory( configuration );

    assertOptionsSetViaConfigurator();
  }
View Full Code Here

Examples of org.hibernate.ogm.cfg.OgmConfiguration

    assertOptionsSetViaConfigurator();
  }

  @Test
  public void testThatOptionsCanBeSetAndRetrievedUsingOptionConfiguratorType() throws Exception {
    OgmConfiguration configuration = getConfiguration();
    configuration.getProperties().put( OgmProperties.OPTION_CONFIGURATOR, SampleOptionConfigurator.class );
    setupSessionFactory( configuration );

    assertOptionsSetViaConfigurator();
  }
View Full Code Here

Examples of org.hibernate.ogm.cfg.OgmConfiguration

    assertOptionsSetViaConfigurator();
  }

  @Test
  public void testThatOptionsCanBeSetAndRetrievedUsingOptionConfiguratorTypeName() throws Exception {
    OgmConfiguration configuration = getConfiguration();
    configuration.getProperties().put( OgmProperties.OPTION_CONFIGURATOR, SampleOptionConfigurator.class.getName() );
    setupSessionFactory( configuration );

    assertOptionsSetViaConfigurator();
  }
View Full Code Here

Examples of org.hibernate.ogm.cfg.OgmConfiguration

  private void setupSessionFactory(OgmConfiguration ogmConfiguration) {
    sessions = ogmConfiguration.buildSessionFactory();
  }

  private OgmConfiguration getConfiguration() {
    OgmConfiguration configuration = TestHelper.getDefaultTestConfiguration( getAnnotatedClasses() );
    configuration.getProperties().put( OgmProperties.DATASTORE_PROVIDER, SampleDatastoreProvider.class );

    return configuration;
  }
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.