1 21 22 package org.apache.derby.impl.sql.execute; 23 24 import org.apache.derby.iapi.services.sanity.SanityManager; 25 26 import org.apache.derby.iapi.error.StandardException; 27 28 import org.apache.derby.iapi.sql.execute.ScanQualifier; 29 30 import org.apache.derby.iapi.store.access.Qualifier; 31 32 import org.apache.derby.iapi.types.DataValueDescriptor; 33 34 35 42 43 public class GenericScanQualifier implements ScanQualifier 44 { 45 46 private int columnId = -1; 47 private DataValueDescriptor orderable = null; 48 private int operator = -1; 49 private boolean negateCR = false; 50 private boolean orderedNulls = false; 51 private boolean unknownRV = false; 52 53 private boolean properInit = false; 54 55 public GenericScanQualifier() 56 { 57 } 58 59 62 63 66 public int getColumnId() 67 { 68 if (SanityManager.DEBUG) 69 SanityManager.ASSERT(properInit, "properInit is expected to be true"); 70 return columnId; 71 } 72 73 76 public DataValueDescriptor getOrderable() 77 { 78 if (SanityManager.DEBUG) 79 SanityManager.ASSERT(properInit, "properInit is expected to be true"); 80 return orderable; 81 } 82 83 87 public int getOperator() 88 { 89 if (SanityManager.DEBUG) 90 SanityManager.ASSERT(properInit, "properInit is expected to be true"); 91 return operator; 92 } 93 94 99 public boolean negateCompareResult() 100 { 101 if (SanityManager.DEBUG) 102 SanityManager.ASSERT(properInit, "properInit is expected to be true"); 103 return negateCR; 104 } 105 106 110 public boolean getOrderedNulls() 111 { 112 if (SanityManager.DEBUG) 113 SanityManager.ASSERT(properInit, "properInit is expected to be true"); 114 return orderedNulls; 115 } 116 117 121 public boolean getUnknownRV() 122 { 123 if (SanityManager.DEBUG) 124 SanityManager.ASSERT(properInit, "properInit is expected to be true"); 125 return unknownRV; 126 } 127 128 140 public void clearOrderableCache() 141 { 142 } 144 145 156 public void reinitialize() 157 { 158 } 159 160 163 164 167 public void setQualifier( 168 int columnId, 169 DataValueDescriptor orderable, 170 int operator, 171 boolean negateCR, 172 boolean orderedNulls, 173 boolean unknownRV) 174 { 175 this.columnId = columnId; 176 this.orderable = orderable; 177 this.operator = operator; 178 this.negateCR = negateCR; 179 this.orderedNulls = orderedNulls; 180 this.unknownRV = unknownRV; 181 properInit = true; 182 } 183 } 184 185 186 187 188 | Popular Tags |