/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
- // Copyright 2008 Google Inc. All Rights Reserved.
- package com.google.appengine.library;
- import java.util.Date;
- import javax.jdo.annotations.IdGeneratorStrategy;
- import javax.jdo.annotations.IdentityType;
- import javax.jdo.annotations.PersistenceCapable;
- import javax.jdo.annotations.Persistent;
- import javax.jdo.annotations.PrimaryKey;
- /**
- * @author kjin@google.com (Kevin Jin)
- *
- */
- @PersistenceCapable(identityType = IdentityType.APPLICATION)
- public class Book {
- @PrimaryKey
- @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
- private Long id;
- @Persistent
- private String category;
-
- @Persistent
- private String lastname;
- @Persistent
- private String firstname;
- @Persistent
- private String title;
- @Persistent
- private Date created;
-
- @Persistent
- private int year;
- public Book(String category, Date created, String firstname, String lastname, String title,
- int year) {
- super();
- this.category = category;
- this.created = created;
- this.firstname = firstname;
- this.lastname = lastname;
- this.title = title;
- this.year = year;
- }
- public Long getId() {
- return id;
- }
- public void setCategory(String category) {
- this.category = category;
- }
- public String getCategory() {
- return category;
- }
- public void setLastname(String lastname) {
- this.lastname = lastname;
- }
- public String getLastname() {
- return lastname;
- }
- public void setFirstname(String firstname) {
- this.firstname = firstname;
- }
- public String getFirstname() {
- return firstname;
- }
- public void setTitle(String title) {
- this.title = title;
- }
- public String getTitle() {
- return title;
- }
- public void setCreated(Date created) {
- this.created = created;
- }
- public Date getCreated() {
- return created;
- }
- public void setYear(int year) {
- this.year = year;
- }
- public int getYear() {
- return year;
- }
- }