PageRenderTime 22ms CodeModel.GetById 13ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/tests/com/google/appengine/datanucleus/test/TemporalHolder.java

http://datanucleus-appengine.googlecode.com/
Java | 47 lines | 39 code | 8 blank | 0 comment | 0 complexity | 2eb22047817ad3fad29fce018798de9a MD5 | raw file
 1package com.google.appengine.datanucleus.test;
 2
 3import java.util.Date;
 4
 5import javax.persistence.Entity;
 6import javax.persistence.Id;
 7import javax.persistence.Temporal;
 8import javax.persistence.TemporalType;
 9
10@Entity
11public class TemporalHolder
12{
13    @Id
14    Long id;
15
16    @Temporal(TemporalType.DATE)
17    Date dateField;
18
19    @Temporal(TemporalType.TIME)
20    Date timeField;
21
22    @Temporal(TemporalType.TIMESTAMP)
23    Date timestampField;
24
25    public TemporalHolder(long id) {
26      this.id = id;
27    }
28
29    public void setDateField(Date date) {
30        this.dateField = date;
31    }
32    public void setTimeField(Date date) {
33        this.timeField = date;
34    }
35    public void setTimestampField(Date date) {
36        this.timestampField = date;
37    }
38    public Date getDateField() {
39        return dateField;
40    }
41    public Date getTimeField() {
42        return timeField;
43    }
44    public Date getTimestampField() {
45        return timestampField;
46    }
47}