001: /*
002: * Timer: The timer class
003: * Copyright (C) 2006-2007 Rift IT Contracting
004: *
005: * This library is free software; you can redistribute it and/or
006: * modify it under the terms of the GNU Lesser General Public
007: * License as published by the Free Software Foundation; either
008: * version 2.1 of the License, or (at your option) any later version.
009: *
010: * This library is distributed in the hope that it will be useful,
011: * but WITHOUT ANY WARRANTY; without even the implied warranty of
012: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
013: * Lesser General Public License for more details.
014: *
015: * You should have received a copy of the GNU Lesser General Public
016: * License along with this library; if not, write to the Free Software
017: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
018: *
019: * Schedule.java
020: */
021:
022: package com.rift.coad.daemon.timer.db;
023:
024: /**
025: * Schedule is a hibernate database object.
026: */
027: public class Schedule implements java.io.Serializable {
028:
029: // Fields
030:
031: /**
032: *
033: * auto_increment
034: *
035: */
036: private Integer id;
037: private String jndi;
038: private Integer month;
039: private Integer day;
040: private Integer hour;
041: private Integer minute;
042: private byte[] event;
043: private byte recure;
044:
045: // Constructors
046:
047: /** default constructor */
048: public Schedule() {
049: }
050:
051: /** full constructor
052: *
053: * @param jndi The JNDI of the daemon to be called.
054: * @param month The month on which the event will be called.
055: * @param day The day on which the event will be called.
056: * @param hour The hour on which the event will be called.
057: * @param minute The minute on which the event will be called.
058: * @param event An object to identify the event.
059: * @param recure A byte which indicates whether the event recures or not.
060: */
061: public Schedule(String jndi, Integer month, Integer day,
062: Integer hour, Integer minute, byte[] event, byte recure) {
063: this .jndi = jndi;
064: this .month = month;
065: this .day = day;
066: this .hour = hour;
067: this .minute = minute;
068: this .event = event;
069: this .recure = recure;
070: }
071:
072: // Property accessors
073:
074: public Integer getId() {
075: return this .id;
076: }
077:
078: /**
079: * auto_increment
080: */
081: public void setId(Integer id) {
082: this .id = id;
083: }
084:
085: /**
086: * @return Returns the JNDI of the daemon to be called.
087: */
088: public String getJndi() {
089: return this .jndi;
090: }
091:
092: /**
093: * @param jndi The JNDI of the daemon to be called.
094: */
095: public void setJndi(String jndi) {
096: this .jndi = jndi;
097: }
098:
099: /**
100: * @return Returns the month on which the event will occur.
101: */
102: public Integer getMonth() {
103: return this .month;
104: }
105:
106: /**
107: * @param month Sets the month on which the event is to occur.
108: */
109: public void setMonth(Integer month) {
110: this .month = month;
111: }
112:
113: /**
114: * @return Returns the day on which the event is to occur.
115: */
116: public Integer getDay() {
117: return this .day;
118: }
119:
120: /**
121: * @param day Sets the day on which the event is to occur.
122: */
123: public void setDay(Integer day) {
124: this .day = day;
125: }
126:
127: /**
128: * @return Returns the hour on which the event is to occur.
129: */
130: public Integer getHour() {
131: return this .hour;
132: }
133:
134: /**
135: * @param hour Sets the hour on which an event is to occur.
136: */
137: public void setHour(Integer hour) {
138: this .hour = hour;
139: }
140:
141: /**
142: * @return Returns the minute on which an event is to occur.
143: */
144: public Integer getMinute() {
145: return this .minute;
146: }
147:
148: /**
149: * @param minute Sets the minutes on which an event is to occur.
150: */
151: public void setMinute(Integer minute) {
152: this .minute = minute;
153: }
154:
155: /**
156: * @return Returns the identifying object.
157: */
158: public byte[] getEvent() {
159: return this .event;
160: }
161:
162: /**
163: * @param event Sets the identifying object.
164: */
165: public void setEvent(byte[] event) {
166: this .event = event;
167: }
168:
169: /**
170: * @return Returns the recure value.
171: */
172: public byte getRecure() {
173: return this .recure;
174: }
175:
176: /**
177: * @param recure Sets the recure value.
178: */
179: public void setRecure(byte recure) {
180: this.recure = recure;
181: }
182:
183: }
|