protected void appendWhereClause ( FieldDescriptor [ ] fields , StringBuffer stmt ) throws PersistenceBrokerException { stmt . append ( " WHERE " ) ; for ( int i = 0 ; i < fields . length ; i ++ ) { FieldDescriptor fmd = fields [ i ] ; stmt . append ( fmd . getColumnName ( ) ) ; stmt . append ( " = ? " ) ; if ( i < fields . length - 1 ) { stmt . append ( " AND " ) ; } } }
Generate a sql where - clause for the array of fields