/** * Gets the next link if exists. * * @return next link if exists; null otherwise. */ public URI getNext() { if (entitySet == null) { throw new IllegalStateException("Iteration must be completed in order to retrieve the link for next page"); } return entitySet.getNext(); }
protected boolean add(final ClientEntitySet entitySet, final ClientEntity entity) { return entitySet.getEntities().add(entity); }
@Override public EntityCollection getEntitySet(final ClientEntitySet odataEntitySet) { final EntityCollection entitySet = new EntityCollection(); entitySet.setCount(odataEntitySet.getCount()); final URI next = odataEntitySet.getNext(); if (next != null) { entitySet.setNext(next); } for (ClientEntity entity : odataEntitySet.getEntities()) { entitySet.getEntities().add(getEntity(entity)); } entitySet.setDeltaLink(odataEntitySet.getDeltaLink()); annotations(odataEntitySet, entitySet); return entitySet; }
entities.addAll(entitySet.getEntities()); next = entitySet.getNext(); anns.addAll(entitySet.getAnnotations());
entitySet.setCount(resource.getPayload().getCount()); operation.setTitle(op.getTitle()); operation.setMetadataAnchor(op.getMetadataAnchor()); entitySet.getOperations().add(operation); entitySet.setDeltaLink(URIUtils.getURI(base, resource.getPayload().getDeltaLink()));
countMap.put(navigationName, (Integer) property.getValue()); } else { link.asInlineEntitySet().getEntitySet().setCount((Integer) property.getValue());
@Override public EntityCollection getEntitySet(final ClientEntitySet odataEntitySet) { final EntityCollection entitySet = new EntityCollection(); entitySet.setCount(odataEntitySet.getCount()); final URI next = odataEntitySet.getNext(); if (next != null) { entitySet.setNext(next); } for (ClientEntity entity : odataEntitySet.getEntities()) { entitySet.getEntities().add(getEntity(entity)); } entitySet.setDeltaLink(odataEntitySet.getDeltaLink()); annotations(odataEntitySet, entitySet); return entitySet; }
entities.addAll(entitySet.getEntities()); next = entitySet.getNext(); anns.addAll(entitySet.getAnnotations());
entitySet.setCount(resource.getPayload().getCount()); operation.setTitle(op.getTitle()); operation.setMetadataAnchor(op.getMetadataAnchor()); entitySet.getOperations().add(operation); entitySet.setDeltaLink(URIUtils.getURI(base, resource.getPayload().getDeltaLink()));
countMap.put(navigationName, (Integer) property.getValue()); } else { link.asInlineEntitySet().getEntitySet().setCount((Integer) property.getValue());
/** * Gets the next link if exists. * * @return next link if exists; null otherwise. */ public URI getNext() { if (entitySet == null) { throw new IllegalStateException("Iteration must be completed in order to retrieve the link for next page"); } return entitySet.getNext(); }
protected boolean add(final ClientEntitySet entitySet, final ClientEntity entity) { return entitySet.getEntities().add(entity); }
private static List<Object> extractItems(final AbstractService<?> service, final Class<?> typeRef, final ClientEntitySet entitySet, final URI uri, final boolean checkInTheContext) { final List<Object> items = new ArrayList<Object>(); if (entitySet != null) { for (ClientEntity entityFromSet : entitySet.getEntities()) { items.add(getEntityProxy(service, entityFromSet, uri, typeRef, null, checkInTheContext)); } } return items; }
private static List<Object> extractItems(final AbstractService<?> service, final Class<?> typeRef, final ClientEntitySet entitySet, final URI uri, final boolean checkInTheContext) { final List<Object> items = new ArrayList<Object>(); if (entitySet != null) { for (ClientEntity entityFromSet : entitySet.getEntities()) { items.add(getEntityProxy(service, entityFromSet, uri, typeRef, null, checkInTheContext)); } } return items; }