/** * Get (or make) the current record for this reference. */ public Record makeReferenceRecord(RecordOwner recordOwner) { return new TourHeader(recordOwner); }
/** * GetProductRecord Method. */ public Product getProductRecord() { return new TourHeader(this); }
/** * Open the header record. * @return The new header record. */ public Record openHeaderRecord() { return new TourHeader(this); } /**
/** * Get (or make) the current record for this reference. */ public Record makeReferenceRecord(RecordOwner recordOwner) { return new TourHeader(recordOwner); } /**
/** * Create the product record. * Override in the concrete classes. */ public Product getProductRecord() { return new TourHeader(this); }
/** * Override this to open the main file. * <p />You should pass this record owner to the new main file (ie., new MyNewTable(thisRecordOwner)). * @return The new record. */ public Record openMainRecord() { return new TourHeader(this); } /**
/** * Create the product record. * Override in the concrete classes. */ public Product getProductRecord() { return new TourHeader(this); }
/** * Create the product record. * Override in the concrete classes. */ public Product getProductRecord() { return new TourHeader(this); }
/** * Open the header record. * @return The new header record. */ public Record openHeaderRecord() { return new TourHeader(this); } /**
/** * Open the header record. * @return The new header record. */ public Record openHeaderRecord() { return new TourHeader(this); } /**
/** * Override this to open the main file. * <p />You should pass this record owner to the new main file (ie., new MyNewTable(thisRecordOwner)). * @return The new record. */ public Record openMainRecord() { return new TourHeader(this); } /**
/** * OpenHeaderRecord Method. */ public Record openHeaderRecord() { return new TourHeader(this); } /**
/** * OpenHeaderRecord Method. */ public Record openHeaderRecord() { return new TourHeader(this); }
/** * Override this to open the other files in the query. */ public void openOtherRecords() { super.openOtherRecords(); new TourHeader(this); } /**
/** * Override this to open the main file for this session. */ public Record openMainRecord() { Record record = new TourHeader(this); try { // Wrap the record in a ProductSessionObject so the default TableSesionObject isn't used. ProductSession obj = new ProductSession(this, record, null); } catch (RemoteException ex) { ex.printStackTrace(); } return record; } /**
/** * Create the product record for this product type. */ public static Product getProductRecord(String strProductType, RecordOwner recordOwner) { Product recProduct = null; if (Hotel.HOTEL_FILE.equalsIgnoreCase(strProductType)) recProduct = new Hotel(recordOwner); else if (Land.LAND_FILE.equalsIgnoreCase(strProductType)) recProduct = new Land(recordOwner); else if (Air.AIR_FILE.equalsIgnoreCase(strProductType)) recProduct = new Air(recordOwner); else if (Transportation.TRANSPORTATION_FILE.equalsIgnoreCase(strProductType)) recProduct = new Transportation(recordOwner); else if (Car.CAR_FILE.equalsIgnoreCase(strProductType)) recProduct = new Car(recordOwner); else if (Cruise.CRUISE_FILE.equalsIgnoreCase(strProductType)) recProduct = new Cruise(recordOwner); else if (Item.ITEM_FILE.equalsIgnoreCase(strProductType)) recProduct = new Item(recordOwner); else if (TourHeader.TOUR_HEADER_FILE.equalsIgnoreCase(strProductType)) recProduct = new TourHeader(recordOwner); else if (TourModel.TOUR_FILE.equalsIgnoreCase(strProductType)) recProduct = new TourHeader(recordOwner); // Yes - Tour header is a tour component return recProduct; } /**
/** * Override this to Setup all the records for this query. * Only used for querys and abstract-record queries. * Actually adds records not tables, but the records aren't physically * added here, the record's tables are added to my table. * @param The recordOwner to pass to the records that are added. * @see addTable. */ public void addTables(RecordOwner recordOwner) { this.addTable(new TourHeader(recordOwner)); this.addTable(new City(recordOwner)); this.addTable(new Vendor(recordOwner)); } /**
/** * Override this to open the other files in the query. */ public void openOtherRecords() { super.openOtherRecords(); if (m_recHeader != null) this.addRecord(m_recHeader, false); else { String strType = this.getProperty(TourHeaderOption.TOUR_OR_OPTION); if (TourHeaderOption.OPTION.equals(strType)) m_recHeader = new TourHeaderOption(this); else m_recHeader = new TourHeader(this); } ((ReferenceField)this.getMainRecord().getField(TourHeaderOption.TOUR_OR_OPTION_ID)).setReferenceRecord(m_recHeader); } /**
fldTourOrOption.setString(strOption); if (TourHeaderOption.TOUR.equals(strOption)) m_recHeader = new TourHeader(this); else m_recHeader = new TourHeaderOption(this); else m_recHeader = new TourHeader(this);
recTourHeader = new TourHeader(recordOwner);