/tests/com/google/appengine/datanucleus/test/HasFetchGroupsJDO.java
Java | 104 lines | 65 code | 21 blank | 18 comment | 0 complexity | 898aecf2667fc845e758a63b897e22b9 MD5 | raw file
Possible License(s): Apache-2.0
- /**********************************************************************
- Copyright (c) 2009 Google Inc.
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- **********************************************************************/
- package com.google.appengine.datanucleus.test;
- import com.google.appengine.api.datastore.Link;
- import javax.jdo.annotations.FetchGroup;
- import javax.jdo.annotations.FetchGroups;
- import javax.jdo.annotations.IdGeneratorStrategy;
- import javax.jdo.annotations.IdentityType;
- import javax.jdo.annotations.PersistenceCapable;
- import javax.jdo.annotations.Persistent;
- import javax.jdo.annotations.PrimaryKey;
- /**
- * @author Max Ross <maxr@google.com>
- */
- @PersistenceCapable(identityType = IdentityType.APPLICATION)
- @FetchGroups({
- @FetchGroup(name="fg1", members = {@Persistent(name="str3")}),
- @FetchGroup(name="fg2", members = {@Persistent(name="str4")})
- })
- public class HasFetchGroupsJDO {
- @PrimaryKey
- @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
- private Long id;
- @Persistent
- String str1;
- @Persistent(defaultFetchGroup = "true")
- String str2;
- @Persistent(defaultFetchGroup = "false")
- String str3;
- @Persistent
- String str4;
- @Persistent(defaultFetchGroup = "false")
- Link link;
- public Long getId() {
- return id;
- }
- public void setId(Long id) {
- this.id = id;
- }
- public String getStr1() {
- return str1;
- }
- public void setStr1(String str1) {
- this.str1 = str1;
- }
- public String getStr2() {
- return str2;
- }
- public void setStr2(String str2) {
- this.str2 = str2;
- }
- public String getStr3() {
- return str3;
- }
- public void setStr3(String str3) {
- this.str3 = str3;
- }
- public String getStr4() {
- return str4;
- }
- public void setStr4(String str4) {
- this.str4 = str4;
- }
- public Link getLink() {
- return link;
- }
- public void setLink(Link link) {
- this.link = link;
- }
- }