CSVObjects Framework

test.net.sf.anupam.csv.beans
Class Employee

java.lang.Object
  extended by test.net.sf.anupam.csv.beans.Employee
All Implemented Interfaces:
Comparable<Employee>

public class Employee
extends Object
implements Comparable<Employee>

Sample bean to represent an employee.

Version:
$Revision: 1.2 $
Author:
Anupam Sengupta
CSV Mapping:
Mapped Bean Name: "employeeBean"
Has CSV Header: "true"

Constructor Summary
Employee()
          Default Constructor.
 
Method Summary
 int compareTo(Employee other)
          Compares this employee against another employee for ordering purposes.
 boolean equals(Object other)
          Compares this employee against another for equality.
 String getClientSuppliedID()
          Returns value of the clientSuppliedID.
 String getClientSuppliedSecondaryID()
          Returns value of the clientSuppliedSecondaryID.
 Designation getDesignation()
          Returns value of the designation.
 String getEmployeeID()
          Return the employee ID.
 String getFirstName()
          Returns the first name.
 String getLastName()
          Returns the last name.
 int hashCode()
          Returns the hashcode for this employee.
 void setClientSuppliedID(String clientSuppliedID)
          Sets value of the clientSuppliedID.
 void setClientSuppliedSecondaryID(String clientSuppliedSecondaryID)
          Sets value of the clientSuppliedSecondaryID.
 void setDesignation(Designation designation)
          Sets value of the designation.
 void setEmployeeID(String employeeID)
          Sets the employee ID.
 void setFirstName(String firstName)
          Set the first name.
 void setLastName(String lastName)
          Sets the last name.
 String toString()
          Returns a string representation of this employee for debugging purposes only.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Employee

public Employee()
Default Constructor.

Method Detail

getClientSuppliedID

public String getClientSuppliedID()
Returns value of the clientSuppliedID.

Returns:
Returns the clientSuppliedID.
CSV Field Mapping:
CSV Field Position: "8"
Reformatter: None

setClientSuppliedID

public void setClientSuppliedID(String clientSuppliedID)
Sets value of the clientSuppliedID.

Parameters:
clientSuppliedID - The clientSuppliedID to set.

getClientSuppliedSecondaryID

public String getClientSuppliedSecondaryID()
Returns value of the clientSuppliedSecondaryID.

Returns:
Returns the clientSuppliedSecondaryID.
CSV Field Mapping:
CSV Field Position: "7"
Reformatter: None

setClientSuppliedSecondaryID

public void setClientSuppliedSecondaryID(String clientSuppliedSecondaryID)
Sets value of the clientSuppliedSecondaryID.

Parameters:
clientSuppliedSecondaryID - The clientSuppliedSecondaryID to set.

setEmployeeID

public void setEmployeeID(String employeeID)
Sets the employee ID.

Parameters:
employeeID - The employeeID to set.

getEmployeeID

public String getEmployeeID()
Return the employee ID.

Returns:
Returns the employeeID.
CSV Field Mapping:
CSV Field Position: "1"
Reformatter: None

setFirstName

public void setFirstName(String firstName)
Set the first name.

Parameters:
firstName - The firstName to set.

getFirstName

public String getFirstName()
Returns the first name.

Returns:
Returns the firstName.
CSV Field Mapping:
CSV Field Position: "2"
Reformatter: "firstWord"

setLastName

public void setLastName(String lastName)
Sets the last name.

Parameters:
lastName - The lastName to set.

getLastName

public String getLastName()
Returns the last name.

Returns:
Returns the lastName.
CSV Field Mapping:
CSV Field Position: "2"
Reformatter: "lastWord"

compareTo

public int compareTo(Employee other)
Compares this employee against another employee for ordering purposes. The comparision is based on the employee ID.

Specified by:
compareTo in interface Comparable<Employee>
Parameters:
other - the other employee to compare against
Returns:
0 if the two employee are equal, -1 if this employee ID is lower, +1 if this employee ID is higher
See Also:
Comparable.compareTo(Object)

equals

public boolean equals(Object other)
Compares this employee against another for equality. The comparision is based on the employee ID.

Overrides:
equals in class Object
Parameters:
other - the other employee to compare against
Returns:
true if equal, false otherwise
See Also:
Object.equals(Object)

hashCode

public int hashCode()
Returns the hashcode for this employee. The hash code is based on the employee ID.

Overrides:
hashCode in class Object
Returns:
the hash code
See Also:
Object.hashCode()

toString

public String toString()
Returns a string representation of this employee for debugging purposes only.

Overrides:
toString in class Object
Returns:
the string representation
See Also:
Object.toString()

getDesignation

public Designation getDesignation()
Returns value of the designation.

Returns:
Returns the designation.
CSV Field Mapping:
CSV Field Position: "3"
Reformatter: None

setDesignation

public void setDesignation(Designation designation)
Sets value of the designation.

Parameters:
designation - The designation to set.

SourceForge.net Logo

© Anupam Sengupta 2005