|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TravelService
A service interface for retrieving hotels and bookings from a backing repository. Also supports the ability to cancel a booking.
Method Summary | |
---|---|
Hotel |
addHotel(Hotel hotel)
|
Preference |
addPreference(String userName,
Preference preference)
Create a new user preference |
void |
cancelBooking(Long id)
Cancel an existing booking. |
Booking |
createBooking(Long hotelId,
String userName)
Create a new, transient hotel booking instance for the given user. |
void |
deletePreference(Long id)
|
List<Booking> |
findBookings(String username)
Find bookings made by the given user |
Hotel |
findHotelById(Long id)
Find hotels by their identifier. |
List<Hotel> |
findHotels(SearchCriteria criteria)
Find hotels available for booking by some criteria. |
Preference |
findPreferenceById(Long id)
|
List<Preference> |
findPreferences(String userName)
|
void |
savePreference(Preference preference)
|
Method Detail |
---|
List<Booking> findBookings(String username)
username
- the user's name
List<Hotel> findHotels(SearchCriteria criteria)
criteria
- the search criteria
Hotel findHotelById(Long id)
id
- the hotel id
Booking createBooking(Long hotelId, String userName)
hotelId
- the hotelIduserName
- the user name
void cancelBooking(Long id)
id
- the booking idPreference addPreference(String userName, Preference preference)
preference
- TODO
Hotel addHotel(Hotel hotel)
List<Preference> findPreferences(String userName)
userName
-
void savePreference(Preference preference)
preference
- void deletePreference(Long id)
preference
- Preference findPreferenceById(Long id)
id
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |