Examples of OptionConfigurator


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

Examples of org.hibernate.ogm.cfg.OptionConfigurator

  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

Examples of org.hibernate.ogm.cfg.spi.OptionConfigurator

  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

Examples of org.hibernate.ogm.cfg.spi.OptionConfigurator

  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

Examples of org.hibernate.ogm.cfg.spi.OptionConfigurator

    OptionsServiceContext context = propertyReader.property( InternalProperties.OGM_OPTION_CONTEXT, OptionsServiceContext.class )
        .instantiate()
        .withClassLoaderService( classLoaderService )
        .getValue();
    OptionConfigurator configurator = propertyReader.property( OgmProperties.OPTION_CONFIGURATOR, OptionConfigurator.class )
        .instantiate()
        .withClassLoaderService( classLoaderService )
        .getValue();

    if ( context != null && configurator != null ) {
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.