@@ -25,7 +25,6 @@ public class StudentProfileAttributes extends EntityAttributes<StudentProfile> {
25
25
public String nationality ;
26
26
public Gender gender ;
27
27
public String moreInfo ;
28
- public String pictureKey ;
29
28
public Instant modifiedDate ;
30
29
31
30
private StudentProfileAttributes (String googleId ) {
@@ -36,7 +35,6 @@ private StudentProfileAttributes(String googleId) {
36
35
this .nationality = "" ;
37
36
this .gender = Gender .OTHER ;
38
37
this .moreInfo = "" ;
39
- this .pictureKey = "" ;
40
38
this .modifiedDate = Instant .now ();
41
39
}
42
40
@@ -59,9 +57,6 @@ public static StudentProfileAttributes valueOf(StudentProfile sp) {
59
57
if (sp .getMoreInfo () != null ) {
60
58
studentProfileAttributes .moreInfo = sp .getMoreInfo ();
61
59
}
62
- if (sp .getPictureKey () != null ) {
63
- studentProfileAttributes .pictureKey = sp .getPictureKey ();
64
- }
65
60
if (sp .getModifiedDate () != null ) {
66
61
studentProfileAttributes .modifiedDate = sp .getModifiedDate ();
67
62
}
@@ -85,7 +80,6 @@ public StudentProfileAttributes getCopy() {
85
80
studentProfileAttributes .gender = gender ;
86
81
studentProfileAttributes .nationality = nationality ;
87
82
studentProfileAttributes .moreInfo = moreInfo ;
88
- studentProfileAttributes .pictureKey = pictureKey ;
89
83
studentProfileAttributes .modifiedDate = modifiedDate ;
90
84
91
85
return studentProfileAttributes ;
@@ -119,10 +113,6 @@ public String getMoreInfo() {
119
113
return moreInfo ;
120
114
}
121
115
122
- public String getPictureKey () {
123
- return pictureKey ;
124
- }
125
-
126
116
public Instant getModifiedDate () {
127
117
return modifiedDate ;
128
118
}
@@ -153,8 +143,6 @@ public List<String> getInvalidityInfo() {
153
143
154
144
Assumption .assertNotNull (gender );
155
145
156
- Assumption .assertNotNull (this .pictureKey );
157
-
158
146
// No validation for modified date as it is determined by the system.
159
147
// No validation for More Info. It will properly sanitized.
160
148
@@ -170,7 +158,7 @@ public String toString() {
170
158
public int hashCode () {
171
159
StringBuilder stringBuilder = new StringBuilder ();
172
160
stringBuilder .append (this .email ).append (this .shortName ).append (this .institute )
173
- .append (this .googleId ).append (this .pictureKey ). append ( this . gender .toString ());
161
+ .append (this .googleId ).append (this .gender .toString ());
174
162
return stringBuilder .toString ().hashCode ();
175
163
}
176
164
@@ -186,7 +174,6 @@ public boolean equals(Object other) {
186
174
&& Objects .equals (this .shortName , otherProfile .shortName )
187
175
&& Objects .equals (this .institute , otherProfile .institute )
188
176
&& Objects .equals (this .googleId , otherProfile .googleId )
189
- && Objects .equals (this .pictureKey , otherProfile .pictureKey )
190
177
&& Objects .equals (this .gender , otherProfile .gender );
191
178
} else {
192
179
return false ;
@@ -196,7 +183,7 @@ public boolean equals(Object other) {
196
183
@ Override
197
184
public StudentProfile toEntity () {
198
185
return new StudentProfile (googleId , shortName , email , institute , nationality , gender .name ().toLowerCase (),
199
- moreInfo , this . pictureKey );
186
+ moreInfo );
200
187
}
201
188
202
189
@ Override
@@ -214,7 +201,6 @@ public void update(UpdateOptions updateOptions) {
214
201
updateOptions .nationalityOption .ifPresent (s -> nationality = s );
215
202
updateOptions .genderOption .ifPresent (s -> gender = s );
216
203
updateOptions .moreInfoOption .ifPresent (s -> moreInfo = s );
217
- updateOptions .pictureKeyOption .ifPresent (s -> pictureKey = s );
218
204
}
219
205
220
206
/**
@@ -280,7 +266,6 @@ public static class UpdateOptions {
280
266
private UpdateOption <String > nationalityOption = UpdateOption .empty ();
281
267
private UpdateOption <Gender > genderOption = UpdateOption .empty ();
282
268
private UpdateOption <String > moreInfoOption = UpdateOption .empty ();
283
- private UpdateOption <String > pictureKeyOption = UpdateOption .empty ();
284
269
285
270
private UpdateOptions (String googleId ) {
286
271
Assumption .assertNotNull (googleId );
@@ -380,13 +365,6 @@ public B withMoreInfo(String moreInfo) {
380
365
return thisBuilder ;
381
366
}
382
367
383
- public B withPictureKey (String pictureKey ) {
384
- Assumption .assertNotNull (pictureKey );
385
-
386
- updateOptions .pictureKeyOption = UpdateOption .of (pictureKey );
387
- return thisBuilder ;
388
- }
389
-
390
368
public abstract T build ();
391
369
392
370
}
0 commit comments