airline
Class User

java.lang.Object
  extended by airline.User
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Administrator, Customer

public abstract class User
extends Object
implements Serializable

Represents a registered user for the airline system.

Author:
Michael Goldwasser
See Also:
Serialized Form

Method Summary
abstract  UserSession getSession(Connection connection)
          A factory function producing an appropriate UserSession for this user.
 String getUserID()
          Returns this customer's unique user ID
 boolean verifyPassword(String attempt)
          Compares a given password attempt to the underlying password.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSession

public abstract UserSession getSession(Connection connection)
A factory function producing an appropriate UserSession for this user.

Returns:
the new UserSession.

getUserID

public String getUserID()
Returns this customer's unique user ID


verifyPassword

public boolean verifyPassword(String attempt)
Compares a given password attempt to the underlying password.

Parameters:
attempt - a potential match for the password
Returns:
true if parameter matches the password; false otherwise.