Skip to content
This repository was archived by the owner on Aug 1, 2025. It is now read-only.

Commit b16b865

Browse files
committed
Switch client and plate id from uuid to string
1 parent 7d2fa27 commit b16b865

File tree

5 files changed

+44
-12
lines changed

5 files changed

+44
-12
lines changed

src/main/java/org/brapi/test/BrAPITestServer/model/entity/geno/PlateEntity.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
@Where(clause = "soft_deleted = false")
2020
public class PlateEntity extends BrAPIPrimaryEntity {
2121
@Column
22-
private UUID clientPlateDbId;
22+
private String clientPlateDbId;
2323
@Column
2424
private String clientPlateBarcode;
2525
@Column
@@ -93,10 +93,10 @@ public VendorPlateSubmissionEntity getSubmission() {
9393
public void setSubmission(VendorPlateSubmissionEntity submission) {
9494
this.submission = submission;
9595
}
96-
public UUID getClientPlateDbId() {
96+
public String getClientPlateDbId() {
9797
return clientPlateDbId;
9898
}
99-
public void setClientPlateDbId(UUID clientPlateDbId) {
99+
public void setClientPlateDbId(String clientPlateDbId) {
100100
this.clientPlateDbId = clientPlateDbId;
101101
}
102102
public String getClientPlateBarcode() {

src/main/java/org/brapi/test/BrAPITestServer/model/entity/geno/vendor/VendorOrderEntity.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
@Table(name = "vendor_order")
1515
public class VendorOrderEntity extends BrAPIPrimaryEntity {
1616
@Column
17-
private UUID clientPlateDbId;
17+
private String clientPlateDbId;
1818
@Column
1919
private String clientPlateBarcode;
2020
@Column
@@ -73,11 +73,11 @@ public void setPlateSubmission(VendorPlateSubmissionEntity plateSubmission) {
7373
this.plateSubmission = plateSubmission;
7474
}
7575

76-
public UUID getClientPlateDbId() {
76+
public String getClientPlateDbId() {
7777
return clientPlateDbId;
7878
}
7979

80-
public void setClientPlateDbId(UUID clientPlateDbId) {
80+
public void setClientPlateDbId(String clientPlateDbId) {
8181
this.clientPlateDbId = clientPlateDbId;
8282
}
8383

src/main/java/org/brapi/test/BrAPITestServer/model/entity/geno/vendor/VendorPlateSubmissionEntity.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
public class VendorPlateSubmissionEntity extends BrAPIPrimaryEntity {
1414

1515
@Column
16-
private UUID clientId;
16+
private String clientId;
1717
@Column
1818
private Integer numberOfSamples;
1919
@Column
@@ -30,10 +30,10 @@ public VendorOrderEntity getOrder() {
3030
public void setOrder(VendorOrderEntity order) {
3131
this.order = order;
3232
}
33-
public UUID getClientId() {
33+
public String getClientId() {
3434
return clientId;
3535
}
36-
public void setClientId(UUID clientId) {
36+
public void setClientId(String clientId) {
3737
this.clientId = clientId;
3838
}
3939
public Integer getNumberOfSamples() {

src/main/java/org/brapi/test/BrAPITestServer/service/geno/VendorSampleService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ private VendorPlateSubmissionPlates convertFromEntityToSummary(PlateEntity entit
161161
private VendorOrderEntity convertToEntity(VendorOrderSubmissionRequest request) {
162162
VendorOrderEntity entity = new VendorOrderEntity();
163163
entity.setClientPlateBarcode(request.getClientId());
164-
entity.setClientPlateDbId(UUID.fromString(request.getClientId()));
164+
entity.setClientPlateDbId(request.getClientId());
165165
entity.setRequiredServiceInfo(request.getRequiredServiceInfo());
166166
entity.setSampleType(request.getSampleType());
167167
entity.setServiceIds(request.getServiceIds());
@@ -190,7 +190,7 @@ private VendorPlateSubmissionEntity convertToEntity(VendorOrderSubmissionRequest
190190

191191
private PlateEntity convertToEntity(VendorPlateSubmissionRequestPlates newPlate) {
192192
PlateEntity plateEntity = new PlateEntity();
193-
plateEntity.setClientPlateDbId(UUID.fromString(newPlate.getClientPlateId()));
193+
plateEntity.setClientPlateDbId(newPlate.getClientPlateId());
194194
plateEntity.setStatusTimeStamp(new Date());
195195

196196
return plateEntity;
@@ -199,7 +199,7 @@ private PlateEntity convertToEntity(VendorPlateSubmissionRequestPlates newPlate)
199199
private VendorOrderEntity convertToEntity(VendorPlateSubmissionRequest request) {
200200
VendorOrderEntity entity = new VendorOrderEntity();
201201
entity.setClientPlateBarcode(request.getClientId());
202-
entity.setClientPlateDbId(UUID.fromString(request.getClientId()));
202+
entity.setClientPlateDbId(request.getClientId());
203203
entity.setSampleType(request.getSampleType());
204204
entity.setStatus(StatusEnum.RECEIVED);
205205
entity.setStatusTimeStamp(new Date());
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
-- See the NOTICE file distributed with this work for additional information
2+
-- regarding copyright ownership.
3+
--
4+
-- Licensed under the Apache License, Version 2.0 (the "License");
5+
-- you may not use this file except in compliance with the License.
6+
-- You may obtain a copy of the License at
7+
--
8+
-- http://www.apache.org/licenses/LICENSE-2.0
9+
--
10+
-- Unless required by applicable law or agreed to in writing, software
11+
-- distributed under the License is distributed on an "AS IS" BASIS,
12+
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
-- See the License for the specific language governing permissions and
14+
-- limitations under the License.
15+
16+
-- change client_plate_db_id back to text instead of forcing uuid
17+
ALTER TABLE vendor_order
18+
ALTER COLUMN client_plate_db_id
19+
TYPE text
20+
USING client_plate_db_id::text;
21+
22+
-- change client_id back to text instead of forcing uuid
23+
ALTER TABLE plate_submission
24+
ALTER COLUMN client_id
25+
TYPE text
26+
USING client_id::text;
27+
28+
-- change client_plate_db_id back to text instead of forcing uuid
29+
ALTER TABLE plate
30+
ALTER COLUMN client_plate_db_id
31+
TYPE text
32+
USING client_plate_db_id::text;

0 commit comments

Comments
 (0)