//============================================================================== // EmployeeInfo.java //============================================================================== package tribble.sql.test; import java.io.IOException; import java.io.PrintStream; import java.util.Date; /******************************************************************************* * Test data class for class {@link tribble.sql.SqlObjectQuery}. * * *
* Copyright ©2008 by David R. Tribble, all rights reserved.
* Permission is granted to any person or entity except those designated by
* by the United States Department of State as a terrorist, or terrorist
* government or agency, to use and distribute this source code provided
* that the original copyright notice remains present and unaltered.
*
* @see Test1
*/
public class EmployeeInfo
{
static final String REV =
"@(#)tribble/sql/test/EmployeeInfo.java $Revision: 1.5 $ $Date: 2008/09/06 18:41:58 $\n";
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
// Variables
/** Employee ID. */
public int m_id;
/** First name. */
private String m_firstName;
/** Last name. */
private String m_lastName;
/** Hire date. */
private Date m_hireDate;
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
// Constructor
public EmployeeInfo()
{ }
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
// Methods
int getEmployeeID()
{
return m_id;
}
/*-NOT USED
public void setEmployeeID(int id)
{
m_id = id;
}
-*/
String getFirstName()
{
return m_firstName;
}
public void setFirstName(String s)
{
m_firstName = s;
}
String getLastName()
{
return m_lastName;
}
public void setLastName(String s)
{
m_lastName = s;
}
Date getHireDate()
{
return m_hireDate;
}
public void setHireDate(Date when)
{
m_hireDate = when;
}
/***************************************************************************
* Pretty-print the contents of this {@link EmployeeInfo} object.
*
* @since 1.1, 2008-09-02
*/
void print(PrintStream out)
throws IOException
{
// Sanity check
if (out == null)
return;
// Display the contents of this object
out.println(" m_id . . . . . : " + m_id);
out.println(" m_firstName . : " + m_firstName);
out.println(" m_lastName . . : " + m_lastName);
out.println(" m_hireDate . . : " + m_hireDate.toString());
out.flush();
}
}
// End EmployeeInfo.java