PageRenderTime 12ms CodeModel.GetById 1ms app.highlight 6ms RepoModel.GetById 2ms app.codeStats 0ms

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

http://datanucleus-appengine.googlecode.com/
Java | 53 lines | 27 code | 8 blank | 18 comment | 0 complexity | 3c21aa17c393e2996c44e33791aae886 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 javax.persistence.Entity;
19import javax.persistence.GeneratedValue;
20import javax.persistence.GenerationType;
21import javax.persistence.Id;
22import javax.persistence.Version;
23
24/**
25 * @author Max Ross <maxr@google.com>
26 */
27@Entity
28public class HasLongVersionJPA implements HasVersionJPA {
29  @Id
30  @GeneratedValue(strategy=GenerationType.IDENTITY)
31  private Long id;
32
33  private String value;
34
35  @Version
36  private Long version;
37
38  public String getValue() {
39    return value;
40  }
41
42  public void setValue(String value) {
43    this.value = value;
44  }
45
46  public Long getId() {
47    return id;
48  }
49
50  public Long getVersion() {
51    return version;
52  }
53}