PageRenderTime 32ms CodeModel.GetById 30ms RepoModel.GetById 1ms app.codeStats 0ms

/src/mpv5/db/common/SerializableEntity.java

http://mp-rechnungs-und-kundenverwaltung.googlecode.com/
Java | 51 lines | 23 code | 8 blank | 20 comment | 0 complexity | 37f68a20978002733c8f2249b8d0a28e MD5 | raw file
Possible License(s): LGPL-3.0, Apache-2.0, GPL-3.0, GPL-2.0, AGPL-3.0, JSON, BSD-3-Clause
  1. /*
  2. * To change this template, choose Tools | Templates
  3. * and open the template in the editor.
  4. */
  5. package mpv5.db.common;
  6. /**
  7. *
  8. * @author Andreas
  9. */
  10. public class SerializableEntity {
  11. private Long id;
  12. private String tablename;
  13. public SerializableEntity() {
  14. }
  15. public SerializableEntity(DatabaseObject.Entity v) {
  16. this.id = Long.valueOf(v.getValue().toString());
  17. this.tablename = v.getKey().getDbIdentity();
  18. }
  19. /**
  20. * @return the id
  21. */
  22. public Long getId() {
  23. return id;
  24. }
  25. /**
  26. * @param id the id to set
  27. */
  28. public void setId(Long id) {
  29. this.id = id;
  30. }
  31. /**
  32. * @return the tablename
  33. */
  34. public String getTablename() {
  35. return tablename;
  36. }
  37. /**
  38. * @param tablename the tablename to set
  39. */
  40. public void setTablename(String tablename) {
  41. this.tablename = tablename;
  42. }
  43. }