Example #1
0
 public GearsResult(Database db, ResultSet results) {
   this.db = db;
   this.results = results;
   int count = results.getFieldCount();
   for (int i = 0; i < count; ++i) {
     String field;
     try {
       field = results.getFieldName(i);
       map.put(field, i);
     } catch (Exception e) {
       ComponentLog.trace("Invalid field name in ResultSet");
     }
   }
 }
Example #2
0
 public void dispose() {
   try {
     results.close();
   } catch (Exception e) {
     ComponentLog.trace("Failed to close result set: " + e.toString());
   }
 }
Example #3
0
 public void next() {
   results.next();
 }
Example #4
0
 public boolean isValid() {
   boolean rtn = results.isValidRow();
   return (rtn);
 }
Example #5
0
 public double asDouble(String key) throws Exception {
   return (results.getFieldAsDouble(field(key)));
 }
Example #6
0
 public int asInt(String key) throws Exception {
   return (results.getFieldAsInt(field(key)));
 }
Example #7
0
 public String asString(String key) throws Exception {
   return (results.getFieldAsString(field(key)));
 }