|
|
|
@ -20,7 +20,7 @@ package org.wso2.carbon.device.mgt.common;
|
|
|
|
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
|
|
|
|
|
|
|
public class EnrolmentInfo implements Serializable{
|
|
|
|
|
public class EnrolmentInfo implements Serializable {
|
|
|
|
|
|
|
|
|
|
private static final long serialVersionUID = 1998101712L;
|
|
|
|
|
|
|
|
|
@ -40,7 +40,8 @@ public class EnrolmentInfo implements Serializable{
|
|
|
|
|
private Status status;
|
|
|
|
|
private String owner;
|
|
|
|
|
|
|
|
|
|
public EnrolmentInfo() {}
|
|
|
|
|
public EnrolmentInfo() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public EnrolmentInfo(Device device, String owner, OwnerShip ownership, Status status) {
|
|
|
|
|
this.device = device;
|
|
|
|
@ -109,11 +110,9 @@ public class EnrolmentInfo implements Serializable{
|
|
|
|
|
public boolean equals(Object obj) {
|
|
|
|
|
if (obj instanceof EnrolmentInfo) {
|
|
|
|
|
EnrolmentInfo tempInfo = (EnrolmentInfo) obj;
|
|
|
|
|
if (owner != null && ownership != null) {
|
|
|
|
|
if (tempInfo.getOwner() != null && tempInfo.getOwnership() != null) {
|
|
|
|
|
if (owner.equals(tempInfo.getOwner()) && ownership.equals(tempInfo.getOwnership())) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
if (this.owner != null && this.ownership != null) {
|
|
|
|
|
if (this.owner.equals(tempInfo.getOwner()) && this.ownership.equals(tempInfo.getOwnership())) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|