Package arez

Interface Locator

All Known Implementing Classes:
TypeBasedLocator

@OmitType(unless="arez.enable_references") public interface Locator
The interface used to look up components by type and id. This is primarily used by components that represent entities that relate to other entities.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    findById(Class<T> type, Object id)
    Lookup the entity with the specified type and the specified id, returning null if not present.
  • Method Details

    • findById

      @Nullable <T> T findById(@Nonnull Class<T> type, @Nonnull Object id)
      Lookup the entity with the specified type and the specified id, returning null if not present.
      Type Parameters:
      T - the entity type.
      Parameters:
      type - the type of the entity.
      id - the id of the entity.
      Returns:
      the entity or null if no such entity.