ums 연동 작성중
This commit is contained in:
+14
@@ -35,6 +35,20 @@ public class MonitoringPropertyService
|
||||
return property.map(MonitoringProperty::getPrpty2Val).orElse(null);
|
||||
}
|
||||
|
||||
public String getPropertyValue(String prptyGroupName, String prptyName, String defaultValue) {
|
||||
MonitoringPropertyId id = new MonitoringPropertyId();
|
||||
id.setPrptyGroupName(prptyGroupName);
|
||||
id.setPrptyName(prptyName);
|
||||
|
||||
Optional<MonitoringProperty> property = repository.findById(id);
|
||||
if (property.isPresent() && !property.get().getPrpty2Val().isEmpty()) {
|
||||
return property.get().getPrpty2Val();
|
||||
} else {
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Iterable<MonitoringProperty> findAllByIdPrptyName(String prptyName) {
|
||||
BooleanExpression predicate = QMonitoringProperty.monitoringProperty.id.prptyName.eq(prptyName);
|
||||
return repository.findAll(predicate);
|
||||
|
||||
Reference in New Issue
Block a user