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
|
||||
public Operation getNextPendingOperation(DeviceIdentifier deviceId) throws OperationManagementException {
|
||||
try {
|
||||
OperationManagementDAOFactory.beginTransaction();
|
||||
Operation operation = operationDAO.getNextOperation(deviceId);
|
||||
operation = this.lookupOperationDAO(operation.getType()).getOperation(operation.getId());
|
||||
OperationManagementDAOFactory.commitTransaction();
|
||||
return operation;
|
||||
} catch (OperationManagementDAOException e) {
|
||||
try {
|
||||
|
||||
@ -40,7 +40,7 @@ CREATE TABLE IF NOT EXISTS DM_CONFIG_OPERATION (
|
||||
|
||||
CREATE TABLE IF NOT EXISTS DM_COMMAND_OPERATION (
|
||||
OPERATION_ID INTEGER NOT NULL,
|
||||
ENABLED INTEGER NOT NULL DEFAULT 0,
|
||||
ENABLED BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
PRIMARY KEY (OPERATION_ID),
|
||||
CONSTRAINT fk_dm_operation_command FOREIGN KEY (OPERATION_ID) REFERENCES
|
||||
DM_OPERATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
|
||||
|
||||
Loading…
Reference in New Issue
Block a user