org.apache.jdo.tck.pc.company
Class FullTimeEmployee

java.lang.Object
  extended byorg.apache.jdo.tck.pc.company.Person
      extended byorg.apache.jdo.tck.pc.company.Employee
          extended byorg.apache.jdo.tck.pc.company.FullTimeEmployee
All Implemented Interfaces:
java.lang.Comparable, java.util.Comparator, DeepEquality, IEmployee, IFullTimeEmployee, IPerson, java.io.Serializable

public class FullTimeEmployee
extends Employee
implements IFullTimeEmployee

This class represents a full-time employee.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.apache.jdo.tck.pc.company.Person
Person.Oid
 
Field Summary
 
Fields inherited from class org.apache.jdo.tck.pc.company.Person
formatter
 
Constructor Summary
FullTimeEmployee()
          This is the JDO-required no-args constructor.
FullTimeEmployee(long personid, java.lang.String first, java.lang.String last, java.lang.String middle, java.util.Date born, java.util.Date hired, double sal)
          Construct a full-time employee.
FullTimeEmployee(long personid, java.lang.String first, java.lang.String last, java.lang.String middle, java.util.Date born, IAddress addr, java.util.Date hired, double sal)
          Construct a full-time employee.
 
Method Summary
 boolean deepCompareFields(java.lang.Object other, EqualityHelper helper)
          Returns true if all the fields of this instance are deep equal to the coresponding fields of the specified FullTimeEmployee.
 java.lang.String getFieldRepr()
          Returns a String representation of the non-relationship fields.
 double getSalary()
          Get the salary of the full time employee.
 void setSalary(double salary)
          Set the salary for the full-time employee.
 java.lang.String toString()
          Return a String representation of a FullTimeEmployee object.
 
Methods inherited from class org.apache.jdo.tck.pc.company.Employee
addAdvisee, addProject, addReviewedProjects, addToTeam, getDentalInsurance, getDepartment, getFundingDept, getHiredate, getHradvisees, getHradvisor, getManager, getMedicalInsurance, getMentor, getProjects, getProtege, getReviewedProjects, getTeam, getWeeklyhours, removeAdvisee, removeFromTeam, removeProject, removeReviewedProject, setDentalInsurance, setDepartment, setFundingDept, setHiredate, setHradvisees, setHradvisor, setManager, setMedicalInsurance, setMentor, setProjects, setProtege, setReviewedProjects, setTeam, setWeeklyhours
 
Methods inherited from class org.apache.jdo.tck.pc.company.Person
compare, compare, compareTo, compareTo, equals, getAddress, getBirthdate, getFirstname, getLastname, getMiddlename, getPersonid, getPhoneNumber, getPhoneNumbers, hashCode, putPhoneNumber, removePhoneNumber, setAddress, setBirthdate, setFirstname, setLastname, setLastname, setMiddlename, setPersonid, setPhoneNumbers
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.jdo.tck.pc.company.IEmployee
getDentalInsurance, getDepartment, getFundingDept, getHiredate, getHradvisees, getHradvisor, getManager, getMedicalInsurance, getMentor, getProjects, getProtege, getReviewedProjects, getTeam, getWeeklyhours, setDentalInsurance, setDepartment, setFundingDept, setHiredate, setHradvisees, setHradvisor, setManager, setMedicalInsurance, setMentor, setProjects, setProtege, setReviewedProjects, setTeam, setWeeklyhours
 
Methods inherited from interface org.apache.jdo.tck.pc.company.IPerson
getAddress, getBirthdate, getFirstname, getLastname, getMiddlename, getPersonid, getPhoneNumbers, setAddress, setBirthdate, setFirstname, setLastname, setMiddlename, setPersonid, setPhoneNumbers
 

Constructor Detail

FullTimeEmployee

public FullTimeEmployee()
This is the JDO-required no-args constructor. The TCK relies on this constructor for testing PersistenceManager.newInstance(PCClass).


FullTimeEmployee

public FullTimeEmployee(long personid,
                        java.lang.String first,
                        java.lang.String last,
                        java.lang.String middle,
                        java.util.Date born,
                        java.util.Date hired,
                        double sal)
Construct a full-time employee.

Parameters:
personid - The person identifier.
first - The person's first name.
last - The person's last name.
middle - The person's middle name.
born - The person's birthdate.
hired - The date that the person was hired.
sal - The salary of the full-time employee.

FullTimeEmployee

public FullTimeEmployee(long personid,
                        java.lang.String first,
                        java.lang.String last,
                        java.lang.String middle,
                        java.util.Date born,
                        IAddress addr,
                        java.util.Date hired,
                        double sal)
Construct a full-time employee.

Parameters:
personid - The person identifier.
first - The person's first name.
last - The person's last name.
middle - The person's middle name.
born - The person's birthdate.
addr - The person's address.
hired - The date that the person was hired.
sal - The salary of the full-time employee.
Method Detail

getSalary

public double getSalary()
Get the salary of the full time employee.

Specified by:
getSalary in interface IFullTimeEmployee
Returns:
The salary of the full time employee.

setSalary

public void setSalary(double salary)
Set the salary for the full-time employee.

Specified by:
setSalary in interface IFullTimeEmployee
Parameters:
salary - The salary to set for the full-time employee.

toString

public java.lang.String toString()
Return a String representation of a FullTimeEmployee object.

Overrides:
toString in class Employee
Returns:
a String representation of a FullTimeEmployee object.

getFieldRepr

public java.lang.String getFieldRepr()
Returns a String representation of the non-relationship fields.

Overrides:
getFieldRepr in class Employee
Returns:
a String representation of the non-relationship fields.

deepCompareFields

public boolean deepCompareFields(java.lang.Object other,
                                 EqualityHelper helper)
Returns true if all the fields of this instance are deep equal to the coresponding fields of the specified FullTimeEmployee.

Specified by:
deepCompareFields in interface DeepEquality
Overrides:
deepCompareFields in class Employee
Parameters:
other - the object with which to compare.
helper - EqualityHelper to keep track of instances that have already been processed.
Returns:
true if all the fields are deep equal; false otherwise.
Throws:
java.lang.ClassCastException - if the specified instances' type prevents it from being compared to this instance.


Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.