1 25 26 package org.objectweb.speedo.pobjects.fetchgroup; 27 28 31 public abstract class Book { 32 33 int isbn; 34 Author author; 35 int pageNb; 36 String type; 37 38 public Book(int isbn, Author author, int pageNb, String type){ 39 this.isbn = isbn; 40 this.author = author; 41 this.pageNb = pageNb; 42 this.type = type; 43 } 44 45 48 public Author getAuthor() { 49 return author; 50 } 51 54 public void setAuthor(Author author) { 55 this.author = author; 56 } 57 60 public int getIsbn() { 61 return isbn; 62 } 63 66 public void setIsbn(int isbn) { 67 this.isbn = isbn; 68 } 69 72 public int getPageNb() { 73 return pageNb; 74 } 75 78 public void setPageNb(int pageNb) { 79 this.pageNb = pageNb; 80 } 81 82 public String getType() { 83 return type; 84 } 85 public void setType(String type) { 86 this.type = type; 87 } 88 public String toString(){ 89 return "[#=" + isbn + ", nb=" + pageNb + ", author=" + (author == null ? "no author":author.toString()) 90 + ", type=" + type + "]"; 91 } 92 } 93 | Popular Tags |