1 2 12 package com.versant.core.jdo.query.mem; 13 14 import com.versant.core.jdo.QueryDetails; 15 import com.versant.core.metadata.ClassMetaData; 16 import com.versant.core.metadata.ModelMetaData; 17 import com.versant.core.jdo.query.*; 18 import com.versant.core.server.CompiledQuery; 19 20 import com.versant.core.common.BindingSupportImpl; 21 22 25 public class CompiledMemQuery implements CompiledQuery { 26 27 private int id; 28 public ParamNode[] params = null; 29 public VarNode[] vars = null; 30 public Node filter = null; 31 public QueryDetails queryParams = null; 32 public OrderNode[] orders = null; 33 private QueryParser qParser; 34 private ModelMetaData jmd; 35 36 public CompiledMemQuery(ModelMetaData jmd) { 37 this.jmd = jmd; 38 } 39 40 public int[] getClassIndexes() { 41 return new int[0]; 42 } 43 44 49 public int[] getResultTypeCodes() { 50 return new int[0]; } 52 53 56 public boolean isUnique() { 57 if (true) throw BindingSupportImpl.getInstance().notImplemented(""); 58 return false; } 60 61 public boolean isRandomAccess() { 62 return false; } 64 65 public int getQueryResultBatchSize() { 66 return 0; 67 } 68 69 public int getFetchGroupIndex() { 70 return 0; 71 } 72 73 public QueryDetails getQueryDetails() { 74 return queryParams; 75 } 76 77 81 public boolean isProjectionQuery() { 82 return false; } 84 85 88 public boolean isDefaultResult() { 89 return false; } 91 92 95 public int getFirstThisIndex() { 96 return 0; } 98 99 103 public boolean isContainsThisOnly() { 104 return false; } 106 107 114 public boolean isCopyResultsForCache() { 115 return false; } 117 118 121 public int[] getRefIndexArray() { 122 return new int[]{}; } 124 125 public void compile(QueryDetails qParams) throws ParseException { 126 qParser = new QueryParser(jmd); 127 128 try { 129 qParser.parse(qParams); 130 params = qParser.getParams(); 131 filter = qParser.getFilter(); 132 orders = qParser.getOrders(); 133 vars = qParser.getVars(); 134 } catch (Exception e) { 135 throw BindingSupportImpl.getInstance().invalidOperation(e.getMessage(), e); 136 } catch (TokenMgrError e) { 137 throw BindingSupportImpl.getInstance().invalidOperation(e.getMessage(), e); 138 } 139 } 140 141 public ClassMetaData[] getQueryClasses() { 142 return null; 143 } 144 145 public boolean isCacheble() { 146 return false; 147 } 148 149 public void setCacheable(boolean on) { 150 } 152 153 public int getMaxRows() { 154 return 0; 155 } 156 157 public int[] getEvictionClassBits() { 158 return new int[0]; 159 } 160 161 public int getId() { 162 return id; 163 } 164 165 public void setId(int id) { 166 this.id = id; 167 } 168 169 } 170 171 | Popular Tags |