org.apache.olingo.odata2.jpa.processor.api.jpql
Interface JPQLSelectContextView

All Superinterfaces:
JPQLContextView
All Known Subinterfaces:
JPQLJoinContextView

public interface JPQLSelectContextView
extends JPQLContextView

The interface provide a view on JPQL select context.The interface provides methods for accessing the clauses of a JPQL SELECT statement like "SELECT", "ORDERBY", "WHERE". The clauses are built from OData read entity set request views. The clauses thus built can be used for building JPQL Statements.

See Also:
JPQLStatement

Method Summary
 Map<String,String> getOrderByCollection()
          The method returns an ordered map of JPQL ORDERBY clause.
 String getSelectExpression()
          The method returns a JPQL SELECT clause.
 String getWhereExpression()
          The method returns a JPQL WHERE condition as string.
 
Methods inherited from interface org.apache.olingo.odata2.jpa.processor.api.jpql.JPQLContextView
getJPAEntityAlias, getJPAEntityName, getType
 

Method Detail

getSelectExpression

String getSelectExpression()
The method returns a JPQL SELECT clause. The SELECT clause is built from $select OData system Query option.

Returns:
a String representing a SELECT clause in JPQL

getOrderByCollection

Map<String,String> getOrderByCollection()
The method returns an ordered map of JPQL ORDERBY clause. The ORDERBY clause is built from $orderby OData system query option. The hash map contains
  1. Key - JPA Entity Property name to be ordered
  2. Value - Sort Order in JPQL (desc,asc)
in the order based on the expression specified (accessible with Map.entrySet(..)).

Returns:
an ordered map of (JPA Property Name,Sort Order)

getWhereExpression

String getWhereExpression()
The method returns a JPQL WHERE condition as string. The WHERE condition can be built from $filter OData System Query Option and/or Key predicates of an OData Request.

Returns:
a String representing a WHERE condition in JPQL


Copyright © 2013-2015 The Apache Software Foundation. All Rights Reserved.