private boolean guaranteedDelivery;
private boolean guaranteedSequence;
private boolean privilegedSubscriber;
- private boolean decompressData;
+ private boolean decompress;
// NOTE: the following fields are optional in the API but not stored in the DB
this.setPrivilegedSubscriber(false);
}
try {
- this.setDecompressData((boolean) jsonObj.get("decompressData"));
+ this.setDecompress((boolean) jsonObj.get("decompress"));
} catch( NullPointerException npe ) {
- this.setDecompressData(false);
+ this.setDecompress(false);
}
JSONObject del = (JSONObject) jsonObj.get("delivery");
this.privilegedSubscriber = privilegedSubscriber;
}
- public boolean isDecompressData() {
- return decompressData;
+ public boolean isDecompress() {
+ return decompress;
}
- public void setDecompressData(boolean decompressData) {
- this.decompressData = decompressData;
+ public void setDecompress(boolean decompressData) {
+ this.decompress = decompressData;
}
public String getFeedName() {
,"0"
,"true"
,this.isPrivilegedSubscriber()
- ,this.isDecompressData()
+ ,this.isDecompress()
);
logger.info( postJSON );
@Override
public String toString() {
- String rc = String.format ( "DR_Sub: {dcaeLocationName=%s username=%s userpwd=%s feedId=%s deliveryURL=%s logURL=%s subid=%s use100=%s suspended=%s owner=%s}",
+ return String.format ( "DR_Sub: {dcaeLocationName=%s username=%s userpwd=%s feedId=%s deliveryURL=%s logURL=%s subid=%s use100=%s suspended=%s owner=%s}",
dcaeLocationName,
username,
userpwd,
suspended,
owner
);
- return rc;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+
+ DR_Sub drSub = (DR_Sub) o;
+
+ if (use100 != drSub.use100) {
+ return false;
+ }
+ if (suspended != drSub.suspended) {
+ return false;
+ }
+ if (!dcaeLocationName.equals(drSub.dcaeLocationName)) {
+ return false;
+ }
+ if (!username.equals(drSub.username)) {
+ return false;
+ }
+ if (!userpwd.equals(drSub.userpwd)) {
+ return false;
+ }
+ if (!feedId.equals(drSub.feedId)) {
+ return false;
+ }
+ return subId.equals(drSub.subId);
+ }
+
+ @Override
+ public int hashCode() {
+ int result = dcaeLocationName.hashCode();
+ result = 31 * result + username.hashCode();
+ result = 31 * result + userpwd.hashCode();
+ result = 31 * result + feedId.hashCode();
+ result = 31 * result + subId.hashCode();
+ result = 31 * result + (use100 ? 1 : 0);
+ result = 31 * result + (suspended ? 1 : 0);
+ return result;
}
}