PageRenderTime 41ms CodeModel.GetById 32ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/testing/library/src/com/google/appengine/library/Book.java

http://datanucleus-appengine.googlecode.com/
Java | 91 lines | 74 code | 12 blank | 5 comment | 0 complexity | 272b881d87bf8facbd636ac1cb62d128 MD5 | raw file
 1// Copyright 2008 Google Inc. All Rights Reserved.
 2
 3package com.google.appengine.library;
 4
 5import java.util.Date;
 6
 7import javax.jdo.annotations.IdGeneratorStrategy;
 8import javax.jdo.annotations.IdentityType;
 9import javax.jdo.annotations.PersistenceCapable;
10import javax.jdo.annotations.Persistent;
11import javax.jdo.annotations.PrimaryKey;
12
13/**
14 * @author kjin@google.com (Kevin Jin)
15 *
16 */
17@PersistenceCapable(identityType = IdentityType.APPLICATION)
18public class Book {
19  @PrimaryKey
20  @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
21  private Long id;
22
23  @Persistent
24  private String category;
25  
26  @Persistent
27  private String lastname;
28
29  @Persistent
30  private String firstname;
31
32  @Persistent
33  private String title;
34
35  @Persistent
36  private Date created;
37  
38  @Persistent
39  private int year;
40
41  public Book(String category, Date created, String firstname, String lastname, String title,
42      int year) {
43    super();
44    this.category = category;
45    this.created = created;
46    this.firstname = firstname;
47    this.lastname = lastname;
48    this.title = title;
49    this.year = year;
50  }
51  public Long getId() {
52    return id;
53  }
54  public void setCategory(String category) {
55    this.category = category;
56  }
57  public String getCategory() {
58    return category;
59  }
60  public void setLastname(String lastname) {
61    this.lastname = lastname;
62  }
63  public String getLastname() {
64    return lastname;
65  }
66  public void setFirstname(String firstname) {
67    this.firstname = firstname;
68  }
69  public String getFirstname() {
70    return firstname;
71  }
72  public void setTitle(String title) {
73    this.title = title;
74  }
75  public String getTitle() {
76    return title;
77  }
78  public void setCreated(Date created) {
79    this.created = created;
80  }
81  public Date getCreated() {
82    return created;
83  }
84  public void setYear(int year) {
85    this.year = year;
86  }
87  public int getYear() {
88    return year;
89  }
90
91}