PageRenderTime 10ms CodeModel.GetById 28ms RepoModel.GetById 8ms app.codeStats 0ms

/src/mpv5/db/objects/MailMessage.java

http://mp-rechnungs-und-kundenverwaltung.googlecode.com/
Java | 83 lines | 38 code | 13 blank | 32 comment | 1 complexity | 5b966bdc249921065353ecc019d268c5 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 javax.swing.JComponent;
  19. import mpv5.db.common.Context;
  20. import mpv5.db.common.DatabaseObject;
  21. /**
  22. *
  23. * Messages
  24. */
  25. public class MailMessage extends DatabaseObject {
  26. private int usersids;
  27. private String description;
  28. public MailMessage() {
  29. setContext(Context.getMessage());
  30. }
  31. @Override
  32. public JComponent getView() {
  33. throw new UnsupportedOperationException("Not supported yet.");
  34. }
  35. @Override
  36. public mpv5.utils.images.MPIcon getIcon() {
  37. return null;
  38. }
  39. /**
  40. * @return the usersids
  41. */
  42. public int __getUsersids() {
  43. return usersids;
  44. }
  45. /**
  46. * @param usersids the usersids to set
  47. */
  48. public void setUsersids(int usersids) {
  49. this.usersids = usersids;
  50. }
  51. /**
  52. * @return the description
  53. */
  54. public String __getDescription() {
  55. return description;
  56. }
  57. /**
  58. * @param description the description to set
  59. */
  60. public void setDescription(String description) {
  61. this.description = description;
  62. }
  63. @Override
  64. public boolean saveImport() {
  65. if (usersids <= 0) {
  66. usersids = User.getCurrentUser().__getIDS();
  67. }
  68. return super.saveImport();
  69. }
  70. }