1 package mobisnap.common.reservation; 2 3 /*** 4 * @version 0.045 12-Dec-2000 5 * @author Nuno Pregui´┐Ża 6 */ 7 public abstract class ReservationUseBase 8 implements java.io.Serializable 9 { 10 transient ReservationBase rsrv; //used only on client 11 java.rmi.server.UID uid; 12 13 public ReservationUseBase( ReservationBase rsrv) { 14 this.rsrv = rsrv; 15 this.uid = rsrv.getUID(); 16 } 17 18 public java.rmi.server.UID getUID() { 19 return uid; 20 } 21 22 public ReservationBase getRsrv() { 23 return rsrv; 24 } 25 26 /*** 27 * Updates the reservation and database according to the current usage - processed 28 * BEFORE the transaction execution. 29 * Returns false if the current usage is not compatible with the associated 30 * reservation. 31 */ 32 public abstract boolean preSrvTrxExeUpdate( ReservationBase rsrv, nmp.dbms.JDBC.Jdbc_Sql database) throws Exception; 33 34 /*** 35 * Updates the reservation and database according to the current usage - processed 36 * AFTER the transaction execution. 37 * Returns true if the transaction has been completely used. 38 */ 39 public abstract boolean postSrvTrxExeUpdate( ReservationBase rsrv, nmp.dbms.JDBC.Jdbc_Sql database) throws Exception; 40 41 /*** 42 * The associated transaction has been committed. Updates the associated 43 * reservation accordingly. 44 * Returns true if the reservation has been completely used 45 */ 46 public abstract boolean commitCltRsrv() throws Exception; 47 48 /*** 49 * The associated transaction has been rollbacked. Updates the associated 50 * reservation accordingly. 51 */ 52 public abstract void rollbackCltRsrv(); 53 }

This page was automatically generated by Maven