File tree Expand file tree Collapse file tree 6 files changed +17
-20
lines changed
backend/src/main/java/gov/cdc/usds/simplereport/db/model Expand file tree Collapse file tree 6 files changed +17
-20
lines changed Original file line number Diff line number Diff line change 1
1
package gov .cdc .usds .simplereport .db .model ;
2
2
3
3
import gov .cdc .usds .simplereport .api .model .accountrequest .OrganizationAccountRequest ;
4
- import io .hypersistence .utils .hibernate .type .json .JsonBinaryType ;
5
4
import jakarta .persistence .Column ;
6
5
import jakarta .persistence .Entity ;
7
6
import jakarta .persistence .FetchType ;
10
9
import jakarta .persistence .Table ;
11
10
import lombok .Getter ;
12
11
import lombok .NoArgsConstructor ;
13
- import org .hibernate .annotations .Type ;
12
+ import org .hibernate .annotations .JdbcTypeCode ;
13
+ import org .hibernate .type .SqlTypes ;
14
14
import org .springframework .boot .context .properties .bind .ConstructorBinding ;
15
15
16
16
@ Entity
@@ -26,7 +26,7 @@ public class OrganizationQueueItem extends EternalAuditedEntity {
26
26
private String externalId ;
27
27
28
28
@ Column (nullable = false )
29
- @ Type ( JsonBinaryType . class )
29
+ @ JdbcTypeCode ( SqlTypes . JSON )
30
30
private OrganizationAccountRequest requestData ;
31
31
32
32
@ OneToOne (optional = true , fetch = FetchType .LAZY )
Original file line number Diff line number Diff line change 1
1
package gov .cdc .usds .simplereport .db .model ;
2
2
3
3
import gov .cdc .usds .simplereport .db .model .auxiliary .AskOnEntrySurvey ;
4
- import io .hypersistence .utils .hibernate .type .json .JsonBinaryType ;
5
4
import jakarta .persistence .Column ;
6
5
import jakarta .persistence .Entity ;
7
- import org .hibernate .annotations .Type ;
6
+ import org .hibernate .annotations .JdbcTypeCode ;
7
+ import org .hibernate .type .SqlTypes ;
8
8
9
9
@ Entity
10
10
public class PatientAnswers extends AuditedEntity {
11
11
@ Column
12
- @ Type ( JsonBinaryType . class )
12
+ @ JdbcTypeCode ( SqlTypes . JSON )
13
13
private AskOnEntrySurvey askOnEntry ;
14
14
15
15
protected PatientAnswers () {
Original file line number Diff line number Diff line change 9
9
import gov .cdc .usds .simplereport .db .model .auxiliary .StreetAddress ;
10
10
import gov .cdc .usds .simplereport .db .model .auxiliary .TestResultDeliveryPreference ;
11
11
import io .hypersistence .utils .hibernate .type .array .ListArrayType ;
12
- import io .hypersistence .utils .hibernate .type .json .JsonBinaryType ;
13
12
import jakarta .persistence .Column ;
14
13
import jakarta .persistence .Embedded ;
15
14
import jakarta .persistence .Entity ;
@@ -75,7 +74,7 @@ public class Person extends OrganizationScopedEternalEntity implements PersonEnt
75
74
* https://github.com/CDCgov/prime-data-hub/blob/master/prime-router/metadata/valuesets/tribal.valuesets
76
75
*/
77
76
@ Getter
78
- @ Type ( JsonBinaryType . class )
77
+ @ JdbcTypeCode ( SqlTypes . JSON )
79
78
@ Column
80
79
private List <String > tribalAffiliation ;
81
80
Original file line number Diff line number Diff line change 1
1
package gov .cdc .usds .simplereport .db .model ;
2
2
3
3
import gov .cdc .usds .simplereport .db .model .auxiliary .PermissionsData ;
4
- import io .hypersistence .utils .hibernate .type .json .JsonBinaryType ;
5
4
import jakarta .persistence .Column ;
6
5
import jakarta .persistence .Entity ;
7
6
import jakarta .persistence .FetchType ;
8
7
import jakarta .persistence .JoinColumn ;
9
8
import jakarta .persistence .ManyToOne ;
10
9
import java .util .Date ;
11
- import org .hibernate .annotations .Type ;
10
+ import org .hibernate .annotations .JdbcTypeCode ;
11
+ import org .hibernate .type .SqlTypes ;
12
12
13
13
@ Entity
14
14
public class TenantDataAccess extends EternalAuditedEntity {
@@ -25,7 +25,7 @@ public class TenantDataAccess extends EternalAuditedEntity {
25
25
26
26
// contains the authorities to be loaded into Authentication
27
27
@ Column (nullable = false )
28
- @ Type ( JsonBinaryType . class )
28
+ @ JdbcTypeCode ( SqlTypes . JSON )
29
29
private PermissionsData permissionsData ;
30
30
31
31
@ Column (nullable = false )
Original file line number Diff line number Diff line change 9
9
import gov .cdc .usds .simplereport .db .model .auxiliary .AskOnEntrySurvey ;
10
10
import gov .cdc .usds .simplereport .db .model .auxiliary .TestCorrectionStatus ;
11
11
import gov .cdc .usds .simplereport .db .model .auxiliary .TestResult ;
12
- import io .hypersistence .utils .hibernate .type .json .JsonBinaryType ;
13
12
import jakarta .persistence .AttributeOverride ;
14
13
import jakarta .persistence .CascadeType ;
15
14
import jakarta .persistence .Column ;
27
26
import lombok .extern .slf4j .Slf4j ;
28
27
import org .hibernate .Hibernate ;
29
28
import org .hibernate .annotations .Immutable ;
30
- import org .hibernate .annotations .Type ;
29
+ import org .hibernate .annotations .JdbcTypeCode ;
30
+ import org .hibernate .type .SqlTypes ;
31
31
32
32
@ Getter
33
33
@ Entity
38
38
@ Slf4j
39
39
public class TestEvent extends BaseTestInfo {
40
40
@ Column
41
- @ Type ( JsonBinaryType . class )
41
+ @ JdbcTypeCode ( SqlTypes . JSON )
42
42
private Person patientData ;
43
43
44
44
@ Column
45
- @ Type ( JsonBinaryType . class )
45
+ @ JdbcTypeCode ( SqlTypes . JSON )
46
46
private Provider providerData ;
47
47
48
48
@ Column
49
- @ Type ( JsonBinaryType . class )
49
+ @ JdbcTypeCode ( SqlTypes . JSON )
50
50
private AskOnEntrySurvey surveyData ;
51
51
52
52
@ JsonIgnore
Original file line number Diff line number Diff line change 3
3
import com .fasterxml .jackson .annotation .JsonIgnore ;
4
4
import gov .cdc .usds .simplereport .db .model .auxiliary .UploadStatus ;
5
5
import gov .cdc .usds .simplereport .service .model .reportstream .FeedbackMessage ;
6
- import io .hypersistence .utils .hibernate .type .json .JsonBinaryType ;
7
6
import jakarta .persistence .Column ;
8
7
import jakarta .persistence .Entity ;
9
8
import jakarta .persistence .EnumType ;
17
16
import lombok .Setter ;
18
17
import lombok .extern .slf4j .Slf4j ;
19
18
import org .hibernate .annotations .JdbcTypeCode ;
20
- import org .hibernate .annotations .Type ;
21
19
import org .hibernate .type .SqlTypes ;
22
20
23
21
@ Getter
@@ -43,11 +41,11 @@ public class TestResultUpload extends AuditedEntity {
43
41
private Organization organization ;
44
42
45
43
@ Column ()
46
- @ Type ( JsonBinaryType . class )
44
+ @ JdbcTypeCode ( SqlTypes . JSON )
47
45
private FeedbackMessage [] warnings ;
48
46
49
47
@ Column ()
50
- @ Type ( JsonBinaryType . class )
48
+ @ JdbcTypeCode ( SqlTypes . JSON )
51
49
private FeedbackMessage [] errors ;
52
50
53
51
protected TestResultUpload () {}
You can’t perform that action at this time.
0 commit comments