CHAPTER 6 n MAPPING WITH ANNOTATIONS 133 n (Web server version)

CHAPTER 6 n MAPPING WITH ANNOTATIONS 133 n MAPPING WITH ANNOTATIONS 133 // Constructors… protected Book() { } public Book(String title, int pages) { this.title = title; this.pages = pages; } // Getters… @Id @GeneratedValue public int getId() { return id; } @Column(name = “working_title”, length = 200, nullable = false) public String getTitle() { return title; } public int getPages() { return pages; } @Transient public Date getPublicationDate() { return publicationDate; } @ManyToOne @JoinColumn(name = “publisher_id”) public Publisher getPublisher() { return publisher; } @ManyToMany(cascade = ALL) public Set getAuthors() { return authors; } // Setters…
Note: In case you are looking for affordable and reliable webhost to host and run your business application check Vision ftp web hosting services

Leave a Reply