?? address.java
字號:
package crud.model;
import javax.persistence.*;
/**
* The name of a person and their address.
*/
@Entity
public class Address
{
String address;
String name;
String city;
String state;
String zipcode;
/** a unique, database generated, identifier for this record.
*/
private Long id;
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
public Long getId() { return this.id; }
public void setId(Long l) { this.id = l; }
public void setName(String s ) { this.name = s; }
public void setAddress(String s ) { this.address = s; }
public void setCity(String s ) { this.city = s; }
public void setState(String s ) { this.state = s; }
public void setZipcode(String s ) { this.zipcode = s; }
@Column (length=32)
public String getName() { return this.name; }
public String getAddress() { return this.address; }
@Column (length=32)
public String getCity() { return this.city; }
@Column (length=2)
public String getState() { return this.state; }
public String getZipcode() { return this.zipcode; }
public String toString()
{
return this.name + "," + this.address + "," + this.city + "," + this.state + "," + this.zipcode;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -