added meta
This commit is contained in:
parent
b4323c6ea9
commit
6d2c50d953
|
@ -1,13 +1,17 @@
|
|||
package com.loafle.overflow.module.meta.dao;
|
||||
|
||||
import com.loafle.overflow.module.meta.model.MetaProbeOs;
|
||||
import com.loafle.overflow.module.meta.model.MetaProbePackage;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by insanity on 17. 6. 23.
|
||||
*/
|
||||
@Repository
|
||||
public interface MetaProbePackageDAO extends JpaRepository<MetaProbePackage, Long> {
|
||||
|
||||
List<MetaProbePackage> findAllByOs(MetaProbeOs metaProbeOs);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
import com.loafle.overflow.module.meta.dao.MetaProbePackageDAO;
|
||||
import com.loafle.overflow.module.meta.model.MetaProbeOs;
|
||||
import com.loafle.overflow.module.meta.model.MetaProbePackage;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
@Service("MetaProbePackageService")
|
||||
public class MetaProbePackageService {
|
||||
|
||||
@Autowired
|
||||
private MetaProbePackageDAO probePackageDAO;
|
||||
|
||||
public List<MetaProbePackage> readAllByOs(MetaProbeOs metaProbeOs) {
|
||||
return this.probePackageDAO.findAllByOs(metaProbeOs);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
import com.loafle.overflow.module.meta.dao.MetaProbeStatusDAO;
|
||||
import com.loafle.overflow.module.meta.model.MetaProbeStatus;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
@Service("MetaProbeStatusService")
|
||||
public class MetaProbeStatusService {
|
||||
|
||||
@Autowired
|
||||
private MetaProbeStatusDAO probeStatusDAO;
|
||||
|
||||
public List<MetaProbeStatus> readAll() {
|
||||
return this.probeStatusDAO.findAll();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
import com.loafle.overflow.module.meta.dao.MetaProbeTaskTypeDAO;
|
||||
import com.loafle.overflow.module.meta.model.MetaProbeTaskType;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
@Service("MetaProbeTaskTypeService")
|
||||
public class MetaProbeTaskTypeService {
|
||||
|
||||
@Autowired
|
||||
private MetaProbeTaskTypeDAO probeTaskTypeDAO;
|
||||
|
||||
public List<MetaProbeTaskType> readAll() {
|
||||
return this.probeTaskTypeDAO.findAll();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
import com.loafle.overflow.module.meta.model.MetaProbeOs;
|
||||
import com.loafle.overflow.module.meta.model.MetaProbePackage;
|
||||
import com.loafle.overflow.spring.AppConfig;
|
||||
import com.loafle.overflow.spring.JdbcConfiguration;
|
||||
import com.loafle.overflow.spring.MailConfiguration;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(classes = {AppConfig.class, JdbcConfiguration.class, MailConfiguration.class})
|
||||
public class MetaProbePackageServiceTest {
|
||||
|
||||
@Autowired
|
||||
private MetaProbePackageService probePackageService;
|
||||
|
||||
@Test
|
||||
public void readAllByOs() throws Exception {
|
||||
|
||||
MetaProbeOs metaProbeOs = new MetaProbeOs();
|
||||
metaProbeOs.setId((short)1);
|
||||
|
||||
List<MetaProbePackage> metaProbePackages = this.probePackageService.readAllByOs(metaProbeOs);
|
||||
|
||||
Assert.assertNotEquals(metaProbePackages.size(), 0);
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
import com.loafle.overflow.module.meta.model.MetaProbeStatus;
|
||||
import com.loafle.overflow.spring.AppConfig;
|
||||
import com.loafle.overflow.spring.JdbcConfiguration;
|
||||
import com.loafle.overflow.spring.MailConfiguration;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(classes = {AppConfig.class, JdbcConfiguration.class, MailConfiguration.class})
|
||||
public class MetaProbeStatusServiceTest {
|
||||
|
||||
@Autowired
|
||||
private MetaProbeStatusService probeStatusService;
|
||||
|
||||
@Test
|
||||
public void readAll() throws Exception {
|
||||
|
||||
List<MetaProbeStatus> metaProbeStatuses = this.probeStatusService.readAll();
|
||||
|
||||
Assert.assertNotEquals(metaProbeStatuses.size(), 0);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
import com.loafle.overflow.module.meta.model.MetaProbeTaskType;
|
||||
import com.loafle.overflow.spring.AppConfig;
|
||||
import com.loafle.overflow.spring.JdbcConfiguration;
|
||||
import com.loafle.overflow.spring.MailConfiguration;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(classes = {AppConfig.class, JdbcConfiguration.class, MailConfiguration.class})
|
||||
public class MetaProbeTaskTypeServiceTest {
|
||||
|
||||
@Autowired
|
||||
private MetaProbeTaskTypeService probeTaskTypeService;
|
||||
|
||||
@Test
|
||||
public void readAll() throws Exception {
|
||||
|
||||
List<MetaProbeTaskType> probeTaskTypes = this.probeTaskTypeService.readAll();
|
||||
|
||||
Assert.assertNotEquals(probeTaskTypes.size(), 0 );
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user