Revision 4325
Added by ben leinfelder about 16 years ago
src/edu/ucsb/nceas/metacat/QueryGroup.java | ||
---|---|---|
191 | 191 |
{ |
192 | 192 |
String sql =""; |
193 | 193 |
String value =""; |
194 |
boolean casesensitive = false; |
|
194 | 195 |
StringBuffer sqlBuff = new StringBuffer(); |
195 | 196 |
Vector pathVector = new Vector(); |
196 | 197 |
int index =0; |
... | ... | |
206 | 207 |
Vector queryTermVector = (Vector)queryTermsWithSameValue.elementAt(j); |
207 | 208 |
QueryTerm term1 = (QueryTerm)queryTermVector.elementAt(0); |
208 | 209 |
value = term1.getValue(); |
210 |
casesensitive = term1.isCaseSensitive(); |
|
209 | 211 |
boolean first = true; |
210 | 212 |
if (firstVector) |
211 | 213 |
{ |
... | ... | |
215 | 217 |
{ |
216 | 218 |
sqlBuff.append(" "+"OR"+" "); |
217 | 219 |
} |
218 |
sqlBuff.append(" (UPPER(nodedata) LIKE '%"); |
|
219 |
if (value != null) |
|
220 |
if (casesensitive) { |
|
221 |
sqlBuff.append(" (nodedata"); |
|
222 |
} else { |
|
223 |
sqlBuff.append(" (UPPER(nodedata)"); |
|
224 |
} |
|
225 |
sqlBuff.append(" LIKE '%"); |
|
226 |
if (value != null && !casesensitive) |
|
220 | 227 |
{ |
221 | 228 |
sqlBuff.append(value.toUpperCase()); |
222 | 229 |
} |
Also available in: Unified diff
honor casesensitive indicator for contained QueryTerms.
addresses bug: http://bugzilla.ecoinformatics.org/show_bug.cgi?id=3472