/* * Copyright 2004-2015 the Seasar Foundation and the Others. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ package org.seasar.extension.unit; import java.io.Serializable; /** * @author higa * */ public class Employee implements Serializable { private static final long serialVersionUID = -8710890359270847237L; private long empno; private String ename; private int deptno; private String dname; /** * */ public Employee() { } /** * @param empno */ public Employee(long empno) { this.empno = empno; } /** * @return */ public long getEmpno() { return this.empno; } /** * @param empno */ public void setEmpno(long empno) { this.empno = empno; } /** * @return */ public String getEname() { return this.ename; } /** * @param ename */ public void setEname(String ename) { this.ename = ename; } /** * @return */ public int getDeptno() { return this.deptno; } /** * @param deptno */ public void setDeptno(int deptno) { this.deptno = deptno; } /** * @return */ public String getDname() { return this.dname; } /** * @param dname */ public void setDname(String dname) { this.dname = dname; } public boolean equals(Object other) { if (!(other instanceof Employee)) return false; Employee castOther = (Employee) other; return this.getEmpno() == castOther.getEmpno(); } public int hashCode() { return (int) this.getEmpno(); } public String toString() { StringBuffer buf = new StringBuffer(); buf.append(empno).append(", "); buf.append(ename).append(", "); buf.append(deptno).append(", "); buf.append(dname); return buf.toString(); } }