/src/mpv5/db/objects/MailMessage.java
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
- /*
- * This file is part of YaBS.
- *
- * YaBS is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * YaBS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with YaBS. If not, see <http://www.gnu.org/licenses/>.
- */
- package mpv5.db.objects;
- import javax.swing.JComponent;
- import mpv5.db.common.Context;
- import mpv5.db.common.DatabaseObject;
- /**
- *
- * Messages
- */
- public class MailMessage extends DatabaseObject {
- private int usersids;
- private String description;
- public MailMessage() {
- setContext(Context.getMessage());
- }
- @Override
- public JComponent getView() {
- throw new UnsupportedOperationException("Not supported yet.");
- }
- @Override
- public mpv5.utils.images.MPIcon getIcon() {
- return null;
- }
- /**
- * @return the usersids
- */
- public int __getUsersids() {
- return usersids;
- }
- /**
- * @param usersids the usersids to set
- */
- public void setUsersids(int usersids) {
- this.usersids = usersids;
- }
- /**
- * @return the description
- */
- public String __getDescription() {
- return description;
- }
- /**
- * @param description the description to set
- */
- public void setDescription(String description) {
- this.description = description;
- }
- @Override
- public boolean saveImport() {
- if (usersids <= 0) {
- usersids = User.getCurrentUser().__getIDS();
- }
- return super.saveImport();
- }
- }