Package org.apache.olingo.odata2.jpa.processor.api.access

Examples of org.apache.olingo.odata2.jpa.processor.api.access.JPAEdmBuilder


        writeContent(edm, new HttpMerge(createUri(resourcePath, null)), uriInfo, data, responseHandler);
    }

    @Override
    public void batch(Edm edm, Object data, Olingo2ResponseHandler<List<Olingo2BatchResponse>> responseHandler) {
        final UriInfoImpl uriInfo = parseUri(edm, BATCH, null);

        writeContent(edm, new HttpPost(createUri(BATCH, null)), uriInfo, data, responseHandler);
    }
View Full Code Here


                    changeSetParts.clear();
                    contentIdMap.clear();
                }

                // add to request parts
                final UriInfoImpl uriInfo = parseUri(edm, batchPart.getResourcePath(), null);
                parts.add(createBatchQueryPart(uriInfo, (Olingo2BatchQueryRequest) batchPart));

            } else {

                // add to change set parts
View Full Code Here

        // is it a referenced entity?
        if (resourcePath.startsWith("$")) {
            resourcePath = replaceContentId(edm, resourcePath, contentIdMap);
        }

        final UriInfoImpl uriInfo = parseUri(edm, resourcePath, null);

        // serialize data into ODataResponse object, if set in request and this is not a DELETE request
        final Map<String, String> headers = new HashMap<String, String>();
        byte[] body = null;
View Full Code Here

            resolvedResourcePath = resourceLocation != null
                ? resourceLocation.substring(serviceUri.length()) : resourcePath;
        }
        final Map<String, String> resolvedQueryParams = request instanceof Olingo2BatchQueryRequest
            ? ((Olingo2BatchQueryRequest) request).getQueryParams() : null;
        final UriInfoImpl uriInfo = parseUri(edm, resolvedResourcePath, resolvedQueryParams);

        // resolve response content
        final Object resolvedContent = content != null ? readContent(uriInfo, content) : null;

        return new Olingo2BatchResponse(statusCode, statusInfo, response.getContentId(), response.getHeaders(),
View Full Code Here

        }
        return absolutUri.toString();
    }

    private static UriInfoImpl parseUri(Edm edm, String resourcePath, Map<String, String> queryParams) {
        UriInfoImpl result;
        try {
            final List<PathSegment> pathSegments = new ArrayList<PathSegment>();
            final String[] segments = new URI(resourcePath).getPath().split(SEPARATOR);
            if (queryParams == null) {
                queryParams = Collections.emptyMap();
View Full Code Here

    assertNotNull(objJPAEdmEntityContainer.getEdmAssociationSetView());
  }

  @Test
  public void testGetBuilderIdempotent() {
    JPAEdmBuilder builder1 = objJPAEdmEntityContainer.getBuilder();
    JPAEdmBuilder builder2 = objJPAEdmEntityContainer.getBuilder();

    assertEquals(builder1.hashCode(), builder2.hashCode());
  }
View Full Code Here

    return this;
  }

  @Override
  public JPAEdmBuilder getBuilder() {
    return new JPAEdmBuilder() {

      @Override
      public void build() {
        // Nothing to do?
      }
View Full Code Here

    assertNotNull(objJPAEdmReferentialConstraintRole.getBuilder());
  }

  @Test
  public void testGetBuilderIdempotent() {
    JPAEdmBuilder builder1 = objJPAEdmReferentialConstraintRole.getBuilder();
    JPAEdmBuilder builder2 = objJPAEdmReferentialConstraintRole.getBuilder();

    assertEquals(builder1.hashCode(), builder2.hashCode());
  }
View Full Code Here

    assertNotNull(objJPAEdmReferentialConstraint.getBuilder());
  }

  @Test
  public void testGetBuilderIdempotent() {
    JPAEdmBuilder builder1 = objJPAEdmReferentialConstraint.getBuilder();
    JPAEdmBuilder builder2 = objJPAEdmReferentialConstraint.getBuilder();

    assertEquals(builder1.hashCode(), builder2.hashCode());
  }
View Full Code Here

    assertFalse(objJPAEdmEntitySet.isConsistent());
  }

  @Test
  public void testGetBuilderIdempotent() {
    JPAEdmBuilder builder1 = objJPAEdmEntitySet.getBuilder();
    JPAEdmBuilder builder2 = objJPAEdmEntitySet.getBuilder();

    assertEquals(builder1.hashCode(), builder2.hashCode());
  }
View Full Code Here

TOP

Related Classes of org.apache.olingo.odata2.jpa.processor.api.access.JPAEdmBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.