PageRenderTime 100ms CodeModel.GetById 86ms app.highlight 10ms RepoModel.GetById 2ms app.codeStats 0ms

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

http://datanucleus-appengine.googlecode.com/
Java | 137 lines | 90 code | 32 blank | 15 comment | 0 complexity | e85dc8ada8ab64d187bcae10d4d53489 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 javax.jdo.annotations.IdGeneratorStrategy;
 19import javax.jdo.annotations.NullValue;
 20import javax.jdo.annotations.PersistenceCapable;
 21import javax.jdo.annotations.Persistent;
 22import javax.jdo.annotations.PrimaryKey;
 23
 24@PersistenceCapable
 25public class HasNotNullConstraintsJDO {
 26  @PrimaryKey
 27  @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
 28  private Long id;
 29  
 30  @Persistent(nullValue = NullValue.EXCEPTION)
 31  private Boolean bool;
 32
 33  @Persistent(nullValue = NullValue.EXCEPTION)
 34  private Character c;
 35
 36  @Persistent(nullValue = NullValue.EXCEPTION)
 37  private Byte b;
 38
 39  @Persistent(nullValue = NullValue.EXCEPTION)
 40  private Short s;
 41
 42  @Persistent(nullValue = NullValue.EXCEPTION)
 43  private Integer i;
 44  
 45  @Persistent(nullValue = NullValue.EXCEPTION)
 46  private Long l;
 47
 48  @Persistent(nullValue = NullValue.EXCEPTION)
 49  private Float f;
 50
 51  @Persistent(nullValue = NullValue.EXCEPTION)
 52  private Double d;
 53  
 54  @Persistent(nullValue = NullValue.EXCEPTION)
 55  private String str;
 56  
 57  public Boolean getBool() {
 58    return bool;
 59  }
 60
 61  public void setBool(Boolean bool) {
 62    this.bool = bool;
 63  }
 64
 65  public Character getC() {
 66    return c;
 67  }
 68
 69  public void setC(Character c) {
 70    this.c = c;
 71  }
 72
 73  public Byte getB() {
 74    return b;
 75  }
 76
 77  public void setB(Byte b) {
 78    this.b = b;
 79  }
 80
 81  public Short getS() {
 82    return s;
 83  }
 84
 85  public void setS(Short s) {
 86    this.s = s;
 87  }
 88
 89  public Integer getI() {
 90    return i;
 91  }
 92
 93  public void setI(Integer i) {
 94    this.i = i;
 95  }
 96
 97  public Long getL() {
 98    return l;
 99  }
100
101  public void setL(Long l) {
102    this.l = l;
103  }
104
105  public Float getF() {
106    return f;
107  }
108
109  public void setF(Float f) {
110    this.f = f;
111  }
112
113  public Double getD() {
114    return d;
115  }
116
117  public void setD(Double d) {
118    this.d = d;
119  }
120
121  public void setId(Long id) {
122    this.id = id;
123  }
124
125  public Long getId() {
126    return id;
127  }
128
129  public String getStr() {
130    return str;
131  }
132
133  public void setStr(String str) {
134    this.str = str;
135  }
136
137}