private final String password;
private final boolean createDatabase;
private final AssociationStorageType associationStorage;
public DocumentStoreConfiguration(Map<?, ?> configurationValues, int defaultPort) {
ConfigurationPropertyReader propertyReader = new ConfigurationPropertyReader( configurationValues );
this.host = propertyReader.property( OgmProperties.HOST, String.class )
.withDefault( DEFAULT_HOST )
.getValue();
this.port = propertyReader.property( OgmProperties.PORT, int.class )
.withDefault( defaultPort )
.withValidator( Validators.PORT )
.getValue();
this.databaseName = propertyReader.property( OgmProperties.DATABASE, String.class )
.required()
.getValue();
this.username = propertyReader.property( OgmProperties.USERNAME, String.class ).getValue();
this.password = propertyReader.property( OgmProperties.PASSWORD, String.class ).getValue();
this.createDatabase = propertyReader.property( OgmProperties.CREATE_DATABASE, boolean.class )
.withDefault( false )
.getValue();
associationStorage = propertyReader.property( DocumentStoreProperties.ASSOCIATIONS_STORE, AssociationStorageType.class )
.withDefault( DEFAULT_ASSOCIATION_STORAGE )
.getValue();
}