11package de .rwth .idsg .steve .repository .impl ;
22
3- import com .google .common .base .Optional ;
43import de .rwth .idsg .steve .SteveException ;
54import de .rwth .idsg .steve .repository .AddressRepository ;
65import de .rwth .idsg .steve .repository .UserRepository ;
2423import org .springframework .stereotype .Repository ;
2524
2625import java .util .List ;
26+ import java .util .Optional ;
2727
2828import static de .rwth .idsg .steve .utils .CustomDSL .includes ;
2929import static jooq .steve .db .tables .OcppTag .OCPP_TAG ;
@@ -43,15 +43,15 @@ public class UserRepositoryImpl implements UserRepository {
4343 @ Override
4444 public List <User .Overview > getOverview (UserQueryForm form ) {
4545 return getOverviewInternal (form )
46- .map (r -> User .Overview .builder ()
47- .userPk (r .value1 ())
48- .ocppTagPk (r .value2 ())
49- .ocppIdTag (r .value3 ())
50- .name (r .value4 () + " " + r .value5 ())
51- .phone (r .value6 ())
52- .email (r .value7 ())
53- .build ()
54- );
46+ .map (r -> User .Overview .builder ()
47+ .userPk (r .value1 ())
48+ .ocppTagPk (r .value2 ())
49+ .ocppIdTag (r .value3 ())
50+ .name (r .value4 () + " " + r .value5 ())
51+ .phone (r .value6 ())
52+ .email (r .value7 ())
53+ .build ()
54+ );
5555 }
5656
5757 @ Override
@@ -74,7 +74,7 @@ public User.Details getDetails(int userPk) {
7474 // -------------------------------------------------------------------------
7575
7676 AddressRecord ar = addressRepository .get (ctx , ur .getAddressPk ());
77-
77+
7878 // -------------------------------------------------------------------------
7979 // 3. ocpp_tag table
8080 // -------------------------------------------------------------------------
@@ -94,7 +94,7 @@ public User.Details getDetails(int userPk) {
9494 return User .Details .builder ()
9595 .userRecord (ur )
9696 .address (ar )
97- .ocppIdTag (Optional .fromNullable (ocppIdTag ))
97+ .ocppIdTag (Optional .ofNullable (ocppIdTag ))
9898 .build ();
9999 }
100100
0 commit comments