PageRenderTime 13ms CodeModel.GetById 1ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/demos/helloorm/src/com/google/appengine/demos/helloorm/Flight.java

http://datanucleus-appengine.googlecode.com/
Java | 49 lines | 34 code | 11 blank | 4 comment | 0 complexity | c4c14d89de7aaa31201d36d214f50856 MD5 | raw file
 1// Copyright 2008 Google Inc. All Rights Reserved.
 2package com.google.appengine.demos.helloorm;
 3
 4import javax.jdo.annotations.IdGeneratorStrategy;
 5import javax.jdo.annotations.PersistenceCapable;
 6import javax.jdo.annotations.Persistent;
 7import javax.jdo.annotations.PrimaryKey;
 8
 9/**
10 * @author Max Ross <maxr@google.com>
11 */
12@PersistenceCapable(detachable = "true")
13public class Flight {
14
15  @PrimaryKey
16  @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
17  private Long id;
18
19  @Persistent
20  private String orig;
21
22  @Persistent
23  private String dest;
24
25  public Flight(String orig, String dest) {
26    this.orig = orig;
27    this.dest = dest;
28  }
29
30  public Long getId() {
31    return id;
32  }
33
34  public String getOrig() {
35    return orig;
36  }
37
38  public String getDest() {
39    return dest;
40  }
41
42  public void setOrig(String orig) {
43    this.orig = orig;
44  }
45
46  public void setDest(String dest) {
47    this.dest = dest;
48  }
49}