|
|
@@ -18,6 +18,7 @@ import javax.persistence.Table;
|
|
|
import javax.validation.constraints.NotNull;
|
|
|
import java.io.Serializable;
|
|
|
import java.sql.JDBCType;
|
|
|
+import java.util.Objects;
|
|
|
|
|
|
/**
|
|
|
* @author lifang
|
|
|
@@ -120,5 +121,38 @@ public class AliIotBridgeEntity extends GenericEntity<String> implements Record
|
|
|
private String version;
|
|
|
@NotNull
|
|
|
private String iotInstanceId;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public boolean equals(Object o) {
|
|
|
+ if (this == o) return true;
|
|
|
+ if (o == null || getClass() != o.getClass()) return false;
|
|
|
+ AccessConfig that = (AccessConfig) o;
|
|
|
+ return getProductKey().equals(that.getProductKey()) &&
|
|
|
+ getHttp2Endpoint().equals(that.getHttp2Endpoint()) &&
|
|
|
+ getAuthEndpoint().equals(that.getAuthEndpoint()) &&
|
|
|
+ getRegionId().equals(that.getRegionId()) &&
|
|
|
+ getAccessKey().equals(that.getAccessKey()) &&
|
|
|
+ getAccessSecret().equals(that.getAccessSecret()) &&
|
|
|
+ getIotInstanceId().equals(that.getIotInstanceId());
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int hashCode() {
|
|
|
+ return Objects.hash(getProductKey(), getHttp2Endpoint(), getAuthEndpoint(), getRegionId(), getAccessKey(), getAccessSecret(), getVersion(), getIotInstanceId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public boolean equals(Object o) {
|
|
|
+ if (this == o) return true;
|
|
|
+ if (o == null || getClass() != o.getClass()) return false;
|
|
|
+ AliIotBridgeEntity that = (AliIotBridgeEntity) o;
|
|
|
+ return Objects.equals(getAccessConfig(), that.getAccessConfig()) &&
|
|
|
+ Objects.equals(getId(), that.getId());
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int hashCode() {
|
|
|
+ return Objects.hash(getAccessConfig(), getNodeId());
|
|
|
}
|
|
|
}
|