added sensortree

This commit is contained in:
snoop 2017-09-07 12:37:21 +09:00
parent 008f5f1a2d
commit 42491c808c
3 changed files with 7 additions and 4 deletions

View File

@ -41,7 +41,7 @@ public class GenerateUtil {
return resultMap;
}
resultMap = this.metaSensorItemKeyService.readAllByCrawler(metaCrawler);
resultMap = this.metaSensorItemKeyService.readAllMapByCrawler(metaCrawler);
this.mappingMap.put(metaCrawler.getId(), resultMap);
return resultMap;

View File

@ -13,15 +13,18 @@ import java.util.Map;
/**
* Created by snoop on 17. 8. 29.
*/
@Service
@Service("MetaSensorItemKeyService")
public class MetaSensorItemKeyService {
@Autowired
private MetaSensorItemKeyDAO metaSensorItemKeyDAO;
public List<MetaSensorItemKey> readAllByCrawler(MetaCrawler metaCrawler) {
return this.metaSensorItemKeyDAO.findAllByCrawler(metaCrawler);
}
public Map<Integer, MetaSensorItemKey> readAllByCrawler(MetaCrawler metaCrawler) {
public Map<Integer, MetaSensorItemKey> readAllMapByCrawler(MetaCrawler metaCrawler) {
Map<Integer, MetaSensorItemKey> resultMap = new HashMap<>();

View File

@ -28,7 +28,7 @@ public class MetaSensorItemKeyServiceTest {
MetaCrawler metaCrawler = new MetaCrawler();
metaCrawler.setId((short)11);
Map<Integer, MetaSensorItemKey> resultMap = this.metaSensorItemKeyService.readAllByCrawler(metaCrawler);
Map<Integer, MetaSensorItemKey> resultMap = this.metaSensorItemKeyService.readAllMapByCrawler(metaCrawler);
Assert.assertNotEquals(resultMap.size(), 0);