Map<String, List<MetaSensorItemKey>> readAllByDisplayItems(List<MetaSensorDisplayItem> displayItems)
This commit is contained in:
parent
04df627e7a
commit
2f520dead7
|
@ -7,7 +7,9 @@ import com.loafle.overflow.module.sensor.model.SensorItemDependency;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by insanity on 17. 9. 20.
|
||||
|
@ -26,4 +28,16 @@ public class SensorItemDependencyService {
|
|||
public List<MetaSensorItemKey> readAllByDisplayItem(MetaSensorDisplayItem displayItem) {
|
||||
return this.sensorItemDependencyDAO.findAllByDisplayItem(displayItem);
|
||||
}
|
||||
|
||||
public Map<String, List<MetaSensorItemKey>> readAllByDisplayItems(List<MetaSensorDisplayItem> displayItems) {
|
||||
|
||||
Map<String, List<MetaSensorItemKey>> map = new HashMap<String, List<MetaSensorItemKey>>();
|
||||
|
||||
for (MetaSensorDisplayItem displayItem : displayItems) {
|
||||
List<MetaSensorItemKey> itemKeys = this.sensorItemDependencyDAO.findAllByDisplayItem(displayItem);
|
||||
map.put(displayItem.getKey(), itemKeys);
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user