/** * Get the menu name. */ public String getMenuName(FieldList record) { return record.getField(Tour.DESCRIPTION).toString(); } /**
/** * Get the description. */ public java.lang.String getDescription() { return this.getField(BookingDetail.DESCRIPTION).toString(); } /**
/** * Get the product type of this record. */ public String getLocalProductType() { String strProductType = this.getField(BookingDetail.PRODUCT_TYPE).toString(); if ((strProductType == null) || (strProductType.length() == 0)) strProductType = ProductType.ITEM; return strProductType; } /**
/** * Get the menu command to send to handle command. */ public String getMenuLink(FieldList record) { return record.getField(Booking.ID).toString(); // Booking no } /**
/** * Convert this record to a string. * @return A string of all the fields. */ public String toString() { String string = Constants.BLANK; for (int iFieldSeq = Constants.MAIN_FIELD; iFieldSeq <= this.getFieldCount() + Constants.MAIN_FIELD - 1; iFieldSeq++) { FieldInfo field = this.getField(iFieldSeq); string += field.toString() + '\n'; } string += '\n'; return string; } /**
/** * GetKeyFromRecord Method. */ public String getKeyFromRecord(Record recBookingDetail, String iFieldSeq) { String bookmark = recBookingDetail.getCounterField().toString(); BaseField fieldTarget = recBookingDetail.getField(iFieldSeq); String strFieldType = fieldTarget.getFieldName(); if ((bookmark == null) || (bookmark.length() == 0)) bookmark = recBookingDetail.getLastModified(DBConstants.BOOKMARK_HANDLE).toString(); String strKey = strFieldType + '.' + bookmark; return strKey; } /**
public void checkDuplicates(String key, int id, Map<String,Object> refs) { for (String topKey : refs.keySet()) { if (refs.get(topKey) instanceof Map<?,?>) { this.checkDuplicates(topKey, id, (Map)refs.get(topKey)); } else { int topId = (Integer)refs.get(topKey); if (topKey.equals(key)) if (topId != id) Utility.getLogger().warning("Relative mismatch " + key + "(" + id + ") != (" + topId + ") for " + this.getMainRecord().getTableNames(false) + "(" + this.getMainRecord().getCounterField().toString() + ")"); } } }
/** * GetKeyFromRecord Method. */ public String getKeyFromRecord(Record recBookingDetail, String iFieldSeq) { String bookmark = recBookingDetail.getCounterField().toString(); BaseField fieldTarget = recBookingDetail.getField(iFieldSeq); String strFieldType = fieldTarget.getFieldName(); if ((bookmark == null) || (bookmark.length() == 0)) bookmark = recBookingDetail.getLastModified(DBConstants.BOOKMARK_HANDLE).toString(); String strKey = strFieldType + '.' + bookmark; return strKey; } /**
/** * Get the param name for this param. * @param strVariesDesc The (optional) param name (see LandPricing) * @returns The param name. */ public String getVariesParam(String strVariesDesc) { String strParam = this.getField(LandVaries.DESCRIPTION).toString(); if ((strParam == null) || (strParam.length() == 0)) strParam = this.getCounterField().toString(); strParam = VARIES_PARAM + '.' + strParam; if ((strVariesDesc != null) && (strVariesDesc.length() != 0)) strParam = strParam + '.' + strVariesDesc; strParam = Utility.replace(strParam, " ", DBConstants.BLANK); return strParam; }
/** * Retrieve (in string format) from this field. * @return The display field of the grid record. */ public String getString() { FieldInfo field = this.getField(); if (field instanceof StringField) return field.toString(); return m_record.getField(m_iFieldSeq).getString(); // Return the desc string } /**
/** * Retrieve (in string format) from this field. * @return The display field of the grid record. */ public String getString() { FieldInfo field = this.getField(); if (field instanceof StringField) return field.toString(); return m_record.getField(m_iFieldSeq).getString(); // Return the desc string } /**
/** * Get the param name for this param. * @param strVariesDesc The (optional) param name (see LandPricing) * @returns The param name. */ public String getVariesParam(String strVariesDesc) { String strParam = this.getField(LandVaries.DESCRIPTION).toString(); if ((strParam == null) || (strParam.length() == 0)) strParam = this.getCounterField().toString(); strParam = VARIES_PARAM + '.' + strParam; if ((strVariesDesc != null) && (strVariesDesc.length() != 0)) strParam = strParam + '.' + strVariesDesc; strParam = Utility.replace(strParam, " ", DBConstants.BLANK); return strParam; }
/** * Redisplay the screen. */ public void refreshItinerary() { TourGeekScreen screenMain = (TourGeekScreen)getTargetScreen(TourGeekScreen.class); FieldList record = screenMain.getFieldList(); String strID = record.getField(Params.ID).toString(); ItinScreen itinScreen = (ItinScreen)JBasePanel.getSubScreen(this, ItinScreen.class); itinScreen.displayItinerary(strID); } /**
/** * Retrieve (in string format) from this field. * @return The display field of the grid record. */ public String getString() { FieldInfo field = this.getField(); if (field instanceof StringField) return field.toString(); if (displayFieldName != null) return m_record.getField(displayFieldName).getString(); // Return the desc string else return m_record.getField(m_iFieldSeq).getString(); // Return the desc string } /**
/** * Convert this description to an ID. */ public String convertNameToID(String strPaxCategory) { int iOldKeyOrder = this.getDefaultOrder(); this.setKeyArea(PaxCategory.DESCRIPTION_KEY); this.getField(PaxCategory.DESCRIPTION).setString(strPaxCategory); try { if (this.seek(null)) return this.getCounterField().toString(); } catch (DBException ex) { ex.printStackTrace(); } finally { this.setKeyArea(iOldKeyOrder); } return null; }
/** * Convert this description to an ID. */ public String convertNameToID(String strPaxCategory) { int iOldKeyOrder = this.getDefaultOrder(); this.setKeyArea(PaxCategory.DESCRIPTION_KEY); this.getField(PaxCategory.DESCRIPTION).setString(strPaxCategory); try { if (this.seek(null)) return this.getCounterField().toString(); } catch (DBException ex) { ex.printStackTrace(); } finally { this.setKeyArea(iOldKeyOrder); } return null; }
public void checkIt() { BookingDetail bookingDetail = (BookingDetail)this.getMainRecord(); bookingDetail.setKeyArea(Booking.ID_KEY); try { while (bookingDetail.hasNext()) { Record record = bookingDetail.next(); Map<String,Object> refs = this.checkReferences(record); String str = record.getTableNames(false) + "(" + record.getCounterField().toString() + ")" + this.format(refs, 1); this.analyzeReferences(refs, refs); } } catch (DBException e) { e.printStackTrace(); } }
/** * Log this transaction. * @param strTrxType The transaction type. */ public void logTrx(FieldList record, String strTrxType) { BaseBuffer buffer = this.getBuffer(); buffer.clearBuffer(); buffer.addHeader(strTrxType); buffer.addHeader(record.getTableNames(false)); buffer.addHeader(record.getCounterField().toString()); if (ProxyConstants.REMOVE != strTrxType) buffer.fieldsToBuffer(record); Object objLogData = buffer.getPhysicalData(); this.logTrx(objLogData); } /**
/** * Log this transaction. * @param strTrxType The transaction type. */ public void logTrx(FieldList record, String strTrxType) { BaseBuffer buffer = this.getBuffer(); buffer.clearBuffer(); buffer.addHeader(strTrxType); buffer.addHeader(record.getTableNames(false)); buffer.addHeader(record.getCounterField().toString()); if (ProxyConstants.REMOVE != strTrxType) buffer.fieldsToBuffer(record); Object objLogData = buffer.getPhysicalData(); this.logTrx(objLogData); } /**
/** * Log this transaction. * @param strTrxType The transaction type. */ public void logTrx(FieldList record, String strTrxType) { BaseBuffer buffer = this.getBuffer(); buffer.clearBuffer(); buffer.addHeader(strTrxType); buffer.addHeader(record.getTableNames(false)); buffer.addHeader(record.getCounterField().toString()); if (ProxyConstants.REMOVE != strTrxType) buffer.fieldsToBuffer(record); Object objLogData = buffer.getPhysicalData(); this.logTrx(objLogData); } /**