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

📄 employee.java

📁 基于Spring、Struts2、TopLink框架及ExtJs框架设计的一个简单Web开发应用框架
💻 JAVA
字号:
package com.domain;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@SequenceGenerator(name = "employee_seq", allocationSize = 1)
public class Employee {

	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "employee_seq")
	private long empid;
	
	@Column(length = 6)
	private String empno;
	
	@Column(length = 6)
	private String firstName;
	
	@Column(length = 6)
	private String lastName;
	
	@Column(length = 10)
	private String job;
	
	@Column(length = 8)
	private String education;
	
	@Column(length = 1)
	private char sex;
	
	@Column(precision = 12, scale = 2)
	private double salary;
	
	@Temporal(TemporalType.DATE)
	private Date birthday;
	
	@OneToOne(cascade = CascadeType.ALL)
	private Address addr;	

	public Employee(){}
	
	public Employee(String empno, String firstName, String lastName,
			String job, String education, char sex, double salary, Address addr, Date birthday) {
		super();
		this.empno = empno;
		this.firstName = firstName;
		this.lastName = lastName;
		this.job = job;
		this.education = education;
		this.sex = sex;
		this.salary = salary;
		this.addr = addr;
		this.birthday = birthday;
	}
	
	public Address getAddr() {
		return addr;
	}

	public void setAddr(Address addr) {
		this.addr = addr;
	}

	public String getEmpno() {
		return empno;
	}

	public void setEmpno(String empno) {
		this.empno = empno;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getJob() {
		return job;
	}

	public void setJob(String job) {
		this.job = job;
	}

	public String getEducation() {
		return education;
	}

	public void setEducation(String education) {
		this.education = education;
	}

	public char getSex() {
		return sex;
	}

	public void setSex(char sex) {
		this.sex = sex;
	}

	public double getSalary() {
		return salary;
	}

	public void setSalary(double salary) {
		this.salary = salary;
	}

	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	public long getEmpid() {
		return empid;
	}

	

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -