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

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

http://datanucleus-appengine.googlecode.com/
Java | 56 lines | 29 code | 9 blank | 18 comment | 0 complexity | e91531a8898c37f38d2f21942e7d7ecb 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 com.google.appengine.api.datastore.Key;
19
20import org.datanucleus.api.jpa.annotations.Extension;
21
22import javax.persistence.Basic;
23import javax.persistence.Entity;
24import javax.persistence.GeneratedValue;
25import javax.persistence.GenerationType;
26import javax.persistence.Id;
27
28/**
29 * @author Max Ross <maxr@google.com>
30 */
31@Entity
32public class HasKeyAncestorKeyPkJPA {
33  @Id
34  @GeneratedValue(strategy=GenerationType.IDENTITY)
35  private Key key;
36
37  @Basic
38  @Extension(vendorName="datanucleus", key="gae.parent-pk", value="true")
39  private Key ancestorKey;
40
41  public Key getKey() {
42    return key;
43  }
44
45  public void setKey(Key key) {
46    this.key = key;
47  }
48
49  public Key getAncestorKey() {
50    return ancestorKey;
51  }
52
53  public void setAncestorKey(Key ancestorKey) {
54    this.ancestorKey = ancestorKey;
55  }
56}