All Downloads are FREE. Search and download functionalities are using the official Maven repository.

arez.Locator Maven / Gradle / Ivy

There is a newer version: 0.213
Show newest version
package arez;

import grim.annotations.OmitType;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

/**
 * 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.
 */
@OmitType( unless = "arez.enable_references" )
public interface Locator
{
  /**
   * Lookup the entity with the specified type and the specified id, returning null if not present.
   *
   * @param   the entity type.
   * @param type the type of the entity.
   * @param id   the id of the entity.
   * @return the entity or null if no such entity.
   */
  @Nullable
   T findById( @Nonnull Class type, @Nonnull Object id );
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy