use of org.apache.ranger.entity.XXServiceVersionInfo in project ranger by apache.
the class XXServiceVersionInfoDao method updateTagVersionAndTagUpdateTime.
private void updateTagVersionAndTagUpdateTime(List<XXServiceVersionInfo> serviceVersionInfos, Date updateTime) {
if (CollectionUtils.isEmpty(serviceVersionInfos)) {
return;
}
if (updateTime == null) {
updateTime = new Date();
}
for (XXServiceVersionInfo serviceVersionInfo : serviceVersionInfos) {
Long currentTagVersion = serviceVersionInfo.getTagVersion();
if (currentTagVersion == null) {
currentTagVersion = Long.valueOf(0);
}
serviceVersionInfo.setTagVersion(currentTagVersion + 1);
serviceVersionInfo.setTagUpdateTime(updateTime);
}
}
Aggregations