Java tutorial
package org.apache.ojb.ejb; /* Copyright 2003-2005 The Apache Software Foundation * * 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. */ import java.io.Serializable; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle; /** * * @author <a href="mailto:armin@codeAuLait.de">Armin Waibel</a> * @version $Id: PersonVO.java,v 1.1 2007-08-24 22:17:39 ewestfal Exp $ */ public class PersonVO implements Serializable { private Integer personId; private String firstName; private String lastName; private String grade; public PersonVO(Integer personId, String firstName, String lastName, String grade) { this.personId = personId; this.firstName = firstName; this.lastName = lastName; this.grade = grade; } public PersonVO() { } public Integer getPersonId() { return personId; } public void setPersonId(Integer personId) { this.personId = personId; } 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 getGrade() { return grade; } public void setGrade(String grade) { this.grade = grade; } public String toString() { ToStringBuilder buf = new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE); buf.append("personId", personId).append("firstName", firstName).append("lastName", lastName).append("grade", grade); return buf.toString(); } }