/** * Set up/do the local criteria. * @param strbFilter The SQL query string to add to. * @param bIncludeFileName Include the file name with this query? * @param vParamList The param list to add the raw data to (for prepared statements). * @return True if you should not skip this record (does a check on the local data). */ public boolean doLocalCriteria(StringBuffer strbFilter, boolean bIncludeFileName, Vector vParamList) { boolean bDontSkip = true; if (this.getOwner().getField(LandPricing.START_DATE).getValue() > m_dateTarget.getTime()) // Start > thisDate bDontSkip = false; // Skip this one if (this.getOwner().getField(LandPricing.END_DATE).getValue() < m_dateTarget.getTime()) // End >= thisDate bDontSkip = false; // Skip this one if (this.getOwner().getField(LandPricing.FROM_PAX).getValue() > m_sTargetPax) // Start > thisDate bDontSkip = false; // Skip this one if (this.getOwner().getField(LandPricing.TO_PAX).getValue() < m_sTargetPax) // End >= thisDate bDontSkip = false; // Skip this one if (bDontSkip) bDontSkip = super.doLocalCriteria(strbFilter, bIncludeFileName, vParamList); return bDontSkip; // Don't skip (no criteria) }
/** * Set up/do the local criteria. * @param strbFilter The SQL query string to add to. * @param bIncludeFileName Include the file name with this query? * @param vParamList The param list to add the raw data to (for prepared statements). * @return True if you should not skip this record (does a check on the local data). */ public boolean doLocalCriteria(StringBuffer strbFilter, boolean bIncludeFileName, Vector vParamList) { boolean bDontSkip = true; if (this.getOwner().getField(LandPricing.START_DATE).getValue() > m_dateTarget.getTime()) // Start > thisDate bDontSkip = false; // Skip this one if (this.getOwner().getField(LandPricing.END_DATE).getValue() < m_dateTarget.getTime()) // End >= thisDate bDontSkip = false; // Skip this one if (this.getOwner().getField(LandPricing.FROM_PAX).getValue() > m_sTargetPax) // Start > thisDate bDontSkip = false; // Skip this one if (this.getOwner().getField(LandPricing.TO_PAX).getValue() < m_sTargetPax) // End >= thisDate bDontSkip = false; // Skip this one if (bDontSkip) bDontSkip = super.doLocalCriteria(strbFilter, bIncludeFileName, vParamList); return bDontSkip; // Don't skip (no criteria) }