org.springframework.data.domain

## Interface Example<T>

Type Parameters:
  `T` - the type of the probe.

    public interface Example<T>

Support for query by example (QBE). An `Example` takes a `probe` to define the example. Matching options and type safety can be tuned using `ExampleMatcher`.

Since:
  1.12
Author:
  Christoph Strobl, Mark Paluch, Oliver Gierke

### Method Summary

All Methods Static Methods Instance Methods Abstract Methods Default Methods
`ExampleMatcher` `getMatcher()` Get the `ExampleMatcher` used.
`T` `getProbe()` Get the example used.
`default Class<T>` `getProbeType()` Get the actual type for the probe used.
`static <T> Example<T>` `of(T probe)` Create a new `Example` including all non-null properties by default.
`static <T> Example<T>` `of(T probe, ExampleMatcher matcher)` Create a new `Example` using the given `ExampleMatcher`.

### Method Detail

#### of

    static <T> Example<T> of(T probe)

Create a new `Example` including all non-null properties by default.

Parameters:
  `probe` - must not be null.
Returns:

#### of

    static <T> Example<T> of(T probe,
                             ExampleMatcher matcher)

Create a new `Example` using the given `ExampleMatcher`.

Parameters:
  `probe` - must not be null.
  `matcher` - must not be null.
Returns:

#### getProbe

    T getProbe()

Get the example used.

Returns:
  never null.

#### getMatcher

    ExampleMatcher getMatcher()

Get the `ExampleMatcher` used.

Returns:
  never null.

#### getProbeType

    default Class<T> getProbeType()

Get the actual type for the probe used. This is usually the given class, but the original class in case of a CGLIB-generated subclass.

Returns:
See Also:
  `ProxyUtils.getUserClass(Class)`