001: /*
002: * $Id: Subject.java 654 2006-01-25 09:11:56Z hengels $
003: * (c) Copyright 2004 con:cern development team.
004: *
005: * This file is part of con:cern (http://concern.org).
006: *
007: * con:cern is free software; you can redistribute it and/or modify
008: * it under the terms of the GNU Lesser General Public License
009: * as published by the Free Software Foundation; either version 2.1
010: * of the License, or (at your option) any later version.
011: *
012: * Please see COPYING for the complete licence.
013: */
014: package org.concern;
015:
016: import java.util.*;
017: import java.sql.Timestamp;
018:
019: /**
020: * @author hengels
021: * @version $Revision: 654 $
022: */
023: public class Subject {
024: private String process;
025: private String subjectId;
026: private Object subject;
027: private String subjectLine;
028: private String originator;
029: private Timestamp created;
030: private int state;
031: private Set options;
032:
033: public Subject(String process, String subjectId,
034: String subjectLine, String originator, Date created,
035: int state) {
036: this .process = process;
037: this .subjectId = subjectId;
038: this .subjectLine = subjectLine;
039: this .originator = originator;
040: if (created != null)
041: this .created = new Timestamp(created.getTime());
042: this .state = state;
043: }
044:
045: public String getProcess() {
046: return process;
047: }
048:
049: public void setProcess(String process) {
050: this .process = process;
051: }
052:
053: public String getSubjectId() {
054: return subjectId;
055: }
056:
057: public void setSubjectId(String subjectId) {
058: this .subjectId = subjectId;
059: }
060:
061: public Object getSubject() {
062: return subject;
063: }
064:
065: public void setSubject(Object subject) {
066: this .subject = subject;
067: }
068:
069: public String getSubjectLine() {
070: return subjectLine;
071: }
072:
073: public void setSubjectLine(String subjectLine) {
074: this .subjectLine = subjectLine;
075: }
076:
077: public String getOriginator() {
078: return originator;
079: }
080:
081: public void setOriginator(String originator) {
082: this .originator = originator;
083: }
084:
085: public Timestamp getCreated() {
086: return created;
087: }
088:
089: public void setCreated(Timestamp created) {
090: this .created = created;
091: }
092:
093: public Set getOptions() {
094: if (options == null)
095: options = new TreeSet();
096: return options;
097: }
098:
099: public void setOptions(Set options) {
100: this .options = options;
101: }
102:
103: public int getState() {
104: return state;
105: }
106:
107: public void setState(int state) {
108: this .state = state;
109: }
110:
111: public String toString() {
112: return process + ": " + subjectId + " (" + subjectLine + ")";
113: }
114: }
|