Interface RepositoryFragmentsContributor


public interface RepositoryFragmentsContributor
Strategy interface support allowing to contribute a RepositoryComposition.RepositoryFragments based on RepositoryMetadata.

Fragments contributors enhance repository functionality based on a repository declaration and activate additional fragments if a repository defines them, such as extending a built-in fragment interface (e.g. QuerydslPredicateExecutor, QueryByExampleExecutor).

This interface is a base-interface serving as a contract for repository fragment introspection. The actual implementation and methods to contribute fragments to be used within the repository instance are store-specific and require typically access to infrastructure such as a database connection hence those methods must be defined within the particular store module.

Since:
4.0
Author:
Mark Paluch
  • Method Details

    • empty

      Empty RepositoryFragmentsContributor that does not contribute any fragments.
      Returns:
      empty RepositoryFragmentsContributor that does not contribute any fragments.
    • describe

      Describe fragments that are contributed by RepositoryMetadata. Fragment description reports typically structural fragments that are not suitable for invocation but can be used to introspect the repository structure.
      Parameters:
      metadata - the repository metadata describing the repository interface.
      Returns:
      fragments to be (structurally) contributed to the repository.