Class JPATupleCollectionConverter
java.lang.Object
com.sap.olingo.jpa.processor.core.converter.JPATupleCollectionConverter
- All Implemented Interfaces:
JPAResultConverter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.olingo.commons.api.edm.EdmEntityTypeprotected static Stringprotected com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAEntityTypeprotected JPAExpandResultprotected com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAServiceDocumentprotected org.apache.olingo.server.api.ServiceMetadataprotected Stringprotected org.apache.olingo.server.api.uri.UriHelper -
Constructor Summary
ConstructorsConstructorDescriptionJPATupleCollectionConverter(com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAServiceDocument sd, org.apache.olingo.server.api.uri.UriHelper uriHelper, org.apache.olingo.server.api.ServiceMetadata serviceMetadata) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringbuildConcatenatedKey(javax.persistence.Tuple row, List<com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAPath> leftColumns)protected StringbuildPath(String prefix, com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAAssociationAttribute association)protected voidconvertAttribute(Object value, com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAPath jpaPath, Map<String,org.apache.olingo.commons.api.data.ComplexValue> complexValueBuffer, List<org.apache.olingo.commons.api.data.Property> properties, javax.persistence.Tuple parentRow, String prefix, org.apache.olingo.commons.api.data.Entity odataEntity)protected voidcreateComplexValue(Map<String,org.apache.olingo.commons.api.data.ComplexValue> complexValueBuffer, List<org.apache.olingo.commons.api.data.Property> properties, com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAAttribute attribute, javax.persistence.Tuple parentRow, String bufferKey, String rootURI)protected Collection<org.apache.olingo.commons.api.data.Link>createExpand(com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAStructuredType jpaStructuredType, javax.persistence.Tuple row, String prefix, String rootURI)protected StringdetermineAlias(String alias, String prefix)protected com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAStructuredTypedetermineCollectionRoot(com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAEntityType et, List<com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAElement> pathList)protected StringdeterminePrefix(String alias)getResult(JPAExpandResult dbResult, Collection<com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAPath> reqestedSelection)
-
Field Details
-
EMPTY_PREFIX
- See Also:
- Constant Field Values
-
jpaConversionTargetEntity
protected com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAEntityType jpaConversionTargetEntity -
jpaQueryResult
-
uriHelper
protected final org.apache.olingo.server.api.uri.UriHelper uriHelper -
setName
-
sd
protected final com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAServiceDocument sd -
serviceMetadata
protected final org.apache.olingo.server.api.ServiceMetadata serviceMetadata -
edmType
protected org.apache.olingo.commons.api.edm.EdmEntityType edmType
-
-
Constructor Details
-
JPATupleCollectionConverter
public JPATupleCollectionConverter(com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAServiceDocument sd, org.apache.olingo.server.api.uri.UriHelper uriHelper, org.apache.olingo.server.api.ServiceMetadata serviceMetadata)
-
-
Method Details
-
getResult
public Map<String,List<Object>> getResult(JPAExpandResult dbResult, Collection<com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAPath> reqestedSelection) throws org.apache.olingo.server.api.ODataApplicationException- Throws:
org.apache.olingo.server.api.ODataApplicationException
-
buildConcatenatedKey
-
buildPath
-
convertAttribute
protected void convertAttribute(Object value, com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAPath jpaPath, Map<String,org.apache.olingo.commons.api.data.ComplexValue> complexValueBuffer, List<org.apache.olingo.commons.api.data.Property> properties, javax.persistence.Tuple parentRow, String prefix, @Nullable org.apache.olingo.commons.api.data.Entity odataEntity) throws com.sap.olingo.jpa.metadata.core.edm.mapper.exception.ODataJPAModelException, org.apache.olingo.server.api.ODataApplicationException- Throws:
com.sap.olingo.jpa.metadata.core.edm.mapper.exception.ODataJPAModelExceptionorg.apache.olingo.server.api.ODataApplicationException
-
createComplexValue
protected void createComplexValue(Map<String,org.apache.olingo.commons.api.data.ComplexValue> complexValueBuffer, List<org.apache.olingo.commons.api.data.Property> properties, com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAAttribute attribute, javax.persistence.Tuple parentRow, String bufferKey, String rootURI) throws com.sap.olingo.jpa.metadata.core.edm.mapper.exception.ODataJPAModelException, org.apache.olingo.server.api.ODataApplicationException- Throws:
com.sap.olingo.jpa.metadata.core.edm.mapper.exception.ODataJPAModelExceptionorg.apache.olingo.server.api.ODataApplicationException
-
createExpand
protected Collection<org.apache.olingo.commons.api.data.Link> createExpand(com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAStructuredType jpaStructuredType, javax.persistence.Tuple row, String prefix, String rootURI) throws org.apache.olingo.server.api.ODataApplicationException- Throws:
org.apache.olingo.server.api.ODataApplicationException
-
determineAlias
-
determineCollectionRoot
protected final com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAStructuredType determineCollectionRoot(com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAEntityType et, List<com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAElement> pathList) throws com.sap.olingo.jpa.metadata.core.edm.mapper.exception.ODataJPAModelException- Throws:
com.sap.olingo.jpa.metadata.core.edm.mapper.exception.ODataJPAModelException
-
determinePrefix
-