PageRenderTime 37ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/src/mpv5/db/objects/Conversation.java

http://mp-rechnungs-und-kundenverwaltung.googlecode.com/
Java | 116 lines | 75 code | 21 blank | 20 comment | 0 complexity | 419db6e1b5bd6537fbdd0bc3f1b6b7e3 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. * This file is part of YaBS.
  3. *
  4. * YaBS is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * YaBS is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with YaBS. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. package mpv5.db.objects;
  18. import enoa.handler.TemplateHandler;
  19. import java.util.Date;
  20. import javax.swing.JComponent;
  21. import mpv5.db.common.Context;
  22. import mpv5.db.common.DatabaseObject;
  23. import mpv5.db.common.Templateable;
  24. import mpv5.globals.Constants;
  25. import mpv5.handler.FormatHandler;
  26. import mpv5.ui.panels.ConversationPanel;
  27. import mpv5.utils.images.MPIcon;
  28. /**
  29. *
  30. *
  31. */
  32. public class Conversation
  33. extends DatabaseObject
  34. implements Templateable {
  35. private static final long serialVersionUID = 6039340924254489575L;
  36. private String cnumber = "";
  37. private int contactsids;
  38. private String adress = "";
  39. private Date date = null;
  40. private String content = "";
  41. public int __getContactsids() {
  42. return contactsids;
  43. }
  44. public void setContactsids(int contactsids) {
  45. this.contactsids = contactsids;
  46. }
  47. public String __getContent() {
  48. return content;
  49. }
  50. public void setContent(String content) {
  51. this.content = content;
  52. }
  53. public String __getAdress() {
  54. return adress;
  55. }
  56. public void setAdress(String adress) {
  57. this.adress = adress;
  58. }
  59. public String __getCnumber() {
  60. return cnumber;
  61. }
  62. public void setCnumber(String cnumber) {
  63. this.cnumber = cnumber;
  64. }
  65. public Date __getDate() {
  66. return date;
  67. }
  68. public void setDate(Date date) {
  69. this.date = date;
  70. }
  71. public Conversation() {
  72. setContext(Context.getConversation());
  73. }
  74. @Override
  75. public String toString() {
  76. return __getCname();
  77. }
  78. @Override
  79. public JComponent getView() {
  80. return ConversationPanel.instanceOf();
  81. }
  82. @Override
  83. public MPIcon getIcon() {
  84. return null;
  85. }
  86. public int templateType() {
  87. return Constants.TYPE_CONVERSATION;
  88. }
  89. public int templateGroupIds() {
  90. return this.__getGroupsids();
  91. }
  92. public FormatHandler getFormatHandler() {
  93. return null;
  94. }
  95. }