Interface GraphEntities<E extends GraphEntity>

    • Method Detail

      • getFactory

        GraphEntityFactory<E> getFactory()
        Factory to create instance of graph entity (for this container class)
        Returns:
        entity factory
      • getByXmlId

        default E getByXmlId​(String xmlId)
        Return an entity by its XML id Note: not an efficient implementation since it loops over all entities in linear time to identify the correct one, preferably use MapWrapper.get(Object) instead whenever possible.
        Parameters:
        xmlId - the XML id of the entity
        Returns:
        the specified entity instance
      • getByExternalId

        default Collection<E> getByExternalId​(String externalId)
        Collect all entities based on a matching external id. Entities are not indexed by external id so this is a very inefficient linear search through all registered entities.
        Parameters:
        externalId - to match
        Returns:
        found matching links
      • forEachMatchingIdIn

        default <T extends IdAble> void forEachMatchingIdIn​(Collection<T> values,
                                                            Consumer<T> consumer)
        Apply provided consumer to each element in values as long as that element is registered under the same id.
        Type Parameters:
        T - values type
        Parameters:
        values - to apply consumer to when they are registered in this wrapper
        consumer - to apply