File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
src/main/groovy/life/qbic/datamodel/dtos/general Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 77
88 <groupId >life.qbic</groupId >
99 <artifactId >data-model-lib</artifactId >
10- <version >2.22.0 </version >
10+ <version >2.23.0-SNAPSHOT </version >
1111 <name >data-model-lib</name >
1212 <url >http://github.com/qbicsoftware/data-model-lib</url >
1313 <description >Data models. A collection of QBiC's central data models and DTOs. </description >
Original file line number Diff line number Diff line change @@ -27,6 +27,12 @@ abstract class Person {
2727 */
2828 final int id
2929
30+ /**
31+ * Unique entity identifier (UUID)
32+ * @since 2.22.0
33+ */
34+ final String referenceId
35+
3036 /**
3137 * The person's first name
3238 */
@@ -66,12 +72,15 @@ abstract class Person {
6672
6773 List<Affiliation > affiliations
6874
75+ String referenceId
76+
6977 Builder (String firstName , String lastName , String emailAddress ) {
7078 this . firstName = Objects . requireNonNull(firstName, " First name must not be null" )
7179 this . lastName = Objects . requireNonNull(lastName, " Last name must not be null" )
7280 this . emailAddress = Objects . requireNonNull(emailAddress, " Email must not be null" )
7381 this . title = AcademicTitle . NONE
7482 this . affiliations = new ArrayList<> ()
83+ this . referenceId = UUID . randomUUID(). toString()
7584 }
7685
7786 T id (int id ) {
@@ -94,6 +103,11 @@ abstract class Person {
94103 return self()
95104 }
96105
106+ T referenceId (UUID id ) {
107+ this . referenceId = id. toString()
108+ return self()
109+ }
110+
97111 abstract Person build ()
98112
99113 /**
@@ -111,6 +125,7 @@ abstract class Person {
111125 emailAddress = builder. emailAddress
112126 title = builder. title
113127 affiliations = builder. affiliations
128+ referenceId = builder. referenceId
114129 }
115130
116131 /**
You can’t perform that action at this time.
0 commit comments