rs = stmt.executeQuery("SELECT bucket_name,term_name,term_value FROM transaction_terms WHERE transaction_id = '" + transactionId + "'");
while (rs.next()) {
String bucketName = rs.getString("bucket_name");
String termName = rs.getString("term_name");
String termValue = rs.getString("term_value");
TermBucket bucket = termBuckets.get(bucketName);
if (bucket == null)
bucket = new TermBucket(bucketName);
Term term = new Term(termName, Collections.singletonList((this.useUTF8 ? URLDecoder.decode(termValue, "UTF8") : termValue)));
bucket.addTerm(term);
termBuckets.put(bucketName, bucket);
}
return new Vector<TermBucket>(termBuckets.values());
}catch (Exception e) {
throw new QueryServiceException("Failed to get term buckets for transaction id '" + transactionId + "' : " + e.getMessage(), e);