PageRenderTime 28ms CodeModel.GetById 10ms app.highlight 14ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://datanucleus-appengine.googlecode.com/
Java | 173 lines | 116 code | 39 blank | 18 comment | 0 complexity | 53557c7462d3f65fc5d563a8dfb028db 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;
 19
 20import java.util.ArrayList;
 21import java.util.Collection;
 22import java.util.HashSet;
 23import java.util.LinkedHashSet;
 24import java.util.LinkedList;
 25import java.util.List;
 26import java.util.Set;
 27import java.util.SortedSet;
 28import java.util.TreeSet;
 29
 30import javax.jdo.annotations.IdGeneratorStrategy;
 31import javax.jdo.annotations.IdentityType;
 32import javax.jdo.annotations.PersistenceCapable;
 33import javax.jdo.annotations.Persistent;
 34import javax.jdo.annotations.PrimaryKey;
 35
 36/**
 37 * @author Max Ross <maxr@google.com>
 38 */
 39@PersistenceCapable(identityType = IdentityType.APPLICATION)
 40public class HasMultiValuePropsJDO {
 41  @PrimaryKey
 42  @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
 43  private Long id;
 44
 45  @Persistent
 46  String str;
 47
 48  @Persistent(defaultFetchGroup = "true")
 49  List<String> strList;
 50
 51  @Persistent(defaultFetchGroup = "true")
 52  Collection<Integer> intColl;
 53
 54  @Persistent
 55  List<Key> keyList;
 56
 57  @Persistent(defaultFetchGroup = "true")
 58  Set<String> strSet;
 59
 60  @Persistent(defaultFetchGroup = "true")
 61  HashSet<String> strHashSet;
 62
 63  @Persistent(defaultFetchGroup = "true")
 64  TreeSet<String> strTreeSet;
 65
 66  @Persistent(defaultFetchGroup = "true")
 67  ArrayList<String> strArrayList;
 68
 69  @Persistent(defaultFetchGroup = "true")
 70  LinkedList<String> strLinkedList;
 71
 72  @Persistent(defaultFetchGroup = "true")
 73  SortedSet<String> strSortedSet;
 74
 75  @Persistent(defaultFetchGroup = "true")
 76  LinkedHashSet<String> strLinkedHashSet;
 77
 78  public Long getId() {
 79    return id;
 80  }
 81
 82  public void setId(Long id) {
 83    this.id = id;
 84  }
 85
 86  public List<String> getStrList() {
 87    return strList;
 88  }
 89
 90  public void setStrList(List<String> strList) {
 91    this.strList = strList;
 92  }
 93
 94  public List<Key> getKeyList() {
 95    return keyList;
 96  }
 97
 98  public void setKeyList(List<Key> keyList) {
 99    this.keyList = keyList;
100  }
101
102  public String getStr() {
103    return str;
104  }
105
106  public void setStr(String s) {
107    this.str = s;
108  }
109
110  public Set<String> getStrSet() {
111    return strSet;
112  }
113
114  public void setStrSet(Set<String> strSet) {
115    this.strSet = strSet;
116  }
117
118  public TreeSet<String> getStrTreeSet() {
119    return strTreeSet;
120  }
121
122  public void setStrTreeSet(TreeSet<String> strTreeSet) {
123    this.strTreeSet = strTreeSet;
124  }
125
126  public ArrayList<String> getStrArrayList() {
127    return strArrayList;
128  }
129
130  public void setStrArrayList(ArrayList<String> strArrayList) {
131    this.strArrayList = strArrayList;
132  }
133
134  public LinkedList<String> getStrLinkedList() {
135    return strLinkedList;
136  }
137
138  public void setStrLinkedList(LinkedList<String> strLinkedList) {
139    this.strLinkedList = strLinkedList;
140  }
141
142  public HashSet<String> getStrHashSet() {
143    return strHashSet;
144  }
145
146  public void setStrHashSet(HashSet<String> strHashSet) {
147    this.strHashSet = strHashSet;
148  }
149
150  public SortedSet<String> getStrSortedSet() {
151    return strSortedSet;
152  }
153
154  public void setStrSortedSet(SortedSet<String> strSortedSet) {
155    this.strSortedSet = strSortedSet;
156  }
157
158  public LinkedHashSet<String> getStrLinkedHashSet() {
159    return strLinkedHashSet;
160  }
161
162  public void setStrLinkedHashSet(LinkedHashSet<String> strLinkedHashSet) {
163    this.strLinkedHashSet = strLinkedHashSet;
164  }
165
166  public Collection<Integer> getIntColl() {
167    return intColl;
168  }
169
170  public void setIntColl(Collection<Integer> intColl) {
171    this.intColl = intColl;
172  }
173}