Package org.springframework.data.support
Class ExampleMatcherAccessor
java.lang.Object
org.springframework.data.support.ExampleMatcherAccessor
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 -
Method Summary
Modifier and TypeMethodDescriptionGet definedExampleMatcher.StringMatcher.Get defined null handling.getPropertySpecifier(String path) Get theExampleMatcher.PropertySpecifierfor given path.Returns theExampleMatcher.PropertySpecifiers of the underlyingExampleMatcher.Get theExampleMatcher.StringMatcherfor a given path or return the default one if none defined.Get the ignore case flag for a given path or returnExampleMatcher.NoOpPropertyValueTransformerif none defined.booleanhasPropertySpecifier(String path) Returns whether the underlyingExampleMatchercontains aExampleMatcher.PropertySpecifierfor the given path.booleanbooleanbooleanisIgnoreCaseForPath(String path) Get the ignore case flag for a given path or return the default one if none defined.booleanisIgnoredPath(String path)
-
Constructor Details
-
ExampleMatcherAccessor
-
-
Method Details
-
getPropertySpecifiers
Returns theExampleMatcher.PropertySpecifiers of the underlyingExampleMatcher.- Returns:
- unmodifiable
CollectionofExampleMatcher.PropertySpecifiers.
-
hasPropertySpecifier
Returns whether the underlyingExampleMatchercontains aExampleMatcher.PropertySpecifierfor the given path.- Parameters:
path- the dot-path identifying a property.- Returns:
- true in case
ExampleMatcher.PropertySpecifierdefined for given path.
-
getPropertySpecifier
Get theExampleMatcher.PropertySpecifierfor given path.
Please check ifhasPropertySpecifier(String)to avoid running into null values.- Parameters:
path- Dot-Path to property.- Returns:
- null when no
ExampleMatcher.PropertySpecifierdefined for path.
-
hasPropertySpecifiers
public boolean hasPropertySpecifiers()- Returns:
- true if at least one
ExampleMatcher.PropertySpecifierdefined.
-
getStringMatcherForPath
Get theExampleMatcher.StringMatcherfor a given path or return the default one if none defined.- Parameters:
path-- Returns:
- never null.
-
getNullHandler
Get defined null handling.- Returns:
- never null
-
getDefaultStringMatcher
Get definedExampleMatcher.StringMatcher.- Returns:
- never null.
-
isIgnoreCaseEnabled
public boolean isIgnoreCaseEnabled()- Returns:
- true if
Stringshould be matched with ignore case option.
-
isIgnoredPath
- Parameters:
path-- Returns:
- return true if path was set to be ignored.
-
isIgnoreCaseForPath
Get the ignore case flag for a given path or return the default one if none defined.- Parameters:
path-- Returns:
- never null.
-
getValueTransformerForPath
Get the ignore case flag for a given path or returnExampleMatcher.NoOpPropertyValueTransformerif none defined.- Parameters:
path-- Returns:
- never null.
-