public String addSelectParams ( String seekSign , int iAreaDesc , boolean bAddOnlyMods , boolean bIncludeFileName , boolean bUseCurrentValues , Vector < BaseField > vParamList , boolean bForceUniqueKey , boolean bIncludeTempFields ) { if ( iAreaDesc == DBConstants . START_SELECT_KEY ) if ( bAddOnlyMods ) if ( bForceUniqueKey ) if ( ">=" . equals ( seekSign ) ) if ( this . getRecord ( ) . getCounterField ( ) != this . getField ( 0 ) ) if ( this . getKeyField ( this . getKeyFields ( bForceUniqueKey , false ) - 1 , bForceUniqueKey ) . getField ( iAreaDesc ) . isModified ( ) ) return this . addGreaterThanParams ( seekSign , iAreaDesc , bAddOnlyMods , bIncludeFileName , bUseCurrentValues , vParamList , bForceUniqueKey ) ; String strFilter = DBConstants . BLANK ; int iKeyFieldCount = this . getKeyFields ( bForceUniqueKey , bIncludeTempFields ) ; if ( bAddOnlyMods ) iKeyFieldCount = this . lastModified ( iAreaDesc , bForceUniqueKey ) + 1 ; for ( int iKeyFieldSeq = DBConstants . MAIN_KEY_FIELD ; iKeyFieldSeq < iKeyFieldCount ; iKeyFieldSeq ++ ) { KeyField keyField = this . getKeyField ( iKeyFieldSeq , bForceUniqueKey ) ; BaseField pParamField = keyField . getField ( iAreaDesc ) ; BaseField field = keyField . getField ( DBConstants . FILE_KEY_AREA ) ; if ( ">=" . equals ( seekSign ) ) if ( pParamField . isNull ( ) ) break ; // Can't say >=? if null. if ( strFilter . length ( ) > 0 ) strFilter += " AND " ; String strCompare = null ; strFilter += field . getFieldName ( true , bIncludeFileName ) ; String strSign = seekSign ; if ( bUseCurrentValues == false ) { strCompare = "?" ; strFilter += strSign + strCompare ; if ( vParamList != null ) vParamList . add ( pParamField ) ; } else strFilter += pParamField . getSQLFilter ( strSign , strCompare , true ) ; } return strFilter ; }
Setup the SQL Key Filter .