Examples of WriteConcernType


Examples of org.hibernate.ogm.datastore.mongodb.options.WriteConcernType

   */
  private static final WriteConcernType DEFAULT_WRITE_CONCERN = WriteConcernType.ACKNOWLEDGED;

  @Override
  public WriteConcern getDefaultValue(ConfigurationPropertyReader propertyReader) {
    WriteConcernType writeConcernType = propertyReader.property( MongoDBProperties.WRITE_CONCERN, WriteConcernType.class )
      .withDefault( DEFAULT_WRITE_CONCERN )
      .getValue();

    // load/instantiate custom type
    if ( writeConcernType == WriteConcernType.CUSTOM ) {
      return propertyReader.property( MongoDBProperties.WRITE_CONCERN_TYPE, WriteConcern.class )
        .instantiate()
        .required()
        .getValue();
    }
    // take pre-defined value
    else {
      return writeConcernType.getWriteConcern();
    }
  }
View Full Code Here

Examples of org.hibernate.ogm.datastore.mongodb.options.WriteConcernType

   */
  private static final WriteConcernType DEFAULT_WRITE_CONCERN = WriteConcernType.ACKNOWLEDGED;

  @Override
  public WriteConcern getDefaultValue(ConfigurationPropertyReader propertyReader) {
    WriteConcernType writeConcernType = propertyReader.property( MongoDBProperties.WRITE_CONCERN, WriteConcernType.class )
      .withDefault( DEFAULT_WRITE_CONCERN )
      .getValue();

    // load/instantiate custom type
    if ( writeConcernType == WriteConcernType.CUSTOM ) {
      return propertyReader.property( MongoDBProperties.WRITE_CONCERN_TYPE, WriteConcern.class )
        .instantiate()
        .required()
        .getValue();
    }
    // take pre-defined value
    else {
      return writeConcernType.getWriteConcern();
    }
  }
View Full Code Here

Examples of org.hibernate.ogm.datastore.mongodb.options.WriteConcernType

   */
  private static final WriteConcernType DEFAULT_WRITE_CONCERN = WriteConcernType.ACKNOWLEDGED;

  @Override
  public WriteConcern getDefaultValue(ConfigurationPropertyReader propertyReader) {
    WriteConcernType writeConcernType = propertyReader.property( MongoDBProperties.WRITE_CONCERN, WriteConcernType.class )
      .withDefault( DEFAULT_WRITE_CONCERN )
      .getValue();

    // load/instantiate custom type
    if ( writeConcernType == WriteConcernType.CUSTOM ) {
      return propertyReader.property( MongoDBProperties.WRITE_CONCERN_TYPE, WriteConcern.class )
        .instantiate()
        .required()
        .getValue();
    }
    // take pre-defined value
    else {
      return writeConcernType.getWriteConcern();
    }
  }
View Full Code Here

Examples of org.hibernate.ogm.datastore.mongodb.options.WriteConcernType

   */
  private static final WriteConcernType DEFAULT_WRITE_CONCERN = WriteConcernType.ACKNOWLEDGED;

  @Override
  public WriteConcern getDefaultValue(ConfigurationPropertyReader propertyReader) {
    WriteConcernType writeConcernType = propertyReader.property( MongoDBProperties.WRITE_CONCERN, WriteConcernType.class )
      .withDefault( DEFAULT_WRITE_CONCERN )
      .getValue();

    // load/instantiate custom type
    if ( writeConcernType == WriteConcernType.CUSTOM ) {
      return propertyReader.property( MongoDBProperties.WRITE_CONCERN_TYPE, WriteConcern.class )
        .instantiate()
        .required()
        .getValue();
    }
    // take pre-defined value
    else {
      return writeConcernType.getWriteConcern();
    }
  }
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.