⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 address.java

📁 使用struts2及Spring框架对数据库表进行增删改查操作
💻 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 + -