org.springframework.data.support

## Class ExampleMatcherAccessor

- java.lang.Object
- - org.springframework.data.support.ExampleMatcherAccessor

    public class ExampleMatcherAccessor
    extends Object

Accessor for the `ExampleMatcher` to use in modules that support query by example (QBE) querying.

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

### Constructor Summary

Constructors
Constructor and Description
`ExampleMatcherAccessor(ExampleMatcher matcher)`

### Method Summary

All Methods Instance Methods Concrete Methods
`ExampleMatcher.StringMatcher` `getDefaultStringMatcher()` Get defined `ExampleMatcher.StringMatcher`.
`ExampleMatcher.NullHandler` `getNullHandler()` Get defined null handling.
`ExampleMatcher.PropertySpecifier` `getPropertySpecifier(String path)` Get the `ExampleMatcher.PropertySpecifier` for given path.
`Collection<ExampleMatcher.PropertySpecifier>` `getPropertySpecifiers()` Returns the `ExampleMatcher.PropertySpecifier`s of the underlying `ExampleMatcher`.
`ExampleMatcher.StringMatcher` `getStringMatcherForPath(String path)` Get the `ExampleMatcher.StringMatcher` for a given path or return the default one if none defined.
`ExampleMatcher.PropertyValueTransformer` `getValueTransformerForPath(String path)` Get the ignore case flag for a given path or return `ExampleMatcher.NoOpPropertyValueTransformer` if none defined.
`boolean` `hasPropertySpecifier(String path)` Returns whether the underlying `ExampleMatcher` contains a `ExampleMatcher.PropertySpecifier` for the given path.
`boolean` `hasPropertySpecifiers()`
`boolean` `isIgnoreCaseEnabled()`
`boolean` `isIgnoreCaseForPath(String path)` Get the ignore case flag for a given path or return the default one if none defined.
`boolean` `isIgnoredPath(String path)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ExampleMatcherAccessor

    public ExampleMatcherAccessor(ExampleMatcher matcher)

### Method Detail

#### getPropertySpecifiers

    public Collection<ExampleMatcher.PropertySpecifier> getPropertySpecifiers()

Returns the `ExampleMatcher.PropertySpecifier`s of the underlying `ExampleMatcher`.

Returns:
  unmodifiable `Collection` of `ExampleMatcher.PropertySpecifier`s.

#### hasPropertySpecifier

    public boolean hasPropertySpecifier(String path)

Returns whether the underlying `ExampleMatcher` contains a `ExampleMatcher.PropertySpecifier` for the given path.

Parameters:
  `path` - the dot-path identifying a property.
Returns:
  true in case `ExampleMatcher.PropertySpecifier` defined for given path.

#### getPropertySpecifier

    public ExampleMatcher.PropertySpecifier getPropertySpecifier(String path)

Get the `ExampleMatcher.PropertySpecifier` for given path.
Please check if `hasPropertySpecifier(String)` to avoid running into null values.

Parameters:
  `path` - Dot-Path to property.
Returns:
  null when no `ExampleMatcher.PropertySpecifier` defined for path.

#### hasPropertySpecifiers

    public boolean hasPropertySpecifiers()

Returns:
  true if at least one `ExampleMatcher.PropertySpecifier` defined.

#### getStringMatcherForPath

    public ExampleMatcher.StringMatcher getStringMatcherForPath(String path)

Get the `ExampleMatcher.StringMatcher` for a given path or return the default one if none defined.

Parameters:
  `path` -
Returns:
  never null.

#### getNullHandler

    public ExampleMatcher.NullHandler getNullHandler()

Get defined null handling.

Returns:
  never null

#### getDefaultStringMatcher

    public ExampleMatcher.StringMatcher getDefaultStringMatcher()

Get defined `ExampleMatcher.StringMatcher`.

Returns:
  never null.

#### isIgnoreCaseEnabled

    public boolean isIgnoreCaseEnabled()

Returns:
  true if `String` should be matched with ignore case option.

#### isIgnoredPath

    public boolean isIgnoredPath(String path)

Parameters:
  `path` -
Returns:
  return true if path was set to be ignored.

#### isIgnoreCaseForPath

    public boolean isIgnoreCaseForPath(String path)

Get the ignore case flag for a given path or return the default one if none defined.

Parameters:
  `path` -
Returns:
  never null.

#### getValueTransformerForPath

    public ExampleMatcher.PropertyValueTransformer getValueTransformerForPath(String path)

Get the ignore case flag for a given path or return `ExampleMatcher.NoOpPropertyValueTransformer` if none defined.

Parameters:
  `path` -
Returns:
  never null.