106 CHAPTER 6 n MAPPING WITH ANNOTATIONS CHAPTER (Php web hosting)

106 CHAPTER 6 n MAPPING WITH ANNOTATIONS CHAPTER 6 n MAPPING WITH ANNOTATIONS Listing 6-6. Using the @Id and @Embeddable Annotations to Map a Compound Primary Key package com.hibernatebook.annotations; import javax.persistence.*; @Entity public class Account { private String description; private AccountPk id; public Account (String description) { this.description = description; } protected Account() { } @Id public AccountPk getId() { return this.id; } public String getDescription() { return this.description; } public void setId(AccountPk id) { this.id = id; } public void setDescription(String description) { this.description = description; } @Embeddable public static class AccountPk { private String code; private Integer number; public AccountPk() { } public String getCode() { return this.code; }
Note: If you are looking for high quality webhost to host and run your jsp application check Vision jsp web hosting services

Leave a Reply