KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > test > cascade > JobBatch


1 // $Id: JobBatch.java,v 1.1 2005/05/03 20:55:31 steveebersole Exp $
2
package org.hibernate.test.cascade;
3
4 import java.util.Date JavaDoc;
5 import java.util.Set JavaDoc;
6 import java.util.HashSet JavaDoc;
7
8 /**
9  * Implementation of JobBatch.
10  *
11  * @author Steve Ebersole
12  */

13 public class JobBatch {
14     private Long JavaDoc id;
15     private Date JavaDoc batchDate;
16     private Set JavaDoc jobs = new HashSet JavaDoc();
17
18     /** CGLIB constructor */
19     JobBatch() {}
20
21     public JobBatch(Date JavaDoc batchDate) {
22         this.batchDate = batchDate;
23     }
24
25     public Long JavaDoc getId() {
26         return id;
27     }
28
29     public void setId(Long JavaDoc id) {
30         this.id = id;
31     }
32
33     public Date JavaDoc getBatchDate() {
34         return batchDate;
35     }
36
37     public void setBatchDate(Date JavaDoc batchDate) {
38         this.batchDate = batchDate;
39     }
40
41     public Set JavaDoc getJobs() {
42         return jobs;
43     }
44
45     public void setJobs(Set JavaDoc jobs) {
46         this.jobs = jobs;
47     }
48
49     public Job createJob() {
50         Job job = new Job( this );
51         jobs.add( job );
52         return job;
53     }
54 }
55
Popular Tags