src/com/vehiclerental/presentationLayer/branch/StaffBranchController.java
/**
     * Fetches all the bookings for a specified branch
     *
     * @param request the request parameters
     * @return the result response
     */
Fetches all the bookings for a specified branch
@param request the request parameters
@return the result response
Fetches all the bookings for a specified branch @param request the request parameters @return the result response
protected static BranchResponseMessage handleGetBranchBookings(BranchRequestMessage<Void> request) {
        try {
            BookingService bookingService = ServiceFactory.getBookingService();
            List<BookingContract> bookingContracts = bookingService.getBookingsForBranch(NodeConfiguration.Current.nodeBranch);
            return generateSuccessfulResponse(request.operationCode, bookingContracts);
        } catch (Exception e) {
            System.out.println(e.getMessage());
            e.printStackTrace();
            return generateError(request.operationCode, 500, "Branch error");
        }
    }
protected static BranchResponseMessage handleGetBranchBookings ( BranchRequestMessage < Void > request ) { try { BookingService bookingService = ServiceFactory . getBookingService ( ) ; List < BookingContract > bookingContracts = bookingService . getBookingsForBranch ( NodeConfiguration . Current . nodeBranch ) ; return generateSuccessfulResponse ( request . operationCode , bookingContracts ) ; } catch ( Exception e ) { System . out . println ( e . getMessage ( ) ) ; e . printStackTrace ( ) ; return generateError ( request . operationCode , 500 , "Branch error" ) ; } }
Fetches all the bookings for a specified branch
 @param request the request parameters
 @return the result response
Fetches all the bookings for a specified branch @param request the request parameters @return the result response