KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > rift > coad > daemon > timer > db > Schedule


1 /*
2  * Timer: The timer class
3  * Copyright (C) 2006-2007 Rift IT Contracting
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  *
19  * Schedule.java
20  */

21
22 package com.rift.coad.daemon.timer.db;
23
24 /**
25  * Schedule is a hibernate database object.
26  */

27 public class Schedule implements java.io.Serializable JavaDoc {
28
29     // Fields
30

31      /**
32       *
33       * auto_increment
34       *
35       */

36      private Integer JavaDoc id;
37      private String JavaDoc jndi;
38      private Integer JavaDoc month;
39      private Integer JavaDoc day;
40      private Integer JavaDoc hour;
41      private Integer JavaDoc minute;
42      private byte[] event;
43      private byte recure;
44
45      // Constructors
46

47     /** default constructor */
48     public Schedule() {
49     }
50
51     /** full constructor
52      *
53      * @param jndi The JNDI of the daemon to be called.
54      * @param month The month on which the event will be called.
55      * @param day The day on which the event will be called.
56      * @param hour The hour on which the event will be called.
57      * @param minute The minute on which the event will be called.
58      * @param event An object to identify the event.
59      * @param recure A byte which indicates whether the event recures or not.
60      */

61     public Schedule(String JavaDoc jndi, Integer JavaDoc month, Integer JavaDoc day, Integer JavaDoc hour,
62             Integer JavaDoc minute, byte[] event, byte recure) {
63        this.jndi = jndi;
64        this.month = month;
65        this.day = day;
66        this.hour = hour;
67        this.minute = minute;
68        this.event = event;
69        this.recure = recure;
70     }
71    
72     // Property accessors
73

74     public Integer JavaDoc getId() {
75         return this.id;
76     }
77     
78     /**
79      * auto_increment
80      */

81     public void setId(Integer JavaDoc id) {
82         this.id = id;
83     }
84     
85     /**
86      * @return Returns the JNDI of the daemon to be called.
87      */

88     public String JavaDoc getJndi() {
89         return this.jndi;
90     }
91     
92     /**
93      * @param jndi The JNDI of the daemon to be called.
94      */

95     public void setJndi(String JavaDoc jndi) {
96         this.jndi = jndi;
97     }
98     
99     /**
100      * @return Returns the month on which the event will occur.
101      */

102     public Integer JavaDoc 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 JavaDoc month) {
110         this.month = month;
111     }
112     
113     /**
114      * @return Returns the day on which the event is to occur.
115      */

116     public Integer JavaDoc 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 JavaDoc day) {
124         this.day = day;
125     }
126     
127     /**
128      * @return Returns the hour on which the event is to occur.
129      */

130     public Integer JavaDoc 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 JavaDoc hour) {
138         this.hour = hour;
139     }
140     
141     /**
142      * @return Returns the minute on which an event is to occur.
143      */

144     public Integer JavaDoc 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 JavaDoc 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 }
184
185
186
Popular Tags