package org.jvalue.commons.couchdb;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

import org.jvalue.commons.auth.BasicCredentials;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;


public final class CouchDbConfig {

	@NotNull private final String url;
	@NotNull private final String dbPrefix;
	@NotNull @Valid BasicCredentials admin;

	@JsonCreator
	public CouchDbConfig(
			@JsonProperty("url") String url,
			@JsonProperty("dbPrefix") String dbPrefix,
			@JsonProperty("admin") BasicCredentials admin) {

		this.url = url;
		this.dbPrefix = dbPrefix;
		this.admin = admin;
	}


	public String getUrl() {
		return url;
	}


	public String getDbPrefix() {
		return dbPrefix;
	}


	public BasicCredentials getAdmin() {
		return admin;
	}

}
@@ -219,16 +219,57 @@
 .Valid;%0A
+import javax.validation.constraints.Min;%0A
 import j
@@ -305,16 +305,16 @@
 otNull;%0A
-
 %0A%0Apublic
@@ -437,16 +437,30 @@
  @Valid 
+private final 
 BasicCre
@@ -474,16 +474,59 @@
 s admin;
+%0A%09@Min(1) private final int maxConnections;
 %0A%0A%09@Json
@@ -686,16 +686,71 @@
 ls admin
+,%0A%09%09%09@JsonProperty(%22maxConnections%22) int maxConnections
 ) %7B%0A%0A%09%09t
@@ -810,24 +810,64 @@
 in = admin;%0A
+%09%09this.maxConnections = maxConnections;%0A
 %09%7D%0A%0A%0A%09public
@@ -993,24 +993,24 @@
 etAdmin() %7B%0A
-
 %09%09return adm
@@ -1017,9 +1017,73 @@
 in;%0A%09%7D%0A%0A
+%0A%09public int getMaxConnections() %7B%0A%09%09return maxConnections;%0A%09%7D%0A%0A
 %7D

add maxConnections to CouchDbConfig