Class JPACollectionJoinQuery
java.lang.Object
com.sap.olingo.jpa.processor.core.query.JPAAbstractQuery
com.sap.olingo.jpa.processor.core.query.JPAAbstractJoinQuery
com.sap.olingo.jpa.processor.core.query.JPACollectionJoinQuery
- All Implemented Interfaces:
JPAQuery
-
Field Summary
Fields inherited from class com.sap.olingo.jpa.processor.core.query.JPAAbstractJoinQuery
ALIAS_SEPERATOR, context, cq, lastInfo, navigationInfo, page, requestContext, root, target, uriResourceFields inherited from class com.sap.olingo.jpa.processor.core.query.JPAAbstractQuery
cb, claimsProvider, debugger, em, groups, jpaEntity, locale, odata, sd, SELECT_ALL, SELECT_ITEM_SEPERATOR -
Constructor Summary
ConstructorsConstructorDescriptionJPACollectionJoinQuery(org.apache.olingo.server.api.OData odata, JPAODataCRUDContextAccess context, javax.persistence.EntityManager em, JPACollectionItemInfo item, Map<String,List<String>> requestHeaders, JPAODataRequestContextAccess requestContext, Optional<JPAKeyBoundary> keyBoundary) -
Method Summary
Modifier and TypeMethodDescriptionprotected Set<com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAPath>buildSelectionPathList(org.apache.olingo.server.api.uri.UriInfoResource uriResource)Creates the path to all properties that need to be selected from the database.protected List<javax.persistence.criteria.Selection<?>>createSelectClause(Map<String,javax.persistence.criteria.From<?,?>> joinTables, Collection<com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAPath> jpaPathList, javax.persistence.criteria.From<?,?> target, List<String> groups)The value of the $select query option is a comma-separated list of properties, qualified action names, qualified function names, the star operator (*), or the star operator prefixed with the namespace or alias of the schema in order to specify all operations defined in the schema.execute()protected voidexpandPath(com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAEntityType jpaEntity, Collection<com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAPath> jpaPathList, String selectItem, boolean targetIsCollection)Methods inherited from class com.sap.olingo.jpa.processor.core.query.JPAAbstractJoinQuery
addTopSkip, buildEntityPathList, buildSelectionAddNavigationAndSelect, createBoundary, createFromClause, createKeyWhere, createProtectionWhere, createWhere, determineAssoziation, determineLastInfo, determineTargetIsCollection, extractDescriptionAttributes, generateCollectionAttributeJoin, getLocale, getQuery, getRootMethods inherited from class com.sap.olingo.jpa.processor.core.query.JPAAbstractQuery
addWhereClause, createJoinFromPath, createProtectionWhereForEntityType, createWhereByKey, generateDesciptionJoin, getDebugger, orWhereClause
-
Constructor Details
-
JPACollectionJoinQuery
public JPACollectionJoinQuery(org.apache.olingo.server.api.OData odata, JPAODataCRUDContextAccess context, javax.persistence.EntityManager em, JPACollectionItemInfo item, Map<String,List<String>> requestHeaders, JPAODataRequestContextAccess requestContext, Optional<JPAKeyBoundary> keyBoundary) throws org.apache.olingo.commons.api.ex.ODataException- Throws:
org.apache.olingo.commons.api.ex.ODataException
-
-
Method Details
-
execute
public JPACollectionQueryResult execute() throws org.apache.olingo.server.api.ODataApplicationException- Throws:
org.apache.olingo.server.api.ODataApplicationException
-
buildSelectionPathList
protected Set<com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAPath> buildSelectionPathList(org.apache.olingo.server.api.uri.UriInfoResource uriResource) throws org.apache.olingo.server.api.ODataApplicationExceptionDescription copied from class:JPAAbstractJoinQueryCreates the path to all properties that need to be selected from the database. A Property can be included for the following reasons:- It is a key in order to be able to build the links
- It is part of the $select system query option
- It is the result of a navigation, which my be restricted by a $select
- If is required to link $expand with result with the parent result
- A stream is requested and the property contains the mime type>
- Overrides:
buildSelectionPathListin classJPAAbstractJoinQuery- Returns:
- Throws:
org.apache.olingo.server.api.ODataApplicationException
-
expandPath
protected void expandPath(com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAEntityType jpaEntity, Collection<com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAPath> jpaPathList, String selectItem, boolean targetIsCollection) throws com.sap.olingo.jpa.metadata.core.edm.mapper.exception.ODataJPAModelException, ODataJPAQueryException- Overrides:
expandPathin classJPAAbstractJoinQuery- Throws:
com.sap.olingo.jpa.metadata.core.edm.mapper.exception.ODataJPAModelExceptionODataJPAQueryException
-
createSelectClause
protected List<javax.persistence.criteria.Selection<?>> createSelectClause(Map<String,javax.persistence.criteria.From<?,?>> joinTables, Collection<com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAPath> jpaPathList, javax.persistence.criteria.From<?,?> target, List<String> groups) throws org.apache.olingo.server.api.ODataApplicationExceptionDescription copied from class:JPAAbstractJoinQueryThe value of the $select query option is a comma-separated list of properties, qualified action names, qualified function names, the star operator (*), or the star operator prefixed with the namespace or alias of the schema in order to specify all operations defined in the schema. See: OData Version 4.0 Part 1 - 11.2.4.1 System Query Option $selectSee also: OData Version 4.0 Part 2 - 5.1.3 System Query Option $select
- Overrides:
createSelectClausein classJPAAbstractJoinQuery- Returns:
- Throws:
org.apache.olingo.server.api.ODataApplicationException
-