Search in sources :

Example 1 with XXPolicyLabelMapDao

use of org.apache.ranger.db.XXPolicyLabelMapDao in project ranger by apache.

the class ServiceDBStore method deleteExistingPolicyLabel.

private Boolean deleteExistingPolicyLabel(RangerPolicy policy) {
    if (policy == null) {
        return false;
    }
    List<XXPolicyLabelMap> xxPolicyLabelMaps = daoMgr.getXXPolicyLabelMap().findByPolicyId(policy.getId());
    XXPolicyLabelMapDao policyLabelMapDao = daoMgr.getXXPolicyLabelMap();
    for (XXPolicyLabelMap xxPolicyLabelMap : xxPolicyLabelMaps) {
        policyLabelMapDao.remove(xxPolicyLabelMap);
    }
    return true;
}
Also used : XXPolicyLabelMapDao(org.apache.ranger.db.XXPolicyLabelMapDao) XXPolicyLabelMap(org.apache.ranger.entity.XXPolicyLabelMap)

Aggregations

XXPolicyLabelMapDao (org.apache.ranger.db.XXPolicyLabelMapDao)1 XXPolicyLabelMap (org.apache.ranger.entity.XXPolicyLabelMap)1