|
|
@ -442,7 +442,7 @@ public class PolicyDAOImpl implements PolicyDAO {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
conn = this.getConnection();
|
|
|
|
conn = this.getConnection();
|
|
|
|
String query = "INSERT INTO DM_CRITERIA (TENANT_ID, NAME) VALUES (?, ?)";
|
|
|
|
String query = "INSERT INTO DM_CRITERIA (TENANT_ID, NAME) VALUES (?, ?)";
|
|
|
|
stmt = conn.prepareStatement(query, Statement.RETURN_GENERATED_KEYS);
|
|
|
|
stmt = conn.prepareStatement(query, new String[] {"id"});
|
|
|
|
stmt.setInt(1, tenantId);
|
|
|
|
stmt.setInt(1, tenantId);
|
|
|
|
stmt.setString(2, criteria.getName());
|
|
|
|
stmt.setString(2, criteria.getName());
|
|
|
|
stmt.executeUpdate();
|
|
|
|
stmt.executeUpdate();
|
|
|
@ -622,7 +622,7 @@ public class PolicyDAOImpl implements PolicyDAO {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
conn = this.getConnection();
|
|
|
|
conn = this.getConnection();
|
|
|
|
String query = "INSERT INTO DM_POLICY_CRITERIA (CRITERIA_ID, POLICY_ID) VALUES (?, ?)";
|
|
|
|
String query = "INSERT INTO DM_POLICY_CRITERIA (CRITERIA_ID, POLICY_ID) VALUES (?, ?)";
|
|
|
|
stmt = conn.prepareStatement(query, Statement.RETURN_GENERATED_KEYS);
|
|
|
|
stmt = conn.prepareStatement(query, new String[] {"id"});
|
|
|
|
|
|
|
|
|
|
|
|
List<PolicyCriterion> criteria = policy.getPolicyCriterias();
|
|
|
|
List<PolicyCriterion> criteria = policy.getPolicyCriterias();
|
|
|
|
for (PolicyCriterion criterion : criteria) {
|
|
|
|
for (PolicyCriterion criterion : criteria) {
|
|
|
@ -1348,7 +1348,7 @@ public class PolicyDAOImpl implements PolicyDAO {
|
|
|
|
conn = this.getConnection();
|
|
|
|
conn = this.getConnection();
|
|
|
|
String query = "INSERT INTO DM_POLICY (NAME, PROFILE_ID, TENANT_ID, PRIORITY, COMPLIANCE, OWNERSHIP_TYPE," +
|
|
|
|
String query = "INSERT INTO DM_POLICY (NAME, PROFILE_ID, TENANT_ID, PRIORITY, COMPLIANCE, OWNERSHIP_TYPE," +
|
|
|
|
"UPDATED, ACTIVE, DESCRIPTION) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)";
|
|
|
|
"UPDATED, ACTIVE, DESCRIPTION) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)";
|
|
|
|
stmt = conn.prepareStatement(query, PreparedStatement.RETURN_GENERATED_KEYS);
|
|
|
|
stmt = conn.prepareStatement(query, new String[] {"id"});
|
|
|
|
|
|
|
|
|
|
|
|
stmt.setString(1, policy.getPolicyName());
|
|
|
|
stmt.setString(1, policy.getPolicyName());
|
|
|
|
stmt.setInt(2, policy.getProfile().getProfileId());
|
|
|
|
stmt.setInt(2, policy.getProfile().getProfileId());
|
|
|
|