X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=datarouter-prov%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdatarouter%2Fprovisioning%2Fbeans%2FSubDelivery.java;h=e3a0dc0c5165f96f5ece9f6d6286bd6e353ec9df;hb=HEAD;hp=98981a30f10987a903d2f84a5bdf6e9dcb87b2cd;hpb=4ee1a5058de07e0177933850b1f8e80377365e5c;p=dmaap%2Fdatarouter.git diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/SubDelivery.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/SubDelivery.java index 98981a30..e3a0dc0c 100644 --- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/SubDelivery.java +++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/SubDelivery.java @@ -37,16 +37,20 @@ import org.json.JSONObject; * @author Robert Eby * @version $Id: SubDelivery.java,v 1.2 2013/06/20 14:11:05 eby Exp $ */ + public class SubDelivery implements JSONable { private String url; private String user; private String password; private boolean use100; - public SubDelivery() { - this("", "", "", false); - } - + /** + * SubDelivery constructor. + * @param url url string + * @param user user string + * @param password password string + * @param use100 use100 string + */ public SubDelivery(String url, String user, String password, boolean use100) { this.url = url; this.user = user; @@ -54,6 +58,11 @@ public class SubDelivery implements JSONable { this.use100 = use100; } + /** + * SubDelivery constructor. + * @param rs resultset from DB + * @throws SQLException in cse of SQL error + */ public SubDelivery(ResultSet rs) throws SQLException { this.url = rs.getString("DELIVERY_URL"); this.user = rs.getString("DELIVERY_USER"); @@ -90,10 +99,6 @@ public class SubDelivery implements JSONable { return use100; } - public void setUse100(boolean use100) { - this.use100 = use100; - } - @Override public JSONObject asJSONObject() { JSONObject jo = new JSONObject(); @@ -106,17 +111,22 @@ public class SubDelivery implements JSONable { @Override public boolean equals(Object obj) { - if (!(obj instanceof SubDelivery)) + if (!(obj instanceof SubDelivery)) { return false; + } SubDelivery os = (SubDelivery) obj; - if (!url.equals(os.url)) + if (!url.equals(os.url)) { return false; - if (!user.equals(os.user)) + } + if (!user.equals(os.user)) { return false; - if (!password.equals(os.password)) + } + if (!password.equals(os.password)) { return false; - if (use100 != os.use100) + } + if (use100 != os.use100) { return false; + } return true; }