--- /dev/null
+/*******************************************************************************\r
+ * ============LICENSE_START==================================================\r
+ * * org.onap.dmaap\r
+ * * ===========================================================================\r
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.\r
+ * * ===========================================================================\r
+ * * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * * you may not use this file except in compliance with the License.\r
+ * * You may obtain a copy of the License at\r
+ * * \r
+ * * http://www.apache.org/licenses/LICENSE-2.0\r
+ * * \r
+ * * Unless required by applicable law or agreed to in writing, software\r
+ * * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * * See the License for the specific language governing permissions and\r
+ * * limitations under the License.\r
+ * * ============LICENSE_END====================================================\r
+ * *\r
+ * * ECOMP is a trademark and service mark of AT&T Intellectual Property.\r
+ * *\r
+ ******************************************************************************/\r
+\r
+\r
+package org.onap.dmaap.datarouter.provisioning.beans;\r
+\r
+import java.sql.ResultSet;\r
+import java.sql.SQLException;\r
+\r
+import org.json.JSONObject;\r
+\r
+/**\r
+ * The representation of a Feed endpoint. This contains a login/password pair.\r
+ * @author Robert Eby\r
+ * @version $Id: FeedEndpointID.java,v 1.1 2013/04/26 21:00:26 eby Exp $\r
+ */\r
+public class FeedEndpointID implements JSONable {\r
+ private String id;\r
+ private String password;\r
+\r
+ public FeedEndpointID() {\r
+ this("", "");\r
+ }\r
+ public FeedEndpointID(String id, String password) {\r
+ this.id = id;\r
+ this.password = password;\r
+ }\r
+ public FeedEndpointID(ResultSet rs) throws SQLException {\r
+ this.id = rs.getString("USERID");\r
+ this.password = rs.getString("PASSWORD");\r
+ }\r
+\r
+ public String getId() {\r
+ return id;\r
+ }\r
+\r
+ public void setId(String id) {\r
+ this.id = id;\r
+ }\r
+\r
+ public String getPassword() {\r
+ return password;\r
+ }\r
+\r
+ public void setPassword(String password) {\r
+ this.password = password;\r
+ }\r
+\r
+ @Override\r
+ public JSONObject asJSONObject() {\r
+ JSONObject jo = new JSONObject();\r
+ jo.put("id", id);\r
+ jo.put("password", password);\r
+ return jo;\r
+ }\r
+ @Override\r
+ public boolean equals(Object obj) {\r
+ if (!(obj instanceof FeedEndpointID))\r
+ return false;\r
+ FeedEndpointID f2 = (FeedEndpointID) obj;\r
+ return id.equals(f2.id) && password.equals(f2.password);\r
+ }\r
+ @Override\r
+ public int hashCode() {\r
+ return (id + ":" + password).hashCode();\r
+ }\r
+}\r