Guest User

Untitled

a guest
Jun 22nd, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. @Entity
  2. public class Bu {
  3.  
  4. @Id
  5. @Index
  6. private Long id;
  7.  
  8. @NotNull
  9. private String name;
  10.  
  11. @NotNull
  12. private Date date;
  13.  
  14. @Generated(hash = 726736104)
  15. public Bu(Long id, @NotNull String name, @NotNull Date date) {
  16. this.id = id;
  17. this.name = name;
  18. this.date = date;
  19. }
  20.  
  21. @Generated(hash = 1400221727)
  22. public Bu() {
  23. }
  24.  
  25. public Long getId() {
  26. return this.id;
  27. }
  28.  
  29. public void setId(Long id) {
  30. this.id = id;
  31. }
  32.  
  33. public String getName() {
  34. return this.name;
  35. }
  36.  
  37. public void setName(String name) {
  38. this.name = name;
  39. }
  40.  
  41. public Date getDate() {
  42. return this.date;
  43. }
  44.  
  45. public void setDate(Date date) {
  46. this.date = date;
  47. }
  48. }
  49.  
  50. BuDao buDao = AbsDatabase.getInstance().getDaoSession().getBuDao();
  51. List<Bu> list = buDao.loadAll();
  52. Log.e("list" , list.toString());
  53.  
  54. E/list: [com.harit.abs.Entity.Bu@5b371c, com.harit.abs.Entity.Bu@d492f25, com.harit.abs.Entity.Bu@2488fa]
Add Comment
Please, Sign In to add comment