All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JBMSTours.triggers.TriggerActions

java.lang.Object
   |
   +----JBMSTours.triggers.TriggerActions

public class TriggerActions
extends Object

Constructor Index

 o TriggerActions()

Method Index

 o auditCities(Connection, String)
 o cityChanged()
 o deleteOrRedoHotelBooking(Connection, Date)
This trigger action is called by the trigger "HotelsCascadingDelete2 in toursDB".
 o deleteRelatedHotels(Connection)
 o deleteRelatedHotels2(Connection)
 o hotelChanged(Connection)
 o showNewBookings(Connection)

Constructors

 o TriggerActions
 public TriggerActions()

Methods

 o deleteOrRedoHotelBooking
 public static void deleteOrRedoHotelBooking(Connection conn,
                                             Date today) throws SQLException
This trigger action is called by the trigger "HotelsCascadingDelete2 in toursDB".

This is a very complex action. If a hotel is deleted, check to see if there are any future bookings for that hotel. If so, automatically rebook those tours for a different (valid) hotel before deleting the hotel.

Parameters:
conn - Current connection to the database.
today - The current date (date of the delete).
Throws: SQLException
if database error
 o deleteRelatedHotels
 public static void deleteRelatedHotels(Connection conn) throws Throwable
 o deleteRelatedHotels2
 public static void deleteRelatedHotels2(Connection conn) throws Throwable
 o showNewBookings
 public static void showNewBookings(Connection conn) throws SQLException
 o auditCities
 public static void auditCities(Connection conn1,
                                String user) throws Throwable
 o hotelChanged
 public static void hotelChanged(Connection conn) throws Throwable
 o cityChanged
 public static void cityChanged() throws Throwable

All Packages  Class Hierarchy  This Package  Previous  Next  Index