mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Merge branch 'master' of https://github.com/wso2/carbon-device-mgt
This commit is contained in:
commit
3c99c9ec2c
@ -31,7 +31,7 @@ public class Device {
|
||||
private Long dateOfEnrolment;
|
||||
private Long dateOfLastUpdate;
|
||||
private String ownership;
|
||||
private boolean status;
|
||||
private Status status;
|
||||
private int deviceTypeId;
|
||||
private String deviceIdentifier;
|
||||
private String owner;
|
||||
@ -101,11 +101,11 @@ public class Device {
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public boolean isStatus() {
|
||||
public Status getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(boolean status) {
|
||||
public void setStatus(Status status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
|
||||
@ -126,11 +126,7 @@ public final class DeviceManagementDAOUtil {
|
||||
deviceBO.setId(device.getId());
|
||||
deviceBO.setOwner(device.getOwnerId());
|
||||
deviceBO.setOwnership(device.getOwnerShip());
|
||||
if (device.getStatus() == Status.ACTIVE) {
|
||||
deviceBO.setStatus(true);
|
||||
} else if (device.getStatus() == Status.INACTIVE) {
|
||||
deviceBO.setStatus(false);
|
||||
}
|
||||
deviceBO.setStatus(device.getStatus());
|
||||
return deviceBO;
|
||||
}
|
||||
|
||||
@ -141,12 +137,7 @@ public final class DeviceManagementDAOUtil {
|
||||
deviceBO.setName(device.getName());
|
||||
deviceBO.setDateOfEnrollment(device.getDateOfEnrolment());
|
||||
deviceBO.setDateOfLastUpdate(device.getDateOfLastUpdate());
|
||||
|
||||
if (!device.isStatus()) {
|
||||
deviceBO.setStatus(Status.INACTIVE);
|
||||
} else {
|
||||
deviceBO.setStatus(Status.ACTIVE);
|
||||
}
|
||||
deviceBO.setStatus(device.getStatus());
|
||||
deviceBO.setOwnerId(device.getOwner());
|
||||
deviceBO.setOwnerShip(device.getOwnership());
|
||||
deviceBO.setTenantId(DeviceManagementDAOUtil.getTenantId());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user