18 package org.turro.erp.entity;
20 import java.util.Date;
21 import java.util.HashSet;
23 import javax.persistence.CascadeType;
24 import javax.persistence.Column;
25 import javax.persistence.Entity;
26 import javax.persistence.FetchType;
27 import javax.persistence.GeneratedValue;
28 import javax.persistence.GenerationType;
29 import javax.persistence.Id;
30 import javax.persistence.ManyToOne;
31 import javax.persistence.OneToMany;
32 import javax.persistence.Temporal;
33 import javax.persistence.TemporalType;
43 @GeneratedValue(strategy=GenerationType.IDENTITY)
44 @Column(name=
"IDENTIFIER")
47 @Column(name=
"MAINTENANCE_NAME", unique =
true, nullable =
false)
50 @Column(name=
"START_DATE")
51 @Temporal(value = TemporalType.DATE)
52 private Date startDate;
54 @Column(name=
"END_DATE")
55 @Temporal(value = TemporalType.DATE)
58 @OneToMany(mappedBy =
"maintenancePlan", fetch = FetchType.LAZY, cascade = CascadeType.ALL, orphanRemoval=
true)
59 private Set<Schedule> schedules =
new HashSet<Schedule>();
62 private org.turro.erp.entity.OrderReference orderReference;