(no commit message)
[cdmlib.git] / cdmlib-model / src / main / java / eu / etaxonomy / cdm / model / common / TimePeriod.java
1 /**
2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9
10 package eu.etaxonomy.cdm.model.common;
11
12
13
14 import java.util.Calendar;
15
16 import javax.persistence.Embeddable;
17 import javax.persistence.Temporal;
18 import javax.persistence.TemporalType;
19
20 import org.apache.log4j.Logger;
21
22
23 /**
24 * @author m.doering
25 * @version 1.0
26 * @created 08-Nov-2007 13:07:00
27 */
28 @Embeddable
29 public class TimePeriod {
30 private Calendar start;
31 private Calendar end;
32
33 public TimePeriod() {
34 // TODO Auto-generated constructor stub
35 }
36 public TimePeriod(Calendar startDate) {
37 start=startDate;
38 }
39 public TimePeriod(Calendar startDate, Calendar endDate) {
40 start=startDate;
41 end=endDate;
42 }
43
44 @Temporal(TemporalType.TIMESTAMP)
45 public Calendar getStart() {
46 return start;
47 }
48 public void setStart(Calendar start) {
49 this.start = start;
50 }
51
52 @Temporal(TemporalType.TIMESTAMP)
53 public Calendar getEnd() {
54 return end;
55 }
56 public void setEnd(Calendar end) {
57 this.end = end;
58 }
59
60 }