Class JPATupleCollectionConverter

java.lang.Object
com.sap.olingo.jpa.processor.core.converter.JPATupleCollectionConverter
All Implemented Interfaces:
JPAResultConverter

public class JPATupleCollectionConverter extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.apache.olingo.commons.api.edm.EdmEntityType
     
    protected static String
     
    protected com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAEntityType
     
    protected JPAExpandResult
     
    protected com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAServiceDocument
     
    protected org.apache.olingo.server.api.ServiceMetadata
     
    protected String
     
    protected org.apache.olingo.server.api.uri.UriHelper
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    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 Summary

    Modifier and Type
    Method
    Description
    protected String
    buildConcatenatedKey​(javax.persistence.Tuple row, List<com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAPath> leftColumns)
     
    protected String
    buildPath​(String prefix, com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAAssociationAttribute association)
     
    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, org.apache.olingo.commons.api.data.Entity odataEntity)
     
    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)
     
    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 String
    determineAlias​(String alias, String prefix)
     
    protected 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)
     
    protected String
     
    getResult​(JPAExpandResult dbResult, Collection<com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAPath> reqestedSelection)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • EMPTY_PREFIX

      protected static final String EMPTY_PREFIX
      See Also:
      Constant Field Values
    • jpaConversionTargetEntity

      protected com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAEntityType jpaConversionTargetEntity
    • jpaQueryResult

      protected JPAExpandResult jpaQueryResult
    • uriHelper

      protected final org.apache.olingo.server.api.uri.UriHelper uriHelper
    • setName

      protected String 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

      protected String buildConcatenatedKey(javax.persistence.Tuple row, List<com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAPath> leftColumns)
    • buildPath

      protected String buildPath(String prefix, com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAAssociationAttribute association)
    • 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.ODataJPAModelException
      org.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.ODataJPAModelException
      org.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

      protected final String determineAlias(String alias, String prefix)
    • 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

      protected final String determinePrefix(String alias)