com.konakart.blif
Interface BookableProductMgrIf

All Known Implementing Classes:
BookableProductMgr

public interface BookableProductMgrIf

BookableMgrIf Interface which an implementation of this manager must adhere to.


Method Summary
 BookableProductIf getBookableProduct(int productId, BookableProductOptionsIf options)
          Gets a Bookable Product object for a product id
 Product[] getBookableProductConflict(java.lang.String sessionId, ProductIf bookableProd, BookableProductOptionsIf options)
          This method checks to see whether the bookable product passed in as a parameter conflicts with any bookable products that the customer identified by the sessionId has already signed up for.
If no conflicts are found, null is returned.
 Bookings getBookingsPerCustomer(java.lang.String sessionId, DataDescriptorIf dataDesc, BookableProductOptionsIf options)
          Get an array of bookings for a logged in customer.
 Bookings getBookingsPerProduct(DataDescriptorIf dataDesc, int productId, BookableProductOptionsIf options)
          Get an array of bookings for a product.
 int insertBooking(BookingIf booking, BookableProductOptionsIf options)
          Inserts a Booking object into the database.
 int insertBooking(java.lang.String sessionId, BookingIf booking, BookableProductOptionsIf options)
          Inserts a Booking object into the database.
 

Method Detail

getBookingsPerProduct

Bookings getBookingsPerProduct(DataDescriptorIf dataDesc,
                               int productId,
                               BookableProductOptionsIf options)
                               throws com.workingdogs.village.DataSetException,
                                      org.apache.torque.TorqueException,
                                      KKException
Get an array of bookings for a product. The DatDescriptor object may be used to add constraints on the custom fields and to add order by criteria. The following OrderBy criteria are implemented:

Parameters:
dataDesc -
productId -
options - Not used at the moment. May be left null.
Returns:
Returns a Bookings object
Throws:
com.workingdogs.village.DataSetException
org.apache.torque.TorqueException
KKException

getBookingsPerCustomer

Bookings getBookingsPerCustomer(java.lang.String sessionId,
                                DataDescriptorIf dataDesc,
                                BookableProductOptionsIf options)
                                throws java.lang.Exception
Get an array of bookings for a logged in customer. The DatDescriptor object may be used to add constraints on the custom fields and to add order by criteria. The following OrderBy criteria are implemented:

Parameters:
dataDesc -
sessionId -
options - Not used at the moment. May be left null.
Returns:
Returns a Bookings object
Throws:
java.lang.Exception

getBookableProduct

BookableProductIf getBookableProduct(int productId,
                                     BookableProductOptionsIf options)
                                     throws com.workingdogs.village.DataSetException,
                                            org.apache.torque.TorqueException,
                                            KKException
Gets a Bookable Product object for a product id

Parameters:
productId -
options - Not used at the moment. May be left null.
Returns:
Returns a Bookable Product object
Throws:
com.workingdogs.village.DataSetException
org.apache.torque.TorqueException
KKException

insertBooking

int insertBooking(BookingIf booking,
                  BookableProductOptionsIf options)
                  throws java.lang.Exception
Inserts a Booking object into the database. The object must be associated with an existing product through the product id attribute.

Parameters:
booking - A booking object
options - Options allowing an exception to be thrown for exceeding the maximum number of bookings
Returns:
Returns the id of the inserted object
Throws:
java.lang.Exception

insertBooking

int insertBooking(java.lang.String sessionId,
                  BookingIf booking,
                  BookableProductOptionsIf options)
                  throws java.lang.Exception
Inserts a Booking object into the database. The customer must be logged in with a valid session id. The id of the logged in customer is written into the customerId attribute of the Booking object before it is saved. The object must be associated with an existing product through the product id attribute.

Parameters:
sessionId -
booking - A booking object
options - Options allowing an exception to be thrown for exceeding the maximum number of bookings
Returns:
Returns the id of the inserted object
Throws:
java.lang.Exception

getBookableProductConflict

Product[] getBookableProductConflict(java.lang.String sessionId,
                                     ProductIf bookableProd,
                                     BookableProductOptionsIf options)
                                     throws java.lang.Exception
This method checks to see whether the bookable product passed in as a parameter conflicts with any bookable products that the customer identified by the sessionId has already signed up for.
If no conflicts are found, null is returned. If a conflict is found then an array of conflicting bookable products is returned.

Parameters:
sessionId -
bookableProd -
options - Not used at the moment. May be left null.
Returns:
Returns null for no conflict. Otherwise an array of conflicting products is returned.
Throws:
java.lang.Exception


Copyright © 2011 DS Data Systems UK Ltd.