Interface EntitySet

All Superinterfaces:
Iterable<Entity>
All Known Implementing Classes:
EntitySetImpl

public interface EntitySet extends Iterable<Entity>
The EntitySet model element.
  • Method Details

    • add

      void add(Entity entity)
    • getCount

      long getCount()
      Get The total number of entities in the Set that exist on the server. Returns -1 if the count is not loaded.
      Returns:
      The total number of entities in the Set that exist on the server.
    • setCount

      void setCount(long count)
    • iterator

      Iterator<Entity> iterator()
      Get an iterator that iterates over all entities, following nextLinks if needed.
      Specified by:
      iterator in interface Iterable<Entity>
      Returns:
      An iterator that iterates over all entities, following nextLinks if needed.
    • hasNextLink

      boolean hasNextLink()
      Check if there is a nextLink.
      Returns:
      true if there is a nextLink to fetch more Entities.
    • getNextLink

      String getNextLink()
      Get the nextLink, if it exists. NULL otherwise.
      Returns:
      the nextLink, if it exists.
    • setNextLink

      void setNextLink(String nextLink)
    • fetchNext

      void fetchNext() throws ServiceFailureException
      Use the nextLink to fetch more Entities.
      Throws:
      ServiceFailureException - If there is a problem following the nextLink.
    • size

      int size()
      Get the number of currently loaded Entities in the Set.
      Returns:
      The number of currently loaded Entities in the Set.
    • isEmpty

      boolean isEmpty()
      Check if there are entities currently loaded in the set.
      Returns:
      true if there are no Entities currently loaded in the set.
    • toList

      List<Entity> toList()
      Get the currently loaded entities as a List<Entity>. This returns the internal ArrayList.
      Returns:
      the list of currently loaded entities.
    • getEntityType

      EntityType getEntityType()
    • getNavigationProperty

      NavigationPropertyEntitySet getNavigationProperty()
      Get the navigationProperty that manages this EntitySet. Can be null, for top-level entity sets.
      Returns:
      the navigationProperty that manages this EntitySet.
    • setService

      void setService(SensorThingsService service)
      Sets the service for the set and all Entities in the set.
      Parameters:
      service - the service to set.