Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
EasyBeans Copyright (C) 2006 Bull S.A.S. Contact: easybeans@ow2.org This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -------------------------------------------------------------------------- $Id: Employee.java 1970 2007-10-16 11:49:25Z benoitf $ --------------------------------------------------------------------------
package org.ow2.easybeans.examples.entitybean;
Define an employee with an id and a name.

Author(s):
Florent Benoit
@Table(name = "EMPLOYEES")
public class Employee implements java.io.Serializable {

    
Id for serializable class.
    private static final long serialVersionUID = -2366200007462547454L;

    
Id of this employee.
    private int id;

    
Name of the employee.
    private String name;

    
Gets the Id of the employee.

Returns:
the id of the employee.
    @Id
    public int getId() {
        return ;
    }

    
Sets id of the employee.

Parameters:
id the id's employee
    public void setId(final int id) {
        this. = id;
    }

    
Sets the name.

Parameters:
name of employee.
    public void setName(final String name) {
        this. = name;
    }

    
Gets the name of the employee.

Returns:
name of the employee.
    public String getName() {
        return ;
    }

    
Computes a string representation of this employee.

Returns:
string representation.
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("Employee[id=").append(getId()).append(", name=").append(getName()).append("]");
        return sb.toString();
    }
New to GrepCode? Check out our FAQ X