Пример #1
0
 @OnLoad
 public void onLoad(Result<Boolean> result) {
   Objects.requireNonNull(db);
   db.load(
       User.EMPTY,
       result.from(
           u -> {
             this.user = u;
             return true;
           }));
 }
Пример #2
0
 @OnSave
 public void save(Result<Boolean> result) {
   db.save(this.user, result);
 }