/** * GetMessageVersion Method. */ public MessageVersion getMessageVersion() { return (MessageVersion)((ReferenceField)this.getField(MessageControl.kDefaultVersionID)).getReferenceRecord(); } /**
/** * Get the main (Booking) record for this detail record. * Note: This will only return the main record if it already exists. */ public BookingModel getBooking(boolean bCreateAndReadCurrent) { ReferenceField fldBookingID = (ReferenceField)this.getField(BookingSub.BOOKING_ID); if (bCreateAndReadCurrent) return (Booking)fldBookingID.getReference(); else return (Booking)fldBookingID.getReferenceRecord(null, false); }
/** * Override this to open the other files in the query. */ public void openOtherRecords() { super.openOtherRecords(); Record recContactType = ((ReferenceField)this.getMainRecord().getField(MessageDetail.kContactTypeID)).getReferenceRecord(this); } /**
/** * Override this to open the other files in the query. */ public void openOtherRecords() { ((ReferenceField)this.getMainRecord().getField(MessageDetail.kContactTypeID)).getReferenceRecord(this); super.openOtherRecords(); } /**
/** * Override this to add record listeners and filters to every screen where this is the main record. * @param screen The screen these listeners will be in. */ public void addScreenListeners(RecordOwner screen) { super.addScreenListeners(screen); String strManualTransportID = Integer.toString(((ReferenceField)this.getField(BookingDetail.COST_MESSAGE_TRANSPORT_ID)).getIDFromCode(MessageTransport.MANUAL)); if (((ReferenceField)this.getField(BookingDetail.PRODUCT_ID)).getReferenceRecord() != null) this.getField(BookingDetail.INFO_MESSAGE_TRANSPORT_ID).addListener(new ManualProductInfoHandler(((ReferenceField)this.getField(BookingDetail.PRODUCT_ID)).getReferenceRecord().getField(Product.DESCRIPTION), strManualTransportID, false)); } /**
/** * Override this to add record listeners and filters to every screen where this is the main record. * @param screen The screen these listeners will be in. */ public void addScreenListeners(RecordOwner screen) { super.addScreenListeners(screen); String strManualTransportID = Integer.toString(((ReferenceField)this.getField(BookingDetail.COST_MESSAGE_TRANSPORT_ID)).getIDFromCode(MessageTransport.MANUAL)); if (((ReferenceField)this.getField(BookingDetail.PRODUCT_ID)).getReferenceRecord() != null) this.getField(BookingDetail.INFO_MESSAGE_TRANSPORT_ID).addListener(new ManualProductInfoHandler(((ReferenceField)this.getField(BookingDetail.PRODUCT_ID)).getReferenceRecord().getField(Product.DESCRIPTION), strManualTransportID, false)); } /**
/** * Get the product for this detail. */ public ProductModel getProduct() { ((ReferenceField)this.getField(BookingDetail.PRODUCT_ID)).getReferenceRecord(this.getRecordOwner()); // Reference same recordowner return (Product)((ReferenceField)this.getField(BookingDetail.PRODUCT_ID)).getReference(); } /**
/** * Get the number of passengers in this hotel pricing category. */ public int getPaxInRoom() { Record recHotelPricing = ((BaseField)this.getOwner()).getRecord(); PaxCategory recPaxCategory = (PaxCategory)((ReferenceField)recHotelPricing.getField(HotelPricing.PAX_CATEGORY_ID)).getReferenceRecord(); if (recPaxCategory != null) return recPaxCategory.getPaxInRoom(); return 1; }
/** * Get the product for this detail. */ public ProductModel getProduct() { ((ReferenceField)this.getField(BookingDetail.PRODUCT_ID)).getReferenceRecord(this.getRecordOwner()); // Reference same recordowner return (Product)((ReferenceField)this.getField(BookingDetail.PRODUCT_ID)).getReference(); } /**
/** * Set up all the screen fields. */ public void setupSFields() { Record recVendor = ((ReferenceField)this.getHeaderRecord().getField(Product.VENDOR_ID)).getReferenceRecord(this); Record recCurrency = ((ReferenceField)recVendor.getField(Vendor.CURRENCYS_ID)).getReferenceRecord(this); this.getMainRecord().getField(ProductPricing.START_DATE).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getMainRecord().getField(ProductPricing.END_DATE).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); } /**
/** * SetupSFields Method. */ public void setupSFields() { Record recVendor = ((ReferenceField)this.getHeaderRecord().getField(Product.VENDOR_ID)).getReferenceRecord(this); Record recCurrency = ((ReferenceField)recVendor.getField(Vendor.CURRENCYS_ID)).getReferenceRecord(this); this.getMainRecord().getField(ProductPricing.START_DATE).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getMainRecord().getField(ProductPricing.END_DATE).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); } /**
/** * SetupSFields Method. */ public void setupSFields() { Record recVendor = ((ReferenceField)this.getHeaderRecord().getField(Product.VENDOR_ID)).getReferenceRecord(this); Record recCurrency = ((ReferenceField)recVendor.getField(Vendor.CURRENCYS_ID)).getReferenceRecord(this); this.getMainRecord().getField(ProductPricing.START_DATE).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getMainRecord().getField(ProductPricing.END_DATE).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); this.addMainKeyBehavior(); Record recVendor = ((ReferenceField)this.getMainRecord().getField(Product.VENDOR_ID)).getReferenceRecord(this); recVendor.getField(Vendor.CURRENCYS_ID).setEnabled(false); } /**
/** * Add behaviors to this session. */ public void addListeners() { super.addListeners(); ((ReferenceField)this.getScreenRecord().getField(ProductScreenRecord.CLASS_ID)).getReferenceRecord(this); this.getMainRecord().addListener(new ExtractRangeFilter(Product.DESC_SORT, this.getScreenRecord().getField(ProductScreenRecord.DESCRIPTION))); this.getMainRecord().addListener(new CompareFileFilter(Product.CITY_ID, this.getScreenRecord().getField(ProductScreenRecord.CITY_ID), DBConstants.EQUALS, null, true)); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); this.getScreenRecord().getField(VendorScreenRecord.VENDOR_ID).setEnabled(true); ((ReferenceField)this.getScreenRecord().getField(VendorScreenRecord.VENDOR_ID)).getReferenceRecord().getField(Vendor.CODE).setEnabled(true); this.getScreenRecord().getField(VendorScreenRecord.DISPLAY_TYPE).setEnabled(true); this.getScreenRecord().getField(VendorScreenRecord.DISPLAY_ACTIVE).setEnabled(true); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); this.getScreenRecord().getField(VendorScreenRecord.VENDOR_ID).setEnabled(true); ((ReferenceField)this.getScreenRecord().getField(VendorScreenRecord.VENDOR_ID)).getReferenceRecord().getField(Vendor.CODE).setEnabled(true); this.getScreenRecord().getField(VendorScreenRecord.DISPLAY_TYPE).setEnabled(true); this.getScreenRecord().getField(VendorScreenRecord.DISPLAY_ACTIVE).setEnabled(true); } /**
/** * Add behaviors to this session. */ public void addListeners() { super.addListeners(); ((ReferenceField)this.getScreenRecord().getField(ProductScreenRecord.CLASS_ID)).getReferenceRecord(this); this.getMainRecord().addListener(new ExtractRangeFilter(Product.DESC_SORT, this.getScreenRecord().getField(ProductScreenRecord.DESCRIPTION))); this.getMainRecord().addListener(new CompareFileFilter(TransportProduct.CITY_ID, this.getScreenRecord().getField(ProductScreenRecord.CITY_ID), DBConstants.EQUALS, null, true)); this.getMainRecord().addListener(new CompareFileFilter(TransportProduct.TO_CITY_ID, this.getScreenRecord().getField(ProductScreenRecord.TO_CITY_ID), DBConstants.EQUALS, null, true)); } /**
/** * Add behaviors to this session. */ public void addListeners() { super.addListeners(); ((ReferenceField)this.getScreenRecord().getField(ProductScreenRecord.CLASS_ID)).getReferenceRecord(this); this.getMainRecord().addListener(new ExtractRangeFilter(Product.DESC_SORT, this.getScreenRecord().getField(ProductScreenRecord.DESCRIPTION))); this.getMainRecord().addListener(new CompareFileFilter(TransportProduct.CITY_ID, this.getScreenRecord().getField(ProductScreenRecord.CITY_ID), DBConstants.EQUALS, null, true)); this.getMainRecord().addListener(new CompareFileFilter(TransportProduct.TO_CITY_ID, this.getScreenRecord().getField(ProductScreenRecord.TO_CITY_ID), DBConstants.EQUALS, null, true)); } /**
/** * Add behaviors to this session. */ public void addListeners() { super.addListeners(); ((ReferenceField)this.getScreenRecord().getField(ProductScreenRecord.CLASS_ID)).getReferenceRecord(this); this.getMainRecord().addListener(new ExtractRangeFilter(Product.DESC_SORT, this.getScreenRecord().getField(ProductScreenRecord.DESCRIPTION))); this.getMainRecord().addListener(new CompareFileFilter(TransportProduct.CITY_ID, this.getScreenRecord().getField(ProductScreenRecord.CITY_ID), DBConstants.EQUALS, null, true)); this.getMainRecord().addListener(new CompareFileFilter(TransportProduct.TO_CITY_ID, this.getScreenRecord().getField(ProductScreenRecord.TO_CITY_ID), DBConstants.EQUALS, null, true)); } /**
/** * SetupSFields Method. */ public void setupSFields() { this.getRecord(BookingDetail.BOOKING_DETAIL_FILE).getField(BookingDetail.STATUS_SUMMARY).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(BookingDetail.BOOKING_DETAIL_FILE).getField(BookingDetail.DETAIL_DATE).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(BookingDetail.BOOKING_DETAIL_FILE).getField(BookingDetail.DESCRIPTION).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(BookingDetail.BOOKING_DETAIL_FILE).getField(BookingDetail.BOOKING_ID).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); ((ReferenceField)this.getRecord(BookingDetail.BOOKING_DETAIL_FILE).getField(BookingDetail.BOOKING_ID)).getReferenceRecord().getField(Booking.BOOKING_STATUS_ID).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); } /**