org.jnosql.artemis.configuration.ConfigurableImpl Maven / Gradle / Ivy
/*
* Copyright (c) 2017 Otávio Santana and others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Apache License v2.0 which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Apache License v2.0 is available at http://www.opensource.org/licenses/apache2.0.php.
*
* You may elect to redistribute this code under either of these licenses.
*
* Contributors:
*
* Otavio Santana
*/
package org.jnosql.artemis.configuration;
import java.util.Map;
import java.util.Objects;
/**
* The class that represents configuration in JSON
*/
public class ConfigurableImpl implements Configurable {
private String name;
private String description;
private String provider;
private Map settings;
@Override
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
@Override
public String getProvider() {
return provider;
}
public void setProvider(String provider) {
this.provider = provider;
}
@Override
public Map getSettings() {
return settings;
}
public void setSettings(Map settings) {
this.settings = settings;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof ConfigurableImpl)) {
return false;
}
ConfigurableImpl that = (ConfigurableImpl) o;
return Objects.equals(name, that.name) &&
Objects.equals(description, that.description) &&
Objects.equals(provider, that.provider) &&
Objects.equals(settings, that.settings);
}
@Override
public int hashCode() {
return Objects.hash(name, description, provider, settings);
}
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("ConfigurableJSON{");
sb.append("name='").append(name).append('\'');
sb.append(", description='").append(description).append('\'');
sb.append(", provider='").append(provider).append('\'');
sb.append(", settings=").append(settings);
sb.append('}');
return sb.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy