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

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

http://datanucleus-appengine.googlecode.com/
Java | 72 lines | 40 code | 14 blank | 18 comment | 0 complexity | 7e094b353d135d1ff6d8c45107e96949 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 java.util.List;
19
20import javax.persistence.Entity;
21import javax.persistence.GeneratedValue;
22import javax.persistence.GenerationType;
23import javax.persistence.Id;
24
25/**
26 * @author Max Ross <maxr@google.com>
27 */
28@Entity
29public class HasEnumJPA {
30  @Id
31  @GeneratedValue(strategy= GenerationType.IDENTITY)
32  private Long key;
33
34  private MyEnum myEnum;
35  private MyEnum[] myEnumArray;
36  private List<MyEnum> myEnumList;
37
38
39  public Long getKey() {
40    return key;
41  }
42
43  public void setKey(Long key) {
44    this.key = key;
45  }
46
47  public MyEnum getMyEnum() {
48    return myEnum;
49  }
50
51  public void setMyEnum(MyEnum myEnum) {
52    this.myEnum = myEnum;
53  }
54
55  public MyEnum[] getMyEnumArray() {
56    return myEnumArray;
57  }
58
59  public void setMyEnumArray(MyEnum[] myEnumArray) {
60    this.myEnumArray = myEnumArray;
61  }
62
63  public List<MyEnum> getMyEnumList() {
64    return myEnumList;
65  }
66
67  public void setMyEnumList(List<MyEnum> myEnumList) {
68    this.myEnumList = myEnumList;
69  }
70
71  public enum MyEnum {V1, V2};
72}