Advertisement
Guest User

Untitled

a guest
Sep 16th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. public void write(final Flugplan flugplan, final ConfluenceUser user) {
  2. String flugplanJson = flugplanConverter.toJson(flugplan);
  3. UserFlugplanRelation[] userFlugplanRelations = ao.find(UserFlugplanRelation.class, "USER_KEY = ?", (us-er.getKey().getStringValue()));
  4.  
  5. if (userFlugplanRelations[0] != null) {
  6. log.debug("flugplan already exists");
  7. removeRelation(userFlugplanRelations[0]);
  8. }
  9. log.debug("flugplan is new");
  10. ao.create(UserFlugplanRelation.class, new DBParam("USER_KEY", us-er.getKey().getStringValue()), new DBParam("FLUGPLAN", flugplanJson));
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement