|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--taxisrus.implementation.Customer
Customer object Represents a human customer.
| Field Summary | |
protected Date |
_actualPickupTime
|
protected Cab |
_cab
|
protected Date |
_callInTime
|
protected String |
_corporateAccountName
|
protected String |
_destinationAddress
|
protected Zone |
_destinationZone
|
protected Date |
_ETA
|
protected String |
_firstName
|
protected String |
_id
|
protected boolean |
_isCorporateAccount
|
protected String |
_lastName
|
protected int |
_numberOfRiders
|
protected String |
_phoneNumber
|
protected String |
_pickupAddress
|
protected Date |
_pickupTime
|
protected Zone |
_pickupZone
|
protected int |
_priority
|
protected int |
_status
|
static int |
COMMUNICATING
|
static int |
DEFAULT_STATUS
|
static int |
FAILED_PLACEMENT
|
static int |
HIGH_PRIORITY
|
static int |
PICKED_UP
|
static int |
RIDE_CANCELLED
|
static int |
SCHEDULED
|
static int |
WAITING
|
| Constructor Summary | |
Customer()
Default constructor. |
|
Customer(String firstName,
String lastName)
Constructor with just first and last name of customer Number of riders of this customer is default to 1. |
|
Customer(String firstName,
String lastName,
String phoneNumber)
Constructor with name and phone number of customer Number of riders of this customer is default to 1. |
|
Customer(String firstName,
String lastName,
String phoneNumber,
Date callInTime,
String pickupAddress,
String destinationAddress,
Date pickupTime,
int priority)
Constructor with all possible information of a customer Number of riders of this customer is default to 1. |
|
Customer(String firstName,
String lastName,
String phoneNumber,
Date callInTime,
String pickupAddress,
String destinationAddress,
Date pickupTime,
int priority,
int numberOfRiders,
String corporateAccountName)
Constructor with all possible information of a corporate account |
|
| Method Summary | |
Date |
getActualPickupTime()
Returns the actual pickup time of the customer. |
Cab |
getCab()
Gets the cab assigned to this customer. |
Date |
getCallInTime()
Gets the time of customer call for the cab. |
String |
getCorporateAccountName()
Returns the name of corporate account. |
String |
getDestinationAddress()
Gets the destination address. |
Zone |
getDestinationZone()
Gets destination zone. |
Date |
getETA()
Gets the ETA corresponding to the customer for the data store. |
String |
getFirstName()
Gets first name of customer. |
String |
getId()
Gets the ID of this customer. |
String |
getLastName()
Gets last name of customer. |
int |
getNumberOfRiders()
Gets the number of riders of this customer. |
String |
getPhoneNumber()
Gets customer's phone number |
String |
getPickupAddress()
Gets the pickup address. |
Date |
getPickupTime()
Gets the customer's requested pickup time. |
Zone |
getPickupZone()
Gets pickup zone. |
int |
getPriority()
Gets the customer priority. |
int |
getStatus()
Gets the status of this customer WAITING = 0 SCHEDULED = 1 PICKED_UP = 2 |
boolean |
isCorporateAccount()
Returns whether customer is a corporate account. |
void |
setActualPickupTime(Date actualPickupTime)
Sets actual pickup time. |
void |
setCab(Cab cab)
Sets the cab for this customer. |
void |
setCallInTime(Date callInTime)
Sets the time of customer call for the cab. |
void |
setCorporateAccountName(String corporateAccountName)
Sets the corporate account name. |
void |
setDestinationAddress(String destinationAddress)
Sets the destination address of customer. |
void |
setDestinationZone(Zone destinationZone)
Sets destination zone. |
void |
setETA(Date date)
Sets the ETA for the customer corresponding ETA for storage in the data store. |
void |
setIsCorporateAccount(boolean corp)
Sets whether customer is a corporate account |
void |
setName(String firstName,
String lastName)
Sets name of customer. |
void |
setNumberOfRiders(int numberOfRiders)
Sets the number of riders of this customer. |
void |
setPhoneNumber(String phoneNumber)
Sets customer's phone number. |
void |
setPickupAddress(String pickupAddress)
Sets the pickup address of customer. |
void |
setPickupTime(Date pickupTime)
Sets the customer's requested pickup time. |
void |
setPickupZone(Zone pickupZone)
Sets pickup zone. |
void |
setPriority(int priority)
Sets the customer priority. |
void |
setStatus(int status)
Sets the status of this customer. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected String _firstName
protected String _lastName
protected String _corporateAccountName
protected boolean _isCorporateAccount
protected String _phoneNumber
protected Date _callInTime
protected String _pickupAddress
protected Zone _pickupZone
protected String _destinationAddress
protected Zone _destinationZone
protected Date _pickupTime
protected int _priority
protected Cab _cab
protected int _numberOfRiders
protected int _status
protected String _id
protected Date _ETA
protected Date _actualPickupTime
public static final int DEFAULT_STATUS
public static final int WAITING
public static final int COMMUNICATING
public static final int SCHEDULED
public static final int HIGH_PRIORITY
public static final int RIDE_CANCELLED
public static final int PICKED_UP
public static final int FAILED_PLACEMENT
| Constructor Detail |
public Customer()
public Customer(String firstName,
String lastName)
firstName - customer's first namelastName - customer's last name
public Customer(String firstName,
String lastName,
String phoneNumber)
firstName - customer's first namelastName - customer's last namephoneNumber - customer's phone number
public Customer(String firstName,
String lastName,
String phoneNumber,
Date callInTime,
String pickupAddress,
String destinationAddress,
Date pickupTime,
int priority)
firstName - lastName - phoneNumber - pickupAddress - destinationAddress - pickupTime - customer's requested pickup timepriority -
public Customer(String firstName,
String lastName,
String phoneNumber,
Date callInTime,
String pickupAddress,
String destinationAddress,
Date pickupTime,
int priority,
int numberOfRiders,
String corporateAccountName)
firstName - lastName - phoneNumber - pickupAddress - destinationAddress - pickupTime - priority - numberOfRiders - corporateAccountName - | Method Detail |
public void setName(String firstName,
String lastName)
firstName - lastName - public String getFirstName()
public String getLastName()
public void setPhoneNumber(String phoneNumber)
phoneNumber - public String getPhoneNumber()
public void setPickupAddress(String pickupAddress)
pickupAddress - public String getPickupAddress()
public void setPickupZone(Zone pickupZone)
pickupZone - public Zone getPickupZone()
public void setDestinationAddress(String destinationAddress)
destinationAddress - public String getDestinationAddress()
public void setDestinationZone(Zone destinationZone)
destinationZone - public Zone getDestinationZone()
public void setPickupTime(Date pickupTime)
pickupTime - public Date getPickupTime()
public void setPriority(int priority)
priority - public int getPriority()
public void setCab(Cab cab)
cab - public Cab getCab()
public void setNumberOfRiders(int numberOfRiders)
numberOfRiders - public int getNumberOfRiders()
public void setCallInTime(Date callInTime)
callInTime; - public Date getCallInTime()
public String getId()
public void setStatus(int status)
status - public int getStatus()
public Date getETA()
public void setETA(Date date)
ETA - from Scheduler to DataStorepublic boolean isCorporateAccount()
public void setIsCorporateAccount(boolean corp)
corp - true or false; whether the customer is a corporate accountpublic String getCorporateAccountName()
public void setCorporateAccountName(String corporateAccountName)
corporateAccountName - the name of the corporate accountpublic Date getActualPickupTime()
public void setActualPickupTime(Date actualPickupTime)
actualPickupTime - Date object containing the time
at which the customer was picked up.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||