Package org.hibernate.ogm.cfg

Examples of org.hibernate.ogm.cfg.OptionConfigurator


    assertEquals( config.buildOptions().getReadPreference(), ReadPreference.secondary() );
  }

  @Test
  public void shouldApplyValueGivenViaGlobalOptions() {
    cfg.put( OgmProperties.OPTION_CONFIGURATOR, new OptionConfigurator() {
      @Override
      public void configure(Configurable configurable) {
        configurable.configureOptionsFor( MongoDB.class ).readPreference( ReadPreferenceType.SECONDARY_PREFERRED );
      }
    } );
View Full Code Here


  public static List<OptionValueSource> getDefaultSources(ConfigurationPropertyReader propertyReader) {
    AppendableConfigurationContext programmaticOptions = propertyReader.property( InternalProperties.OGM_OPTION_CONTEXT, AppendableConfigurationContext.class )
        .instantiate()
        .getValue();
    OptionConfigurator configurator = propertyReader.property( OgmProperties.OPTION_CONFIGURATOR, OptionConfigurator.class )
        .instantiate()
        .getValue();

    if ( configurator != null ) {
      if ( programmaticOptions != null ) {
View Full Code Here

TOP

Related Classes of org.hibernate.ogm.cfg.OptionConfigurator

Copyright © 2018 www.massapicom. 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.