1 package mobisnap.common.reservation;
2
3 import java.io.*;
4 import mobisnap.mobile_trx.*;
5
6 /***
7 * Represents a value-change reservation
8 *
9 * @version 5-Apr-2001
10 * @author
11 */
12 public class ValueChangeReservation
13 extends ReservationBase
14 implements Serializable
15 {
16 int triggerCode;
17
18 public ValueChangeReservation( String table, String column, int triggerCode) {
19 super( table, column);
20 this.triggerCode = triggerCode;
21 }
22
23 public int getTriggerCode(){
24 return triggerCode;
25 }
26
27 /***
28 * Checks the given parameters are backed up by this reservation.
29 * If so, it is returned a REservationUseBase object
30 * It doesn's associate a reservation with any variable, it just checks a given record value
31 * @param var Variable involved
32 * @param table Table name of possible reservation
33 * @param column Column name of possible reservation
34 * @param where Table row specification
35 * @return Return null if there is no associateion between the given parameters
36 * ans this reservation. Otherwise returns a class to represent the reservation use
37 */
38 public ReservationUseBase checkReservation( MSQLTVariable var, String table, String column, SimpleNode where) {
39 if( checkReservation( table, column, where) && (var == null)) {
40 ReservationUseBase rub = new ValueChangeReservationUse( this);
41 return rub;
42 }
43 return null;
44
45 }
46
47 /***
48 * Returns a readable representation of this reervation - format:<BR>
49 * escrow rsrv_id reservation column from table where row specification value number
50 */
51 public String toString() {
52 return "VALUE-CHANGE " + super.toString() ;
53 }
54 }
This page was automatically generated by Maven