mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fixed issues in EnrollmentDAOImpl
This commit is contained in:
parent
2c7f38c4cc
commit
b25438097e
@ -71,7 +71,6 @@ public class EnrollmentDAOImpl implements EnrollmentDAO {
|
|||||||
PreparedStatement stmt = null;
|
PreparedStatement stmt = null;
|
||||||
ResultSet rs = null;
|
ResultSet rs = null;
|
||||||
int status = -1;
|
int status = -1;
|
||||||
int rows;
|
|
||||||
try {
|
try {
|
||||||
conn = this.getConnection();
|
conn = this.getConnection();
|
||||||
String sql = "UPDATE DM_ENROLMENT SET OWNERSHIP = ?, STATUS = ?, " +
|
String sql = "UPDATE DM_ENROLMENT SET OWNERSHIP = ?, STATUS = ?, " +
|
||||||
@ -86,12 +85,12 @@ public class EnrollmentDAOImpl implements EnrollmentDAO {
|
|||||||
stmt.setString(6, enrolmentInfo.getOwner());
|
stmt.setString(6, enrolmentInfo.getOwner());
|
||||||
stmt.setInt(7, tenantId);
|
stmt.setInt(7, tenantId);
|
||||||
stmt.setInt(8, enrolmentInfo.getId());
|
stmt.setInt(8, enrolmentInfo.getId());
|
||||||
rows = stmt.executeUpdate();
|
stmt.executeUpdate();
|
||||||
|
|
||||||
if (rows > 0) {
|
rs = stmt.getGeneratedKeys();
|
||||||
|
if (rs.next()) {
|
||||||
status = 1;
|
status = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
throw new DeviceManagementDAOException("Error occurred while updating enrolment configuration", e);
|
throw new DeviceManagementDAOException("Error occurred while updating enrolment configuration", e);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user