1 package com.daffodilwoods.daffodildb.server.sql99.expression.booleanvalueexpression; 2 3 import com.daffodilwoods.daffodildb.server.serversystem.*; 4 import com.daffodilwoods.daffodildb.server.sql99.common.*; 5 import com.daffodilwoods.daffodildb.server.sql99.dql.plan.condition.*; 6 import com.daffodilwoods.daffodildb.server.sql99.expression.rowvalueexpression.*; 7 import com.daffodilwoods.daffodildb.server.sql99.utils.*; 8 import com.daffodilwoods.database.resource.*; 9 10 23 24 public class booleantest extends AbstractBooleanValueExpression implements com.daffodilwoods.daffodildb.utils.parser.StatementExecuter { 25 26 public SRESERVEDWORD1206543922OptSRESERVEDWORD1206543922truthvalue _OptSRESERVEDWORD1206543922OptSRESERVEDWORD1206543922truthvalue0; 27 public booleanprimary _booleanprimary1; 28 29 public booleantest() { 30 } 31 32 public booleantest(booleanprimary object) { 33 _booleanprimary1 = object; 34 } 35 36 44 45 public double getCost(long rowCount, boolean index) throws DException { 46 return ( (AbstractBooleanValueExpression) _booleanprimary1).getCost(rowCount, index); 47 } 48 49 58 59 public _QualifiedBVE getQualifiedBVE(TableDetails[] tableDetails) throws DException { 60 return _OptSRESERVEDWORD1206543922OptSRESERVEDWORD1206543922truthvalue0 == null 61 ? ( (AbstractBooleanValueExpression) _booleanprimary1).getQualifiedBVE(tableDetails) 62 : new QualifiedBVE(null, this); 63 } 64 65 73 74 public int canUseForSeek() throws DException { 75 return _OptSRESERVEDWORD1206543922OptSRESERVEDWORD1206543922truthvalue0 != null 76 ? TypeConstants.NOSEEK 77 : ( (AbstractBooleanValueExpression) _booleanprimary1).canUseForSeek(); 78 79 } 80 81 89 90 public void setColumnPredicates(_AllColumnPredicates allColumnPredicates) throws DException { 91 if (_OptSRESERVEDWORD1206543922OptSRESERVEDWORD1206543922truthvalue0 != null) { 92 allColumnPredicates.addToNonIndex(new booleanfactor(this)); 93 } else { 94 ( (AbstractBooleanValueExpression) _booleanprimary1).setColumnPredicates(allColumnPredicates); 95 } 96 } 97 98 public int getConditionType() throws DException { 99 return ( (AbstractBooleanValueExpression) _booleanprimary1).getConditionType(); 100 } 101 102 115 116 public _BVEPlan getExecutionPlan() throws DException { 117 return ( (AbstractBooleanValueExpression) _booleanprimary1).getExecutionPlan(); 118 } 119 120 public Object run(Object object) throws com.daffodilwoods.database.resource.DException { 121 return _booleanprimary1.run(object); 122 } 123 124 131 132 public ParameterInfo[] getParameterInfo() throws DException { 133 ParameterInfo[] p1 = _booleanprimary1.getParameterInfo(); 134 return p1; 135 } 136 137 142 143 public AbstractRowValueExpression[] getChilds() { 144 AbstractRowValueExpression[] childs = new AbstractRowValueExpression[] { (AbstractRowValueExpression) (_booleanprimary1)}; 145 return childs; 146 } 147 148 155 156 public long getEstimatedRows(long noOfRows) throws DException { 157 return ( (AbstractBooleanValueExpression) _booleanprimary1).getEstimatedRows(noOfRows); 158 } 159 160 169 170 public boolean isNullPredicate() throws DException { 171 return ( (AbstractBooleanValueExpression) _booleanprimary1).isNullPredicate(); 172 } 173 174 public String toString() { 175 StringBuffer sb = new StringBuffer (); 176 sb.append(" "); 177 sb.append(_booleanprimary1); 178 sb.append(" "); 179 if (_OptSRESERVEDWORD1206543922OptSRESERVEDWORD1206543922truthvalue0 != null) { 180 sb.append(_OptSRESERVEDWORD1206543922OptSRESERVEDWORD1206543922truthvalue0); 181 } 182 return sb.toString(); 183 } 184 185 public Object clone() throws CloneNotSupportedException { 186 booleantest tempClass = new booleantest(); 187 if (_OptSRESERVEDWORD1206543922OptSRESERVEDWORD1206543922truthvalue0 != null) { 188 tempClass._OptSRESERVEDWORD1206543922OptSRESERVEDWORD1206543922truthvalue0 = (SRESERVEDWORD1206543922OptSRESERVEDWORD1206543922truthvalue) _OptSRESERVEDWORD1206543922OptSRESERVEDWORD1206543922truthvalue0.clone(); 189 } 190 tempClass._booleanprimary1 = (booleanprimary) _booleanprimary1.clone(); 191 return tempClass; 192 } 193 194 public _Reference[] checkSemantic(_ServerSession parent) throws DException { 195 if (! (_booleanprimary1 instanceof AbstractBooleanValueExpression)) { 196 getColumnDetails(); 197 throw new DException("DSE6007", new Object [] {_booleanprimary1.toString()}); 198 } 199 return _booleanprimary1.checkSemantic(parent); 200 } 201 202 } 203 | Popular Tags |