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