GigaSpaces XAP 10.0.1 API

org.openspaces.jpa.openjpa.query.executor
Class JpaJdbcQueryExecutor

java.lang.Object
  extended by org.openspaces.jpa.openjpa.query.executor.JpaJdbcQueryExecutor
All Implemented Interfaces:
JpaQueryExecutor

public class JpaJdbcQueryExecutor
extends Object

Executes JPA's translated expression tree as a JDBC query.

Since:
8.0
Author:
idan

Field Summary
protected  org.apache.openjpa.meta.ClassMetaData _classMetaData
           
protected  org.apache.openjpa.kernel.exps.QueryExpressions _expression
           
protected  Object[] _parameters
           
protected  StringBuilder _sql
           
 
Constructor Summary
JpaJdbcQueryExecutor(org.apache.openjpa.kernel.exps.QueryExpressions expression, org.apache.openjpa.meta.ClassMetaData cm, Object[] parameters)
           
 
Method Summary
protected  void appendGroupBySql()
          Append GROUP BY to the SQL string builder.
protected  void appendOrderBySql()
          Append ORDER BY to the SQL string builder.
protected  void appendSelectFromSql()
          Append SELECT FROM to SQL string builder.
protected  void appendWhereSql()
          Append WHERE clause to the SQL string builder.
protected  void build()
          Build query for execution.
 org.apache.openjpa.lib.rop.ResultObjectProvider execute(StoreManager store)
          Execute query.
 StringBuilder getSqlBuffer()
          Gets the executor's generated SQL buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_expression

protected org.apache.openjpa.kernel.exps.QueryExpressions _expression

_classMetaData

protected org.apache.openjpa.meta.ClassMetaData _classMetaData

_parameters

protected Object[] _parameters

_sql

protected StringBuilder _sql
Constructor Detail

JpaJdbcQueryExecutor

public JpaJdbcQueryExecutor(org.apache.openjpa.kernel.exps.QueryExpressions expression,
                            org.apache.openjpa.meta.ClassMetaData cm,
                            Object[] parameters)
Method Detail

execute

public org.apache.openjpa.lib.rop.ResultObjectProvider execute(StoreManager store)
                                                        throws Exception
Execute query.

Specified by:
execute in interface JpaQueryExecutor
Parameters:
store - The store manager.
Returns:
Read entries from space.
Throws:
Exception

build

protected void build()
Build query for execution.


appendWhereSql

protected void appendWhereSql()
Append WHERE clause to the SQL string builder.


appendSelectFromSql

protected void appendSelectFromSql()
Append SELECT FROM to SQL string builder.


appendOrderBySql

protected void appendOrderBySql()
Append ORDER BY to the SQL string builder.


appendGroupBySql

protected void appendGroupBySql()
Append GROUP BY to the SQL string builder.


getSqlBuffer

public StringBuilder getSqlBuffer()
Gets the executor's generated SQL buffer.

Specified by:
getSqlBuffer in interface JpaQueryExecutor

GigaSpaces XAP 10.0.1 API

Copyright © GigaSpaces.