Guest User

Untitled

a guest
Sep 27th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. package net.sghill.example;
  2.  
  3. import net.sghill.example.UserDeserializer
  4. import net.sghill.example.UserSerializer
  5. import org.codehaus.jackson.map.annotate.JsonDeserialize;
  6. import org.codehaus.jackson.map.annotate.JsonSerialize;
  7.  
  8. @JsonDeserialize(using = UserDeserializer.class)
  9. @JsonSerialize(using = UserSerializer.class)
  10. public class User {
  11. private ObjectId id;
  12. private String username;
  13. private String password;
  14.  
  15. public User(ObjectId id, String username, String password) {
  16. this.id = id;
  17. this.username = username;
  18. this.password = password;
  19. }
  20.  
  21. public ObjectId getId() { return id; }
  22. public String getUsername() { return username; }
  23. public String getPassword() { return password; }
  24. }
Add Comment
Please, Sign In to add comment