PageRenderTime 56ms CodeModel.GetById 53ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://datanucleus-appengine.googlecode.com/
Java | 46 lines | 21 code | 7 blank | 18 comment | 0 complexity | d9c69d30369fc2d37b0ea9116897ba2b MD5 | raw file
 1/**********************************************************************
 2Copyright (c) 2011 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 java.util.HashSet;
19import java.util.Set;
20
21import javax.jdo.annotations.DatastoreIdentity;
22import javax.jdo.annotations.IdGeneratorStrategy;
23import javax.jdo.annotations.PersistenceCapable;
24
25/**
26 * Example of a class using datastore-identity
27 */
28@PersistenceCapable
29@DatastoreIdentity(strategy=IdGeneratorStrategy.IDENTITY)
30public class HasDatastoreIdentityParentJDO {
31  Set<HasDatastoreIdentityChildJDO> children = new HashSet<HasDatastoreIdentityChildJDO>();
32
33  private String name;
34
35  public String getName() {
36    return name;
37  }
38
39  public void setName(String name) {
40    this.name = name;
41  }
42
43  public Set<HasDatastoreIdentityChildJDO> getChildren() {
44    return children;
45  }
46}