org.scassandra.http.client.AlreadyExistsConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-client Show documentation
Show all versions of java-client Show documentation
Allows Java applications to use Scassandra
package org.scassandra.http.client;
import java.util.Map;
import com.google.common.collect.ImmutableMap;
import org.scassandra.server.priming.ErrorConstants;
public class AlreadyExistsConfig extends Config {
private String keyspace;
private String table;
private String message;
public AlreadyExistsConfig(String keyspace) {
this(keyspace, "");
}
public AlreadyExistsConfig(String keyspace, String table) {
this(keyspace, table, null);
}
public AlreadyExistsConfig(String keyspace, String table, String message) {
this.keyspace = keyspace;
this.table = table;
this.message = message;
}
@Override
Map getProperties() {
ImmutableMap.Builder mapBuilder = ImmutableMap.builder();
mapBuilder.put(ErrorConstants.Keyspace(), keyspace);
mapBuilder.put(ErrorConstants.Table(), table);
if(message != null) {
mapBuilder.put(ErrorConstants.Message(), message);
}
return mapBuilder.build();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy