|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
DataStoreInterface Public interface to be used with DataStore. PLEASE EMAIL INTERFACE CHANGE REQUESTS TO TEAM DOUG: esp *team-lead*, mirvin, erock
| Method Summary | |
boolean |
addDenial(int cabid,
Date date)
Records a driver rejection of a customer assignment. |
void |
addMapData(String pictureName,
int x1,
int y1,
int x2,
int y2)
Inserts the data for a map, including the filename and two points representing the bounds of the map. |
boolean |
addPolygonVertex(int polyid,
int vertid,
double x,
double y)
Inserts data representing a polygon's vertex, given 2 integers representing the polygon: Zone/polygon ID ( >= 0 ), the vertex identifier ( > 0 ), and 2 doubles representing an x coordinate and a y coordinate. |
boolean |
addRideRequest(Customer newCustomer)
Stores a Customer object just after it has been created: it will not have a cab yet so it is a "ride request," but should still have all destination information. |
boolean |
cancelRideRequest(Customer theCustomer)
Records the fact that a ride has been canceled by the given customer. |
boolean |
checkCabID(int driverID,
int cabID)
Given 2 integers relaying values corresponding to a driverid and a cabid that need to be checked for validity (i.e. |
Vector |
getAllCabs()
Returns a vector of all of the cab objects stored in the database. |
Vector |
getAllPolygonVertices(int zoneid)
Given an integer representing a Zone/polygon identifier, this method returns all the polygon vertex data associated with that polygon in the form of a vector of polygon vertex objects that contain the desired data |
DataStoreConnection.MapData |
getMapData()
Returns a mapData object pertaining to the *one* set of MapData held in the db. |
ManagerReport |
getReport(int typeOfReport,
int specificity,
int timeInterval,
Date from,
Date to)
Returns a Report designed for a manager of the cab company, given an enumerated type of report. |
void |
removeAllPolygonVertices()
Removes all polygon vertex data from the database. |
boolean |
rideHasFinished(Customer theCustomer,
Date endTime,
double theFare,
double milesTraveled)
Stores the fact that the given customer has reached their destination, and creates and records statistics relevant to the ride. |
boolean |
storeCabRideAssignment(Cab theCab)
Moves the temporary customer info in the rideRequest Table into the Customers table and logs the specific ride information into the rideLog table, given a Cab object. |
boolean |
updateCabRideAssignment(Cab oldCabState,
Cab newCabState)
Updates the ridelog and customer tables, given a cab object representing the previous state of a cab-ride-assignment and a cab object representing the new state of a cab-ride-assignment. |
boolean |
updateRideRequests(Customer oldCustomerState,
Customer newCustomerState)
Updates the information in the database, given current and previous customer information. |
| Method Detail |
public boolean addRideRequest(Customer newCustomer)
newCustomer - Customer object without a cab referencepublic boolean cancelRideRequest(Customer theCustomer)
theCustomer - Customer object who corresponds to a previous ride
request that is to be canceled
public boolean updateRideRequests(Customer oldCustomerState,
Customer newCustomerState)
oldCustomerState - - representing the old customer informationnewCustomerState - - representing the new customer information
public boolean addDenial(int cabid,
Date date)
cabID - Must be a cabID which is previously existingdate - Date object representing the time of denialpublic boolean storeCabRideAssignment(Cab theCab)
theCab - Cab with Customer reference: the customer just assigned to this cab.
Customer CAN NOT have null ETA.
public boolean updateCabRideAssignment(Cab oldCabState,
Cab newCabState)
oldCabState - old Cab object with customer referencenewCabState - new Cab object with customer reference
public boolean rideHasFinished(Customer theCustomer,
Date endTime,
double theFare,
double milesTraveled)
theCustomer - Customer object MUST still have a reference to the cab it rode in.
Should have valid actual pickup time.endTime - Date object representing the time that the ride endedtheFare - double representing the final dollar amount on the metermilesTraveled - double representing the total number of miles traveled on this ride.
Should NOT be 0.0.public Vector getAllCabs()
public boolean addPolygonVertex(int polyid,
int vertid,
double x,
double y)
polyid - >= 0vertid - > 0x - y - public Vector getAllPolygonVertices(int zoneid)
zoneid - - must match a currently stored zonepublic void removeAllPolygonVertices()
public void addMapData(String pictureName,
int x1,
int y1,
int x2,
int y2)
pictureName - x1 - y1 - x2 - y2 - public DataStoreConnection.MapData getMapData()
public ManagerReport getReport(int typeOfReport,
int specificity,
int timeInterval,
Date from,
Date to)
typeOfReport - enumerated integer representing report typespecificity - enumerated integer representing specificitytimeInterval - enumerated integer representing timeInterval, also found in ManagerReportsPanel.from - Date that should be before to, if FROM_DATE_TO_DATE is specified.to -
public boolean checkCabID(int driverID,
int cabID)
driverID - - check for its existance in the dbcabID - - check for its existance in the db
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||