PageRenderTime 32ms CodeModel.GetById 25ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://datanucleus-appengine.googlecode.com/
Java | 55 lines | 28 code | 9 blank | 18 comment | 0 complexity | c26249c37dff17a9038bc087f2685df1 MD5 | raw file
 1/**********************************************************************
 2Copyright (c) 2009 Google Inc.
 3
 4Licensed under the Apache License, Version 2.0 (the "License");
 5you may not use this file except in compliance with the License.
 6You may obtain a copy of the License at
 7
 8http://www.apache.org/licenses/LICENSE-2.0
 9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15**********************************************************************/
16package com.google.appengine.datanucleus.test;
17
18import java.sql.Timestamp;
19
20import javax.persistence.Entity;
21import javax.persistence.GeneratedValue;
22import javax.persistence.GenerationType;
23import javax.persistence.Id;
24import javax.persistence.Version;
25
26/**
27 * @author Max Ross <maxr@google.com>
28 */
29@Entity
30public class HasTimestampVersionJPA {
31  @Id
32  @GeneratedValue(strategy=GenerationType.IDENTITY)
33  private Long id;
34
35  private String value;
36
37  @Version
38  private Timestamp version;
39
40  public String getValue() {
41    return value;
42  }
43
44  public void setValue(String value) {
45    this.value = value;
46  }
47
48  public Long getId() {
49    return id;
50  }
51
52  public Timestamp getVersion() {
53    return version;
54  }
55}