private static void checkNumberOfNavigationSegments(final UriInfoImpl uriInfo) throws ODataException { switch (uriInfo.getUriType()) { case URI1: case URI6B: case URI7A: case URI7B: if (uriInfo.getNavigationSegments().size() > 1) { throw new ODataBadRequestException(ODataBadRequestException.NOTSUPPORTED); } break; case URI3: case URI4: case URI5: case URI17: if (!uriInfo.getNavigationSegments().isEmpty()) { throw new ODataBadRequestException(ODataBadRequestException.NOTSUPPORTED); } break; default: break; } }
private static void checkNumberOfNavigationSegments(final UriInfoImpl uriInfo) throws ODataException { switch (uriInfo.getUriType()) { case URI1: case URI6B: case URI7A: case URI7B: if (uriInfo.getNavigationSegments().size() > 1) { throw new ODataBadRequestException(ODataBadRequestException.NOTSUPPORTED); } break; case URI3: case URI4: case URI5: case URI17: if (!uriInfo.getNavigationSegments().isEmpty()) { throw new ODataBadRequestException(ODataBadRequestException.NOTSUPPORTED); } break; default: break; } }
private static void checkNumberOfNavigationSegments(final UriInfoImpl uriInfo) throws ODataException { switch (uriInfo.getUriType()) { case URI1: case URI6B: case URI7A: case URI7B: if (uriInfo.getNavigationSegments().size() > 1) { throw new ODataBadRequestException(ODataBadRequestException.NOTSUPPORTED); } break; case URI3: case URI4: case URI5: case URI17: if (!uriInfo.getNavigationSegments().isEmpty()) { throw new ODataBadRequestException(ODataBadRequestException.NOTSUPPORTED); } break; default: break; } }
UriInfoImpl clone = ((UriInfoImpl) createView).getClone(); clone.setTargetEntitySet(createView.getStartEntitySet()); clone.getNavigationSegments().clear(); clone.setTargetType(clone.getTargetEntitySet().getEntityType()); Object relatedEntity = readEntity(new JPAQueryBuilder(oDataJPAContext).build((PutMergePatchUriInfo) clone), (UriInfo) clone);