PageRenderTime 36ms CodeModel.GetById 30ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://datanucleus-appengine.googlecode.com/
Java | 55 lines | 29 code | 8 blank | 18 comment | 0 complexity | af6a5d540592140b70a811e732e394fe 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.jdo.annotations.IdGeneratorStrategy;
19import javax.jdo.annotations.IdentityType;
20import javax.jdo.annotations.PersistenceCapable;
21import javax.jdo.annotations.Persistent;
22import javax.jdo.annotations.PrimaryKey;
23import javax.jdo.annotations.Version;
24import javax.jdo.annotations.VersionStrategy;
25
26/**
27 * @author Max Ross <maxr@google.com>
28 */
29@PersistenceCapable(identityType = IdentityType.APPLICATION,
30    table = HasTableAndColumnsInMappingJDO.TABLE_NAME)
31@Version(strategy = VersionStrategy.VERSION_NUMBER)
32public class HasTableAndColumnsInMappingJDO {
33
34  public static final String TABLE_NAME = "TABLE_NAME";
35  public static final String FOO_COLUMN_NAME = "bar";
36
37  @PrimaryKey(column = "pk")
38  @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
39  private Long id;
40
41  @Persistent(column = FOO_COLUMN_NAME)
42  private String foo;
43
44  public Long getId() {
45    return id;
46  }
47
48  public String getFoo() {
49    return foo;
50  }
51
52  public void setFoo(String foo) {
53    this.foo = foo;
54  }
55}