Note that there are some explanatory texts on larger screens.

plurals
  1. POSQL query from Toplink expression
    primarykey
    data
    text
    <p>I have a oracle.toplink.expressions.Expression expression object with me which has been created using oracle.toplink.expressions.ExpressionBuilder. I want to find its equivalent SQL query(say select emp.empname,emp.empId from employee emp) which will be fired eventually in order to fetch data. I want to find its equivalent Statement/PreparedStatement or anything which will help me obtain the raw SQL statement about to be fired.</p> <p>For e.g. Following is the toplink expression:</p> <pre><code>expressionBuilder.get("empName").equal("Eric"); </code></pre> <p>and i want to get the equivalent SQL query:</p> <pre><code>select emp.empName,emp.emp_id,emp.sal from employee emp where emp.empName like 'Eric' </code></pre> <p>Please let me know if there is any API to get the sol. I tried the implmentation classes of DatabaseQuery but couldn't find any method which could accomplish this.</p> <p>Below is the toplink expression with me :</p> <pre><code>Logical operator AND Logical operator AND Logical operator AND Logical operator AND Logical operator AND Logical operator AND Logical operator AND Logical operator AND Relation operator &lt; Query Key minEffectiveBegDate Base com.altra.common.data.OperationalTrxData Constant Tue Feb 01 08:00:00 CST 2011 Relation operator &gt; Query Key maxEffectiveEndDate Base com.altra.common.data.OperationalTrxData Constant Sat Jan 01 08:00:00 CST 2011 Relation operator &lt; Query Key begDate Query Key calculatedQuantityDataList Query Key qtyClassificationDataList Query Key operationalQuantityDataList Base com.altra.common.data.OperationalTrxData Constant Tue Feb 01 08:00:00 CST 2011 Relation operator &gt; Query Key endDate Query Key calculatedQuantityDataList Query Key qtyClassificationDataList Query Key operationalQuantityDataList Base com.altra.common.data.OperationalTrxData Constant Sat Jan 01 08:00:00 CST 2011 Relation operator = Query Key opsTrxClassification Base com.altra.common.data.OperationalTrxData Constant -5001579 Relation operator = Query Key accountingCompany Base com.altra.common.data.OperationalTrxData Constant 1196 Logical operator OR Logical operator AND Relation operator = Query Key sourceRelatedNodeObjType Base com.altra.common.data.OperationalTrxData Constant -2094 Relation operator IN Query Key sourceRelatedNodeObjId Base com.altra.common.data.OperationalTrxData Constant [4187] Logical operator AND Relation operator = Query Key dispositionRelatedNodeObjType Base com.altra.common.data.OperationalTrxData Constant -2094 Relation operator IN Query Key dispositionRelatedNodeObjId Base com.altra.common.data.OperationalTrxData Constant [4187] Relation operator = Query Key qtyType Query Key operationalQuantityDataList Base com.altra.common.data.OperationalTrxData Constant -5000328 Relation operator = Query Key qtyStatus Query Key qtyClassificationDataList Query Key operationalQuantityDataList Base com.altra.common.data.OperationalTrxData Constant -5000316 </code></pre> <p>I want the SQL equivalent like </p> <pre><code>select otd.operationaltrx_id,otd.accountingCompany from OperationalTrxData otd where minEffectiveBegDate &gt; to_date('','') ... </code></pre> <p>Thanks, Adithya.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload