mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Update operation DAO implementation
This commit is contained in:
parent
71713d4baf
commit
a32e811183
@ -142,10 +142,7 @@ public class OperationManagerImpl implements OperationManager {
|
|||||||
@Override
|
@Override
|
||||||
public Operation getNextPendingOperation(DeviceIdentifier deviceId) throws OperationManagementException {
|
public Operation getNextPendingOperation(DeviceIdentifier deviceId) throws OperationManagementException {
|
||||||
try {
|
try {
|
||||||
OperationManagementDAOFactory.beginTransaction();
|
|
||||||
Operation operation = operationDAO.getNextOperation(deviceId);
|
Operation operation = operationDAO.getNextOperation(deviceId);
|
||||||
operation = this.lookupOperationDAO(operation.getType()).getOperation(operation.getId());
|
|
||||||
OperationManagementDAOFactory.commitTransaction();
|
|
||||||
return operation;
|
return operation;
|
||||||
} catch (OperationManagementDAOException e) {
|
} catch (OperationManagementDAOException e) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@ -40,7 +40,7 @@ CREATE TABLE IF NOT EXISTS DM_CONFIG_OPERATION (
|
|||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS DM_COMMAND_OPERATION (
|
CREATE TABLE IF NOT EXISTS DM_COMMAND_OPERATION (
|
||||||
OPERATION_ID INTEGER NOT NULL,
|
OPERATION_ID INTEGER NOT NULL,
|
||||||
ENABLED INTEGER NOT NULL DEFAULT 0,
|
ENABLED BOOLEAN NOT NULL DEFAULT FALSE,
|
||||||
PRIMARY KEY (OPERATION_ID),
|
PRIMARY KEY (OPERATION_ID),
|
||||||
CONSTRAINT fk_dm_operation_command FOREIGN KEY (OPERATION_ID) REFERENCES
|
CONSTRAINT fk_dm_operation_command FOREIGN KEY (OPERATION_ID) REFERENCES
|
||||||
DM_OPERATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
|
DM_OPERATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user