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

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

http://datanucleus-appengine.googlecode.com/
Java | 51 lines | 25 code | 8 blank | 18 comment | 0 complexity | de6544ddba8cbc76cd2adaafa57184c7 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;
19import com.google.appengine.datanucleus.Utils;
20
21
22import java.io.Serializable;
23import java.util.Set;
24
25import javax.persistence.CascadeType;
26import javax.persistence.Entity;
27import javax.persistence.GeneratedValue;
28import javax.persistence.GenerationType;
29import javax.persistence.Id;
30import javax.persistence.OneToMany;
31
32/**
33 * @author Max Ross <maxr@google.com>
34 */
35@Entity
36public class HasGrandchildJPA implements Serializable {
37  @Id
38  @GeneratedValue(strategy = GenerationType.IDENTITY)
39  private Key id;
40
41  @OneToMany(cascade = CascadeType.ALL)
42  private Set<HasOneToManySetJPA> yar = Utils.newHashSet();
43
44  public Set<HasOneToManySetJPA> getYar() {
45    return yar;
46  }
47
48  public Key getId() {
49    return id;
50  }
51}