public String getLeftFieldNameOrValue(int iFieldSeq, boolean bAddQuotes, boolean bOther) { if (m_rgiFldLeft.length <= iFieldSeq) return null; if (m_rgiFldLeft[iFieldSeq] instanceof Integer) return this.getLeftField(iFieldSeq).getFieldName(bAddQuotes, bOther); return m_rgiFldLeft[iFieldSeq].toString(); } /**
public String getLeftFieldNameOrValue(int iFieldSeq, boolean bAddQuotes, boolean bOther) { if (m_rgiFldLeft.length <= iFieldSeq) return null; if (m_rgiFldLeft[iFieldSeq] instanceof Integer) return this.getLeftField(iFieldSeq).getFieldName(bAddQuotes, bOther); return m_rgiFldLeft[iFieldSeq].toString(); } /**
/** * Add this KeyField to this Key Area. * Note: Don't call this directly, it is called from KeyField. * @param iFieldSeq The field to add. * @param bKeyArea The order (ascending/descending). */ public void addKeyField(KeyField keyField) { // Get the field with this seq m_vKeyFieldList.addElement(keyField); // Set this key field if (m_strKeyName == null) m_strKeyName = keyField.getField(DBConstants.FILE_KEY_AREA).getFieldName(false, false); //x + "Key"; // Default key name } /**
/** * Add this table link to this query. * Creates a new tablelink and adds it to the link list. */ public void addRelationship(int iLinkType, Record recLeft, Record recRight, int ifldLeft1, int ifldRight1) { String fldLeft1 = recLeft.getField(ifldLeft1).getFieldName(); String fldRight1 = recRight.getField(ifldRight1).getFieldName(); this.addRelationship(iLinkType, recLeft, recRight, fldLeft1, fldRight1); } /**
/** * SaveProductParam Method. */ public static Map<String,Object> addFieldParam(Map<String,Object> map, BaseField field) { if (!field.isNull()) map.put(field.getFieldName(), field.toString()); return map; } /**
public String getLeftFieldNameOrValue(int iFieldSeq, boolean bAddQuotes, boolean bIncludeFileName) { if (m_rgiFldLeft.length <= iFieldSeq) return null; BaseField field = this.getLeftField(iFieldSeq); if (field != null) return field.getFieldName(bAddQuotes, bIncludeFileName); if ((m_rgiFldLeft[iFieldSeq] instanceof String)) if (!Utility.isNumeric((String)m_rgiFldLeft[iFieldSeq])) return (String)m_rgiFldLeft[iFieldSeq]; return m_rgiFldLeft[iFieldSeq].toString(); } /**
/** * Set a property with this field's name as the key to this field's current value. * (Utility method). * @param field The field to save. */ public void saveField(BaseField field) { String strFieldName = field.getFieldName(); // Fieldname only String strData = field.getString(); this.setProperty(strFieldName, strData); } }
/** * Get the default display field for this record (for popups and lookups). * @return The sequence of the field that should be displayed. */ public String getDefaultDisplayFieldName() { int iSeq = this.getDefaultDisplayFieldSeq(); if (iSeq == -1) return null; return this.getField(iSeq).getFieldName(); } /**
/** * Set a property with this field's name as the key to this field's current value. * (Utility method). * @param field The field to save. */ public void saveField(BaseField field) { String strFieldName = field.getFieldName(); // Fieldname only String strData = field.getString(); this.setProperty(strFieldName, strData); } }
/** * SaveProductParam Method. */ public static String addFieldParam(String strCommand, BaseField field) { if (!field.isNull()) strCommand = Utility.addURLParam(strCommand, field.getFieldName(), field.toString()); return strCommand; } /**
/** * RestoreProductParam Method. */ public static void restoreFieldParam(PropertyOwner propertyOwner, BaseField field) { String strFieldName = field.getFieldName(); if (propertyOwner.getProperty(strFieldName) != null) field.setString((String)propertyOwner.getProperty(strFieldName)); } /**
/** * Set this field to the property with the same name. * @param iScreenField Screen field sequence with the same name. */ public void setThisProperty(String iScreenField) { if (this.getProperty(this.getScreenRecord().getField(iScreenField).getFieldName()) != null) this.getScreenRecord().getField(iScreenField).setString(this.getProperty(this.getScreenRecord().getField(iScreenField).getFieldName())); } /**
/** * Set this field to the property with the same name. * @param iScreenField Screen field sequence with the same name. */ public void setThisProperty(String iScreenField) { if (this.getProperty(this.getScreenRecord().getField(iScreenField).getFieldName()) != null) this.getScreenRecord().getField(iScreenField).setString(this.getProperty(this.getScreenRecord().getField(iScreenField).getFieldName())); } /**
/** * Move the data in this record to the thin version. * @param fieldList. */ public void moveDataToThin(Record record, FieldList fieldList) { if (!record.getField(OTACodes.VALUE).isNull()) fieldList.getField(record.getField(OTACode.ID).getFieldName()).setString(record.getField(OTACodes.VALUE).toString()); this.moveFieldToThin(fieldList.getField(record.getField(OTACodes.NAME).getFieldName()), null, record); } /**
/** * Move the data in this record to the thin version. * @param fieldList. */ public void moveDataToThin(Record record, FieldList fieldList) { if (!record.getField(OTACodes.VALUE).isNull()) fieldList.getField(record.getField(OTACode.ID).getFieldName()).setString(record.getField(OTACodes.VALUE).toString()); this.moveFieldToThin(fieldList.getField(record.getField(OTACodes.NAME).getFieldName()), null, record); } /**
/** * This is property in this property object. */ public void setThisProperty(Map<String,Object> properties, String iTourFieldSeq, String iParamFieldSeq) { if (!this.getRecord(Tour.TOUR_FILE).getField(iTourFieldSeq).isNull()) properties.put(this.getRecord(BookingDetail.BOOKING_DETAIL_FILE).getField(iParamFieldSeq).getFieldName(), this.getRecord(Tour.TOUR_FILE).getField(iTourFieldSeq).toString()); } /**
public void addMessageProperty(BaseMessage message, Record screenRecord, String iFieldSeq) { if (!screenRecord.getField(iFieldSeq).isNull()) message.put(screenRecord.getField(iFieldSeq).getFieldName(), screenRecord.getField(iFieldSeq).toString()); } });
/** * When cloning a listener, if the field is contained in the source record, get the same field is the new record. * @param field * @param listener * @return */ public BaseField getSyncedListenersField(BaseField field, FieldListener listener) { if (field != null) if (field.getRecord() == this.getOwner().getRecord()) field = listener.getOwner().getRecord().getField(field.getFieldName()); return field; } /**
/** * SaveProductParam Method. */ public String saveProductParam(String strCommand, String iFieldSeq) { if (!this.getScreenRecord().getField(iFieldSeq).isNull()) strCommand = Utility.addURLParam(strCommand, this.getScreenRecord().getField(iFieldSeq).getFieldName(), this.getScreenRecord().getField(iFieldSeq).toString()); return strCommand; } /**
/** * SaveProductParam Method. */ public String saveProductParam(String strCommand, String iFieldSeq) { if (!this.getScreenRecord().getField(iFieldSeq).isNull()) strCommand = Utility.addURLParam(strCommand, this.getScreenRecord().getField(iFieldSeq).getFieldName(), this.getScreenRecord().getField(iFieldSeq).toString()); return strCommand; } /**