PageRenderTime 112ms CodeModel.GetById 50ms app.highlight 7ms RepoModel.GetById 54ms 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
  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 */
 17package mpv5.db.objects;
 18
 19import enoa.handler.TemplateHandler;
 20import java.util.Date;
 21import javax.swing.JComponent;
 22import mpv5.db.common.Context;
 23import mpv5.db.common.DatabaseObject;
 24import mpv5.db.common.Templateable;
 25import mpv5.globals.Constants;
 26import mpv5.handler.FormatHandler;
 27import mpv5.ui.panels.ConversationPanel;
 28import mpv5.utils.images.MPIcon;
 29
 30/**
 31 *
 32 *  
 33 */
 34public class Conversation
 35        extends DatabaseObject
 36        implements Templateable {
 37
 38    private static final long serialVersionUID = 6039340924254489575L;
 39    private String cnumber = "";
 40    private int contactsids;
 41    private String adress = "";
 42    private Date date = null;
 43    private String content = "";
 44
 45    public int __getContactsids() {
 46        return contactsids;
 47    }
 48
 49    public void setContactsids(int contactsids) {
 50        this.contactsids = contactsids;
 51    }
 52
 53    
 54    public String __getContent() {
 55        return content;
 56    }
 57
 58    public void setContent(String content) {
 59        this.content = content;
 60    }
 61
 62    public String __getAdress() {
 63        return adress;
 64    }
 65
 66    public void setAdress(String adress) {
 67        this.adress = adress;
 68    }
 69
 70    public String __getCnumber() {
 71        return cnumber;
 72    }
 73
 74    public void setCnumber(String cnumber) {
 75        this.cnumber = cnumber;
 76    }
 77
 78    public Date __getDate() {
 79        return date;
 80    }
 81
 82    public void setDate(Date date) {
 83        this.date = date;
 84    }
 85
 86    public Conversation() {
 87        setContext(Context.getConversation());
 88    }
 89
 90    @Override
 91    public String toString() {
 92        return __getCname();
 93    }
 94
 95    @Override
 96    public JComponent getView() {
 97        return ConversationPanel.instanceOf();
 98    }
 99
100    @Override
101    public MPIcon getIcon() {
102        return null;
103    }
104
105    public int templateType() {
106       return Constants.TYPE_CONVERSATION;
107    }
108
109    public int templateGroupIds() {
110       return this.__getGroupsids();
111    }
112
113    public FormatHandler getFormatHandler() {
114        return null;
115    }
116}