From c782dcd20c41ebba9933440eefbf0feaf7137350 Mon Sep 17 00:00:00 2001 From: jackdaw Date: Wed, 16 Nov 2016 15:24:52 +0900 Subject: [PATCH] . --- .../discoveryport/{entity => }/DiscoveryPort.java | 10 +++++----- .../{controller => }/DiscoveryPortController.java | 6 ++---- .../{repository => }/DiscoveryPortRepository.java | 3 +-- .../discoveryport/{entity => }/ServiceScanHistory.java | 4 ++-- .../{constant => type}/DirectionType.java | 2 +- .../discoveryport/{constant => type}/PortType.java | 2 +- .../discoveryservice/entity/DiscoveryService.java | 4 ++-- .../repository/DiscoveryPortRepositoryTest.java | 9 +++++---- .../repository/DiscoveryServiceRepositoryTest.java | 6 +++--- 9 files changed, 22 insertions(+), 24 deletions(-) rename src/main/java/com/loafle/bridge/discoveryport/{entity => }/DiscoveryPort.java (91%) rename src/main/java/com/loafle/bridge/discoveryport/{controller => }/DiscoveryPortController.java (84%) rename src/main/java/com/loafle/bridge/discoveryport/{repository => }/DiscoveryPortRepository.java (76%) rename src/main/java/com/loafle/bridge/discoveryport/{entity => }/ServiceScanHistory.java (95%) rename src/main/java/com/loafle/bridge/discoveryport/{constant => type}/DirectionType.java (85%) rename src/main/java/com/loafle/bridge/discoveryport/{constant => type}/PortType.java (84%) diff --git a/src/main/java/com/loafle/bridge/discoveryport/entity/DiscoveryPort.java b/src/main/java/com/loafle/bridge/discoveryport/DiscoveryPort.java similarity index 91% rename from src/main/java/com/loafle/bridge/discoveryport/entity/DiscoveryPort.java rename to src/main/java/com/loafle/bridge/discoveryport/DiscoveryPort.java index d5816c4..a0033f4 100644 --- a/src/main/java/com/loafle/bridge/discoveryport/entity/DiscoveryPort.java +++ b/src/main/java/com/loafle/bridge/discoveryport/DiscoveryPort.java @@ -1,6 +1,6 @@ -package com.loafle.bridge.discoveryport.entity; +package com.loafle.bridge.discoveryport; -import com.loafle.bridge.discoveryport.constant.PortType; +import com.loafle.bridge.discoveryport.type.PortType; import com.loafle.bridge.discoveryservice.entity.DiscoveryService; import javax.persistence.*; @@ -29,7 +29,7 @@ public class DiscoveryPort { private PortType portType; @Column(nullable = false) - private short portNumber; + private int portNumber; @OneToMany(mappedBy = "port") private List histories; @@ -75,11 +75,11 @@ public class DiscoveryPort { this.portType = portType; } - public short getPortNumber() { + public int getPortNumber() { return portNumber; } - public void setPortNumber(short portNumber) { + public void setPortNumber(int portNumber) { this.portNumber = portNumber; } diff --git a/src/main/java/com/loafle/bridge/discoveryport/controller/DiscoveryPortController.java b/src/main/java/com/loafle/bridge/discoveryport/DiscoveryPortController.java similarity index 84% rename from src/main/java/com/loafle/bridge/discoveryport/controller/DiscoveryPortController.java rename to src/main/java/com/loafle/bridge/discoveryport/DiscoveryPortController.java index 9d1bd9c..7cbff39 100644 --- a/src/main/java/com/loafle/bridge/discoveryport/controller/DiscoveryPortController.java +++ b/src/main/java/com/loafle/bridge/discoveryport/DiscoveryPortController.java @@ -1,8 +1,6 @@ -package com.loafle.bridge.discoveryport.controller; +package com.loafle.bridge.discoveryport; -import com.loafle.bridge.discoveryport.constant.PortType; -import com.loafle.bridge.discoveryport.entity.DiscoveryPort; -import com.loafle.bridge.discoveryport.repository.DiscoveryPortRepository; +import com.loafle.bridge.discoveryport.type.PortType; import com.loafle.bridge.discoveryservice.entity.DiscoveryService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PathVariable; diff --git a/src/main/java/com/loafle/bridge/discoveryport/repository/DiscoveryPortRepository.java b/src/main/java/com/loafle/bridge/discoveryport/DiscoveryPortRepository.java similarity index 76% rename from src/main/java/com/loafle/bridge/discoveryport/repository/DiscoveryPortRepository.java rename to src/main/java/com/loafle/bridge/discoveryport/DiscoveryPortRepository.java index 537299d..6b8ba8a 100644 --- a/src/main/java/com/loafle/bridge/discoveryport/repository/DiscoveryPortRepository.java +++ b/src/main/java/com/loafle/bridge/discoveryport/DiscoveryPortRepository.java @@ -1,6 +1,5 @@ -package com.loafle.bridge.discoveryport.repository; +package com.loafle.bridge.discoveryport; -import com.loafle.bridge.discoveryport.entity.DiscoveryPort; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.rest.core.annotation.RepositoryRestResource; diff --git a/src/main/java/com/loafle/bridge/discoveryport/entity/ServiceScanHistory.java b/src/main/java/com/loafle/bridge/discoveryport/ServiceScanHistory.java similarity index 95% rename from src/main/java/com/loafle/bridge/discoveryport/entity/ServiceScanHistory.java rename to src/main/java/com/loafle/bridge/discoveryport/ServiceScanHistory.java index d52cc1b..57b61a0 100644 --- a/src/main/java/com/loafle/bridge/discoveryport/entity/ServiceScanHistory.java +++ b/src/main/java/com/loafle/bridge/discoveryport/ServiceScanHistory.java @@ -1,6 +1,6 @@ -package com.loafle.bridge.discoveryport.entity; +package com.loafle.bridge.discoveryport; -import com.loafle.bridge.discoveryport.constant.DirectionType; +import com.loafle.bridge.discoveryport.type.DirectionType; import javax.persistence.*; import java.util.Date; diff --git a/src/main/java/com/loafle/bridge/discoveryport/constant/DirectionType.java b/src/main/java/com/loafle/bridge/discoveryport/type/DirectionType.java similarity index 85% rename from src/main/java/com/loafle/bridge/discoveryport/constant/DirectionType.java rename to src/main/java/com/loafle/bridge/discoveryport/type/DirectionType.java index 9592114..ea7e5f6 100644 --- a/src/main/java/com/loafle/bridge/discoveryport/constant/DirectionType.java +++ b/src/main/java/com/loafle/bridge/discoveryport/type/DirectionType.java @@ -1,4 +1,4 @@ -package com.loafle.bridge.discoveryport.constant; +package com.loafle.bridge.discoveryport.type; /** * Created by root on 16. 11. 15. diff --git a/src/main/java/com/loafle/bridge/discoveryport/constant/PortType.java b/src/main/java/com/loafle/bridge/discoveryport/type/PortType.java similarity index 84% rename from src/main/java/com/loafle/bridge/discoveryport/constant/PortType.java rename to src/main/java/com/loafle/bridge/discoveryport/type/PortType.java index 62966b1..0fdac82 100644 --- a/src/main/java/com/loafle/bridge/discoveryport/constant/PortType.java +++ b/src/main/java/com/loafle/bridge/discoveryport/type/PortType.java @@ -1,4 +1,4 @@ -package com.loafle.bridge.discoveryport.constant; +package com.loafle.bridge.discoveryport.type; /** * Created by root on 16. 11. 15. diff --git a/src/main/java/com/loafle/bridge/discoveryservice/entity/DiscoveryService.java b/src/main/java/com/loafle/bridge/discoveryservice/entity/DiscoveryService.java index 3a4058a..b7c65ea 100644 --- a/src/main/java/com/loafle/bridge/discoveryservice/entity/DiscoveryService.java +++ b/src/main/java/com/loafle/bridge/discoveryservice/entity/DiscoveryService.java @@ -1,7 +1,7 @@ package com.loafle.bridge.discoveryservice.entity; -import com.loafle.bridge.discoveryport.constant.PortType; -import com.loafle.bridge.discoveryport.entity.DiscoveryPort; +import com.loafle.bridge.discoveryport.DiscoveryPort; +import com.loafle.bridge.discoveryport.type.PortType; import javax.persistence.*; import java.util.Date; diff --git a/src/test/java/com/loafle/bridge/discoveryport/repository/DiscoveryPortRepositoryTest.java b/src/test/java/com/loafle/bridge/discoveryport/repository/DiscoveryPortRepositoryTest.java index 01452d5..2c683af 100644 --- a/src/test/java/com/loafle/bridge/discoveryport/repository/DiscoveryPortRepositoryTest.java +++ b/src/test/java/com/loafle/bridge/discoveryport/repository/DiscoveryPortRepositoryTest.java @@ -1,10 +1,11 @@ package com.loafle.bridge.discoveryport.repository; import com.loafle.bridge.Application; -import com.loafle.bridge.discoveryport.constant.DirectionType; -import com.loafle.bridge.discoveryport.constant.PortType; -import com.loafle.bridge.discoveryport.entity.DiscoveryPort; -import com.loafle.bridge.discoveryport.entity.ServiceScanHistory; +import com.loafle.bridge.discoveryport.DiscoveryPort; +import com.loafle.bridge.discoveryport.DiscoveryPortRepository; +import com.loafle.bridge.discoveryport.ServiceScanHistory; +import com.loafle.bridge.discoveryport.type.DirectionType; +import com.loafle.bridge.discoveryport.type.PortType; import org.apache.log4j.Logger; import org.junit.After; import org.junit.Before; diff --git a/src/test/java/com/loafle/bridge/discoveryservice/repository/DiscoveryServiceRepositoryTest.java b/src/test/java/com/loafle/bridge/discoveryservice/repository/DiscoveryServiceRepositoryTest.java index 94eb6e6..e306abb 100644 --- a/src/test/java/com/loafle/bridge/discoveryservice/repository/DiscoveryServiceRepositoryTest.java +++ b/src/test/java/com/loafle/bridge/discoveryservice/repository/DiscoveryServiceRepositoryTest.java @@ -1,9 +1,9 @@ package com.loafle.bridge.discoveryservice.repository; import com.loafle.bridge.Application; -import com.loafle.bridge.discoveryport.constant.PortType; -import com.loafle.bridge.discoveryport.entity.DiscoveryPort; -import com.loafle.bridge.discoveryport.repository.DiscoveryPortRepository; +import com.loafle.bridge.discoveryport.DiscoveryPort; +import com.loafle.bridge.discoveryport.DiscoveryPortRepository; +import com.loafle.bridge.discoveryport.type.PortType; import com.loafle.bridge.discoveryservice.entity.DiscoveryService; import org.apache.log4j.Logger; import org.junit.After;