1 package org.hibernate.test.cascade; 3 4 import java.util.Date ; 5 import java.util.Set ; 6 import java.util.HashSet ; 7 8 13 public class JobBatch { 14 private Long id; 15 private Date batchDate; 16 private Set jobs = new HashSet (); 17 18 19 JobBatch() {} 20 21 public JobBatch(Date batchDate) { 22 this.batchDate = batchDate; 23 } 24 25 public Long getId() { 26 return id; 27 } 28 29 public void setId(Long id) { 30 this.id = id; 31 } 32 33 public Date getBatchDate() { 34 return batchDate; 35 } 36 37 public void setBatchDate(Date batchDate) { 38 this.batchDate = batchDate; 39 } 40 41 public Set getJobs() { 42 return jobs; 43 } 44 45 public void setJobs(Set 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 |