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

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

http://datanucleus-appengine.googlecode.com/
Java | 59 lines | 29 code | 12 blank | 18 comment | 0 complexity | 255cf52645249529df248d16115a8c31 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.datanucleus.Utils;
19
20import java.util.List;
21
22import javax.jdo.annotations.IdGeneratorStrategy;
23import javax.jdo.annotations.IdentityType;
24import javax.jdo.annotations.PersistenceCapable;
25import javax.jdo.annotations.Persistent;
26import javax.jdo.annotations.PrimaryKey;
27
28/**
29 * @author Max Ross <maxr@google.com>
30 */
31@PersistenceCapable(identityType = IdentityType.APPLICATION)
32public class NullDataWithDefaultValuesJDO {
33
34  @PrimaryKey
35  @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
36  private Long id;
37
38  private String string = "string";
39
40  private String[] array = new String[] {"array"};
41
42  private List<String> list = Utils.newArrayList();
43
44  public Long getId() {
45    return id;
46  }
47
48  public String getString() {
49    return string;
50  }
51
52  public String[] getArray() {
53    return array;
54  }
55
56  public List<String> getList() {
57    return list;
58  }
59}