diff --git a/src/main/java/at/rtr/rmbt/mapper/impl/CellLocationMapperImpl.java b/src/main/java/at/rtr/rmbt/mapper/impl/CellLocationMapperImpl.java index 5df8f53..8f7e4b5 100644 --- a/src/main/java/at/rtr/rmbt/mapper/impl/CellLocationMapperImpl.java +++ b/src/main/java/at/rtr/rmbt/mapper/impl/CellLocationMapperImpl.java @@ -16,7 +16,7 @@ public CellLocation cellLocationRequestToCellLocation(CellLocationRequest cellLo .test(test) .openTestUUID(test.getOpenTestUuid()) .areaCode(cellLocationRequest.getAreaCode()) - .locationId(cellLocationRequest.getLocationId() == null ? null : cellLocationRequest.getLocationId().intValue()) + .locationId(cellLocationRequest.getLocationId()) .primaryScramblingCode(cellLocationRequest.getPrimaryScramblingCode()) .time(TimeUtils.getZonedDateTimeFromMillisAndTimezone(cellLocationRequest.getTime(), test.getTimezone())) .timeNs(cellLocationRequest.getTimeNs()) diff --git a/src/main/java/at/rtr/rmbt/model/CellLocation.java b/src/main/java/at/rtr/rmbt/model/CellLocation.java index 69df0ba..057cd17 100644 --- a/src/main/java/at/rtr/rmbt/model/CellLocation.java +++ b/src/main/java/at/rtr/rmbt/model/CellLocation.java @@ -28,10 +28,10 @@ public class CellLocation { private UUID openTestUUID; @Column(name = "location_id") - private Integer locationId; + private Long locationId; @Column(name = "area_code") - private Integer areaCode; + private Long areaCode; @Column(name = "primary_scrambling_code") private Integer primaryScramblingCode; diff --git a/src/main/java/at/rtr/rmbt/model/RadioCell.java b/src/main/java/at/rtr/rmbt/model/RadioCell.java index 1fc45b7..1076a94 100644 --- a/src/main/java/at/rtr/rmbt/model/RadioCell.java +++ b/src/main/java/at/rtr/rmbt/model/RadioCell.java @@ -48,7 +48,7 @@ public class RadioCell implements Serializable { private Long locationId; @Column(name = "area_code") - private Integer areaCode; + private Long areaCode; @Column(name = "primary_scrambling_code") private Integer primaryScramblingCode; diff --git a/src/main/java/at/rtr/rmbt/model/Test.java b/src/main/java/at/rtr/rmbt/model/Test.java index 9537aa6..6219a8e 100644 --- a/src/main/java/at/rtr/rmbt/model/Test.java +++ b/src/main/java/at/rtr/rmbt/model/Test.java @@ -442,10 +442,10 @@ public class Test implements Serializable { private Integer landCoverObsolete; @Column(name = "cell_location_id") - private Integer cellLocationId; + private Long cellLocationId; @Column(name = "cell_area_code") - private Integer cellAreaCode; + private Long cellAreaCode; @Column(name = "link_distance_obsolete") private Integer linkDistanceObsolete; diff --git a/src/main/java/at/rtr/rmbt/request/CellLocationRequest.java b/src/main/java/at/rtr/rmbt/request/CellLocationRequest.java index f8d6f97..79ab82b 100644 --- a/src/main/java/at/rtr/rmbt/request/CellLocationRequest.java +++ b/src/main/java/at/rtr/rmbt/request/CellLocationRequest.java @@ -18,7 +18,7 @@ public class CellLocationRequest { private final Long timeNs; @JsonProperty(value = "area_code") - private final Integer areaCode; + private final Long areaCode; @JsonProperty(value = "location_id") private final Long locationId; diff --git a/src/main/java/at/rtr/rmbt/request/RadioCellRequest.java b/src/main/java/at/rtr/rmbt/request/RadioCellRequest.java index c5bbc96..3e09f25 100644 --- a/src/main/java/at/rtr/rmbt/request/RadioCellRequest.java +++ b/src/main/java/at/rtr/rmbt/request/RadioCellRequest.java @@ -15,7 +15,7 @@ public class RadioCellRequest { private final boolean active; @JsonProperty(value = "area_code") - private final Integer areaCode; + private final Long areaCode; @JsonProperty(value = "location_id") private final Long locationId; diff --git a/src/main/java/at/rtr/rmbt/response/SignalStrengthResponse.java b/src/main/java/at/rtr/rmbt/response/SignalStrengthResponse.java index faf0b70..d3df8e7 100644 --- a/src/main/java/at/rtr/rmbt/response/SignalStrengthResponse.java +++ b/src/main/java/at/rtr/rmbt/response/SignalStrengthResponse.java @@ -22,7 +22,7 @@ public class SignalStrengthResponse { private final String signalStrength; @JsonProperty(value = "ci") - private final Integer ci; + private final Long ci; @JsonProperty(value = "tac") private final Long tac; diff --git a/src/main/java/at/rtr/rmbt/service/impl/RadioCellServiceImpl.java b/src/main/java/at/rtr/rmbt/service/impl/RadioCellServiceImpl.java index a10dd90..b93cb89 100644 --- a/src/main/java/at/rtr/rmbt/service/impl/RadioCellServiceImpl.java +++ b/src/main/java/at/rtr/rmbt/service/impl/RadioCellServiceImpl.java @@ -28,9 +28,9 @@ public void processRadioCellRequests(Collection cells, Test te Integer radioBand = null; boolean channelChanged = false; Integer channelNumber = null; - Integer locationId = null; + Long locationId = null; boolean areaCodeChanged = false; - Integer areaCode = null; + Long areaCode = null; boolean locationIdChanged = false; List newRadioCells = new ArrayList<>(); @@ -48,10 +48,10 @@ public void processRadioCellRequests(Collection cells, Test te if (newRadioCell.getTechnology() != NetworkGroupName.WLAN) { if (locationId == null && !locationIdChanged && newRadioCell.getLocationId() != null) { - locationId = newRadioCell.getLocationId().intValue(); + locationId = newRadioCell.getLocationId(); } else { if (!locationIdChanged && locationId != null && newRadioCell.getLocationId() != null && - !locationId.equals(newRadioCell.getLocationId().intValue())) { + !locationId.equals(newRadioCell.getLocationId())) { locationIdChanged = true; locationId = null; } diff --git a/src/test/java/at/rtr/rmbt/TestConstants.java b/src/test/java/at/rtr/rmbt/TestConstants.java index ab1676e..bbf2dfd 100644 --- a/src/test/java/at/rtr/rmbt/TestConstants.java +++ b/src/test/java/at/rtr/rmbt/TestConstants.java @@ -153,10 +153,10 @@ public interface TestConstants { String DEFAULT_MCC_MNC = "1-05"; String DEFAULT_COUNTRY_AT = "AT"; String DEFAULT_COUNTRY_NO = "NO"; - Integer DEFAULT_LOCATION_ID = 4; + Long DEFAULT_LOCATION_ID = 4L; Long DEFAULT_LOCATION_ID_LONG = 4L; - Integer DEFAULT_AREA_CODE_FIRST = 3; - Integer DEFAULT_AREA_CODE_SECOND = 65; + Long DEFAULT_AREA_CODE_FIRST = 3L; + Long DEFAULT_AREA_CODE_SECOND = 65L; Integer DEFAULT_PRIMARY_SCRAMBLING_CODE = 2147483647; NetworkGroupName DEFAULT_TECHNOLOGY_FIRST = NetworkGroupName.G2; NetworkGroupName DEFAULT_TECHNOLOGY_SECOND = NetworkGroupName.G3; diff --git a/src/test/java/at/rtr/rmbt/mapper/impl/CellLocationMapperImplTest.java b/src/test/java/at/rtr/rmbt/mapper/impl/CellLocationMapperImplTest.java index dd35d0a..6da5ee7 100644 --- a/src/test/java/at/rtr/rmbt/mapper/impl/CellLocationMapperImplTest.java +++ b/src/test/java/at/rtr/rmbt/mapper/impl/CellLocationMapperImplTest.java @@ -31,7 +31,7 @@ public void cellLocationRequestToCellLocation_whenCommonData_expectCellLocation( when(test.getOpenTestUuid()).thenReturn(TestConstants.DEFAULT_TEST_UUID); when(test.getTimezone()).thenReturn(TestConstants.DEFAULT_TIMEZONE); when(cellLocationRequest.getAreaCode()).thenReturn(TestConstants.DEFAULT_AREA_CODE_FIRST); - when(cellLocationRequest.getLocationId()).thenReturn(TestConstants.DEFAULT_LOCATION_ID.longValue()); + when(cellLocationRequest.getLocationId()).thenReturn(TestConstants.DEFAULT_LOCATION_ID); when(cellLocationRequest.getPrimaryScramblingCode()).thenReturn(TestConstants.DEFAULT_PRIMARY_SCRAMBLING_CODE); when(cellLocationRequest.getTimeNs()).thenReturn(TestConstants.DEFAULT_TIME_NS); when(cellLocationRequest.getTime()).thenReturn(TestConstants.DEFAULT_TIME_INSTANT); diff --git a/src/test/java/at/rtr/rmbt/service/impl/RadioCellServiceImplTest.java b/src/test/java/at/rtr/rmbt/service/impl/RadioCellServiceImplTest.java index 92ad65e..5a7bce2 100644 --- a/src/test/java/at/rtr/rmbt/service/impl/RadioCellServiceImplTest.java +++ b/src/test/java/at/rtr/rmbt/service/impl/RadioCellServiceImplTest.java @@ -87,7 +87,7 @@ public void processRadioCellRequests_whenLocationNotChangedAndAreaCodeNotChanged verify(radioCellRepository).saveAll(List.of(radioCellFirst, radioCellSecond)); verify(test).setRadioBand(TestConstants.DEFAULT_BAND); - verify(test).setCellLocationId(TestConstants.DEFAULT_GEO_LOCATION_UID_FIRST.intValue()); + verify(test).setCellLocationId(TestConstants.DEFAULT_GEO_LOCATION_UID_FIRST); verify(test).setCellAreaCode(TestConstants.DEFAULT_AREA_CODE_FIRST); verify(test).setChannelNumber(TestConstants.DEFAULT_CHANNEL_NUMBER_FIRST); }