Package org.hibernate.ogm.options.navigation.source.impl

Examples of org.hibernate.ogm.options.navigation.source.impl.ProgrammaticOptionValueSource


    new MongoDBConfiguration( new ConfigurationPropertyReader( cfg ), getGlobalOptions() );
  }

  private OptionsContext getGlobalOptions() {
    List<OptionValueSource> sources = Arrays.<OptionValueSource>asList(
        new ProgrammaticOptionValueSource( context ),
        new ConfigurationOptionValueSource( reader  )
    );

    return OptionsContextImpl.forGlobal( sources );
  }
View Full Code Here


    options = getSource().getPropertyOptions( ExampleForMongoDBMapping.class, "content" );
    assertThat( options.getUnique( WriteConcernOption.class ) ).isEqualTo( new ReplicaConfigurableWriteConcern( 4 ) );
  }

  private OptionValueSource getSource() {
    return new ProgrammaticOptionValueSource( context );
  }
View Full Code Here

    OptionsContainer options = getSource().getPropertyOptions( MyEntity.class, "content" );
    assertThat( options.getUnique( ReadPreferenceOption.class ) ).isEqualTo( ReadPreference.nearest() );
  }

  private OptionValueSource getSource() {
    return new ProgrammaticOptionValueSource( context );
  }
View Full Code Here

    new MongoDB().getConfigurationBuilder( configurationContext )
      .entity( ExampleForMongoDBMapping.class )
        .property( "content", ElementType.FIELD )
          .associationStorage( AssociationStorageType.ASSOCIATION_DOCUMENT );

    OptionsContainer options = new ProgrammaticOptionValueSource( context ).getPropertyOptions( ExampleForMongoDBMapping.class, "content" );
    assertThat( options.getUnique( AssociationStorageOption.class ) ).isEqualTo( AssociationStorageType.ASSOCIATION_DOCUMENT );
  }
View Full Code Here

    OptionsContainer refrigatorOptions = getSource().getEntityOptions( Refrigerator.class );
    assertThat( refrigatorOptions.getUnique( ForceExampleOption.class ) ).isFalse();
  }

  private OptionValueSource getSource() {
    return new ProgrammaticOptionValueSource( configurationContext );
  }
View Full Code Here

TOP

Related Classes of org.hibernate.ogm.options.navigation.source.impl.ProgrammaticOptionValueSource

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.