findAllByProbeInAndTargetNotNull

This commit is contained in:
crusader 2018-06-06 00:26:10 +09:00
parent e731aedf33
commit 7a7982e316
5 changed files with 459 additions and 457 deletions

View File

@ -19,10 +19,10 @@ public interface InfraDAO extends JpaRepository<Infra, Long> {
Page<Infra> findAllByProbeId(Long probeID, Pageable pageable);
Page<Infra> findAllByProbeInAndTargetNotNull(List<Probe> probes, Pageable pageable);
Page<Infra> findAllByProbeIn(List<Probe> probes, Pageable pageable);
List<Target> findAllTargetByProbeIn(List<Probe> probes);
Infra findByTargetId(Long targetID);
// Infra findByTargetId(Long targetID);
}

View File

@ -9,5 +9,5 @@ import org.springframework.stereotype.Repository;
*/
@Repository
public interface InfraOSPortDAO extends JpaRepository<InfraOSPort, Long> {
InfraOSPort findByInfraOSIdAndPortAndPortType(Long infraOSId, Integer port, String portType);
InfraOSPort findByInfraOSAndPortAndPortType(Long infraOSId, Integer port, String portType);
}

View File

@ -26,6 +26,6 @@ public class CentralInfraOSPortService implements InfraOSPortService {
public InfraOSPort readByInfraOSIDAndPortAndPortType(Long infraOSID, Integer port, String portType)
throws OverflowException {
return this.infraOSPortDAO.findByInfraOSIdAndPortAndPortType(infraOSID, port, portType);
return this.infraOSPortDAO.findByInfraOSAndPortAndPortType(infraOSID, port, portType);
}
}

View File

@ -53,7 +53,7 @@ public class CentralInfraService implements InfraService {
throw new OverflowException("ProbeNotFoundException", new Throwable());
}
Page<Infra> infraList = this.infraDAO.findAllByProbeInAndTargetNotNull(probeList, PageUtil.getPageRequest(pageParams));
Page<Infra> infraList = this.infraDAO.findAllByProbeIn(probeList, PageUtil.getPageRequest(pageParams));
return infraList;
}
@ -74,7 +74,8 @@ public class CentralInfraService implements InfraService {
}
public Infra readByTargetID(Long targetID) throws OverflowException {
return this.infraDAO.findByTargetId(targetID);
// return this.infraDAO.findByTargetId(targetID);
return null;
}
}

File diff suppressed because it is too large Load Diff