use of org.apache.ranger.plugin.model.RangerBaseModelObject in project ranger by apache.
the class AbstractPredicateUtil method applyFilter.
public void applyFilter(List<? extends RangerBaseModelObject> objList, SearchFilter filter) {
if (CollectionUtils.isEmpty(objList)) {
return;
}
Predicate pred = getPredicate(filter);
if (pred != null) {
CollectionUtils.filter(objList, pred);
}
Comparator<RangerBaseModelObject> sorter = getSorter(filter);
if (sorter != null) {
Collections.sort(objList, sorter);
}
}
use of org.apache.ranger.plugin.model.RangerBaseModelObject in project ranger by apache.
the class ServiceUtil method dataObjectToRangerObject.
private RangerBaseModelObject dataObjectToRangerObject(VXDataObject dataObject, RangerBaseModelObject rangerObject) {
RangerBaseModelObject ret = rangerObject;
ret.setId(dataObject.getId());
ret.setCreateTime(dataObject.getCreateDate());
ret.setUpdateTime(dataObject.getUpdateDate());
ret.setCreatedBy(dataObject.getOwner());
ret.setUpdatedBy(dataObject.getUpdatedBy());
return ret;
}
Aggregations