1 20 package org.enhydra.dods.cache; 21 22 import java.util.Vector ; 23 import com.lutris.dods.builder.generator.dataobject.GenericDO; 24 25 31 public class QueryResult { 32 33 36 public Vector DOs; 37 38 41 public Vector lazy; 42 43 46 public String database; 47 48 51 public int skippedUnique = 0; 52 53 56 public QueryResult() { 57 DOs = new Vector (); 58 lazy = new Vector (); 59 skippedUnique = 0; 60 } 61 62 66 public String toString() { 67 return toString(false); 68 } 69 70 74 public String toString(boolean onlyID) { 75 GenericDO DO = null; 76 StringBuffer ret = new StringBuffer (); 77 78 ret.append("\n ----------------- QueryResult: -----------------"); 79 ret.append("\n DOs : \n"); 80 if (DOs != null) { 81 for (int i = 0; i < DOs.size(); i++) { 82 if (onlyID) { 83 if ((DO = (GenericDO) DOs.elementAt(i)).get_Data() != null) { 84 ret.append(" " + DO.get_OId()); 85 } 86 } else { 87 ret.append("\n" + DOs.elementAt(i)); 88 } 89 } 90 } 91 ret.append("\n lazy : \n"); 92 if (lazy != null) { 93 for (int i = 0; i < lazy.size(); i++) { 94 if (onlyID) { 95 if ((DO = (GenericDO) lazy.elementAt(i)).get_Data() == null) { 96 ret.append(" " + DO.get_OId()); 97 } 98 } else { 99 ret.append("\n" + lazy.elementAt(i)); 100 } 101 } 102 } 103 return ret.toString(); 104 } 105 } 106 | Popular Tags |