PageRenderTime 44ms CodeModel.GetById 40ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://datanucleus-appengine.googlecode.com/
Java | 85 lines | 51 code | 16 blank | 18 comment | 0 complexity | 63e6b5474276b45c6001910aada68418 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.Extension;
19import javax.jdo.annotations.IdGeneratorStrategy;
20import javax.jdo.annotations.IdentityType;
21import javax.jdo.annotations.PersistenceCapable;
22import javax.jdo.annotations.Persistent;
23import javax.jdo.annotations.PrimaryKey;
24
25/**
26 * @author Max Ross <maxr@google.com>
27 */
28@PersistenceCapable(identityType = IdentityType.APPLICATION)
29public class HasOneToOnesWithDifferentCascadesJDO {
30
31  @PrimaryKey
32  @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
33  @Extension(vendorName="datanucleus", key="gae.encoded-pk", value="true")
34  private String id;
35
36  @Persistent(dependent = "true")
37  private HasStringAncestorStringPkJDO cascadeAllChild;
38
39  @Persistent(dependent = "true")
40  private HasKeyAncestorStringPkJDO cascadeAllChildWithKeyAncestor;
41
42  @Persistent(dependent = "false")
43  private HasStringAncestorKeyPkJDO cascadePersistChild;
44
45  @Persistent(dependent = "false")
46  @Extension(vendorName="datanucleus", key="cascade-persist", value="false")
47  private HasKeyAncestorKeyPkJDO cascadeRemoveChild;
48
49  public String getId() {
50    return id;
51  }
52
53  public HasStringAncestorStringPkJDO getCascadeAllChild() {
54    return cascadeAllChild;
55  }
56
57  public void setCascadeAllChild(HasStringAncestorStringPkJDO cascadeAllChild) {
58    this.cascadeAllChild = cascadeAllChild;
59  }
60
61  public HasStringAncestorKeyPkJDO getCascadePersistChild() {
62    return cascadePersistChild;
63  }
64
65  public void setCascadePersistChild(HasStringAncestorKeyPkJDO cascadePersistChild) {
66    this.cascadePersistChild = cascadePersistChild;
67  }
68
69  public HasKeyAncestorKeyPkJDO getCascadeRemoveChild() {
70    return cascadeRemoveChild;
71  }
72
73  public void setCascadeRemoveChild(HasKeyAncestorKeyPkJDO cascadeRemoveChild) {
74    this.cascadeRemoveChild = cascadeRemoveChild;
75  }
76
77  public HasKeyAncestorStringPkJDO getCascadeAllChildWithKeyAncestor() {
78    return cascadeAllChildWithKeyAncestor;
79  }
80
81  public void setCascadeAllChildWithKeyAncestor(
82      HasKeyAncestorStringPkJDO cascadeAllChildWithKeyAncestor) {
83    this.cascadeAllChildWithKeyAncestor = cascadeAllChildWithKeyAncestor;
84  }
85}