@Override public void save(ClusterPolicy clusterPolicy) { super.save(clusterPolicy); List<ClusterPolicyUnit> clusterPolicyUnits = getclusterPolicyUnit(clusterPolicy); if (clusterPolicyUnits != null) { for (ClusterPolicyUnit clusterPolicyUnit : clusterPolicyUnits) { saveClusterPolicyUnit(clusterPolicyUnit); } } }
@Override public void update(ClusterPolicy clusterPolicy) { super.update(clusterPolicy); getCallsHandler() .executeModification( "DeleteClusterPolicyUnitsByClusterPolicyId", getCustomMapSqlParameterSource().addValue("id", clusterPolicy.getId())); List<ClusterPolicyUnit> clusterPolicyUnits = getclusterPolicyUnit(clusterPolicy); if (clusterPolicyUnits != null) { for (ClusterPolicyUnit clusterPolicyUnit : clusterPolicyUnits) { saveClusterPolicyUnit(clusterPolicyUnit); } } }