01: package com.uvw.travel;
02:
03: import java.io.Serializable;
04: import java.util.Date;
05:
06: /**
07: * @author Adrian Price
08: */
09: public interface Bookings extends Serializable {
10: interface Booking extends Serializable {
11: int ERROR = -4;
12: int CARD_DECLINED = -3;
13: int UNAVAILABLE = -2;
14: int CANCELLED = -1;
15: int PENDING = 0;
16: int SUCCESS = 1;
17:
18: int getStatus();
19:
20: void setStatus(int status);
21:
22: String getCreditCardAuthorizationCode();
23:
24: void setCreditCardAuthorizationCode(String code);
25:
26: Person[] getPeople();
27:
28: Customer getCustomer();
29:
30: CreditCard getCreditCard();
31: }
32:
33: interface FlightBooking extends Booking {
34: Flight[] getFlights();
35: }
36:
37: interface HotelBooking extends Booking {
38: String getHotelName();
39:
40: Address getHotelAddress();
41:
42: Date getCheckinDate();
43:
44: Date getCheckoutDate();
45: }
46:
47: interface RentalCarBooking extends Booking {
48: String SMALL = "SMALL";
49: String MEDIUM = "MEDIUM";
50: String LARGE = "LARGE";
51:
52: String getRentalAgency();
53:
54: String getCarClass();
55:
56: Date getPickupDate();
57:
58: Date getDropoffDate();
59: }
60:
61: Customer getCustomer();
62:
63: CreditCard getCreditCard();
64:
65: FlightBooking createFlightBooking(Person[] people, Flight[] flights);
66:
67: HotelBooking createHotelBooking(Person[] people, String hotelName,
68: Address hotelAddress, Date checkinDate, Date checkoutDate);
69:
70: RentalCarBooking createRentalCarBooking(Person[] people,
71: String rentalAgency, String carClass, Date pickupDate,
72: Date dropoffDate);
73:
74: FlightBooking getFlightBooking();
75:
76: HotelBooking getHotelBooking();
77:
78: RentalCarBooking getRentalCarBooking();
79: }
|