PageRenderTime 9ms CodeModel.GetById 2ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://datanucleus-appengine.googlecode.com/
Java | 51 lines | 25 code | 7 blank | 19 comment | 0 complexity | 292819ffb968c1178aa596cff22c96ca MD5 | raw file
 1/*
 2 * /**********************************************************************
 3 * Copyright (c) 2009 Google Inc.
 4 *
 5 * Licensed under the Apache License, Version 2.0 (the "License");
 6 * you may not use this file except in compliance with the License.
 7 * You may obtain a copy of the License at
 8 *
 9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 * **********************************************************************/
17package com.google.appengine.datanucleus.test;
18
19import javax.jdo.annotations.Embedded;
20import javax.jdo.annotations.IdGeneratorStrategy;
21import javax.jdo.annotations.IdentityType;
22import javax.jdo.annotations.PersistenceCapable;
23import javax.jdo.annotations.Persistent;
24import javax.jdo.annotations.PrimaryKey;
25
26/**
27 * @author Max Ross <maxr@google.com>
28 */
29@PersistenceCapable(identityType = IdentityType.APPLICATION)
30public class HasEmbeddedWithKeyPkJDO {
31
32  @PrimaryKey
33  @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
34  private Long id;
35
36  @Persistent
37  @Embedded(nullIndicatorColumn="str")
38  private HasKeyPkJDO embedded;
39
40  public Long getId() {
41    return id;
42  }
43
44  public HasKeyPkJDO getEmbedded() {
45    return embedded;
46  }
47
48  public void setEmbedded(HasKeyPkJDO embedded) {
49    this.embedded = embedded;
50  }
51}