mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fix for SQL query issue in mysql
This commit is contained in:
parent
65ed6c2f6e
commit
7212e969d8
@ -76,7 +76,7 @@ public class CommandOperationDAOImpl extends GenericOperationDAOImpl {
|
|||||||
try {
|
try {
|
||||||
super.deleteOperation(id);
|
super.deleteOperation(id);
|
||||||
Connection connection = OperationManagementDAOFactory.getConnection();
|
Connection connection = OperationManagementDAOFactory.getConnection();
|
||||||
stmt = connection.prepareStatement("DELETE DM_COMMAND_OPERATION WHERE OPERATION_ID = ?");
|
stmt = connection.prepareStatement("DELETE FROM DM_COMMAND_OPERATION WHERE OPERATION_ID = ?");
|
||||||
stmt.setInt(1, id);
|
stmt.setInt(1, id);
|
||||||
stmt.executeUpdate();
|
stmt.executeUpdate();
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
|
|||||||
@ -64,7 +64,7 @@ public class ConfigOperationDAOImpl extends GenericOperationDAOImpl {
|
|||||||
try {
|
try {
|
||||||
super.deleteOperation(id);
|
super.deleteOperation(id);
|
||||||
Connection connection = OperationManagementDAOFactory.getConnection();
|
Connection connection = OperationManagementDAOFactory.getConnection();
|
||||||
stmt = connection.prepareStatement("DELETE DM_CONFIG_OPERATION WHERE OPERATION_ID = ?") ;
|
stmt = connection.prepareStatement("DELETE FROM DM_CONFIG_OPERATION WHERE OPERATION_ID = ?") ;
|
||||||
stmt.setInt(1, id);
|
stmt.setInt(1, id);
|
||||||
stmt.executeUpdate();
|
stmt.executeUpdate();
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
@ -82,7 +82,7 @@ public class ConfigOperationDAOImpl extends GenericOperationDAOImpl {
|
|||||||
try {
|
try {
|
||||||
super.updateOperation(operation);
|
super.updateOperation(operation);
|
||||||
Connection connection = OperationManagementDAOFactory.getConnection();
|
Connection connection = OperationManagementDAOFactory.getConnection();
|
||||||
stmt = connection.prepareStatement("UPDATE DM_CONFIG_OPERATION SET OPERATION_CONFIG = ? " +
|
stmt = connection.prepareStatement("UPDATE FROM DM_CONFIG_OPERATION SET OPERATION_CONFIG = ? " +
|
||||||
"WHERE OPERATION_ID = ?");
|
"WHERE OPERATION_ID = ?");
|
||||||
bao = new ByteArrayOutputStream();
|
bao = new ByteArrayOutputStream();
|
||||||
oos = new ObjectOutputStream(bao);
|
oos = new ObjectOutputStream(bao);
|
||||||
|
|||||||
@ -622,7 +622,7 @@ public class GenericOperationDAOImpl implements OperationDAO {
|
|||||||
PreparedStatement stmt = null;
|
PreparedStatement stmt = null;
|
||||||
try {
|
try {
|
||||||
Connection connection = OperationManagementDAOFactory.getConnection();
|
Connection connection = OperationManagementDAOFactory.getConnection();
|
||||||
stmt = connection.prepareStatement("DELETE DM_OPERATION WHERE ID = ?");
|
stmt = connection.prepareStatement("DELETE FROM DM_OPERATION WHERE ID = ?");
|
||||||
stmt.setInt(1, id);
|
stmt.setInt(1, id);
|
||||||
stmt.executeUpdate();
|
stmt.executeUpdate();
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
|
|||||||
@ -128,7 +128,7 @@ public class PolicyOperationDAOImpl extends GenericOperationDAOImpl {
|
|||||||
try {
|
try {
|
||||||
super.deleteOperation(operationId);
|
super.deleteOperation(operationId);
|
||||||
Connection connection = OperationManagementDAOFactory.getConnection();
|
Connection connection = OperationManagementDAOFactory.getConnection();
|
||||||
stmt = connection.prepareStatement("DELETE DM_POLICY_OPERATION WHERE OPERATION_ID=?");
|
stmt = connection.prepareStatement("DELETE FROM DM_POLICY_OPERATION WHERE OPERATION_ID=?");
|
||||||
stmt.setInt(1, operationId);
|
stmt.setInt(1, operationId);
|
||||||
stmt.executeUpdate();
|
stmt.executeUpdate();
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
|
|||||||
@ -129,7 +129,7 @@ public class ProfileOperationDAOImpl extends GenericOperationDAOImpl {
|
|||||||
try {
|
try {
|
||||||
super.deleteOperation(id);
|
super.deleteOperation(id);
|
||||||
Connection connection = OperationManagementDAOFactory.getConnection();
|
Connection connection = OperationManagementDAOFactory.getConnection();
|
||||||
stmt = connection.prepareStatement("DELETE DM_PROFILE_OPERATION WHERE OPERATION_ID=?");
|
stmt = connection.prepareStatement("DELETE FROM DM_PROFILE_OPERATION WHERE OPERATION_ID=?");
|
||||||
stmt.setInt(1, id);
|
stmt.setInt(1, id);
|
||||||
stmt.executeUpdate();
|
stmt.executeUpdate();
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user