Java Reference
In-Depth Information
them back and forth for you. We won't go into the specifics of JPA as we will cover this
topic in more detail in Chapter 7.
Listing 4-20. The Account entity class
package com.appirio;
import javax.persistence.Entity;
import javax.persistence.Id;
@Entity public class Account {
@Id String id;
String name;
String city;
String state;
String phone;
String website;
public Account(String id, String name, String city, String state,
String phone, String website) { = id; = name; = city;
this.state = state; = phone; = website;
* @return the id
public String getId() {
return id;
* @return the name
public String getName() {
return name;
* @param name the name to set
Search WWH ::

Custom Search