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
-
Method Summary
Modifier and TypeMethodDescriptionGet definedExampleMatcher.StringMatcher
.Get defined null handling.getPropertySpecifier
(String path) Get theExampleMatcher.PropertySpecifier
for given path.Returns theExampleMatcher.PropertySpecifier
s of the underlyingExampleMatcher
.Get theExampleMatcher.StringMatcher
for a given path or return the default one if none defined.Get the ignore case flag for a given path or returnExampleMatcher.NoOpPropertyValueTransformer
if none defined.boolean
hasPropertySpecifier
(String path) Returns whether the underlyingExampleMatcher
contains aExampleMatcher.PropertySpecifier
for the given path.boolean
boolean
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)
-
Constructor Details
-
ExampleMatcherAccessor
-
-
Method Details
-
getPropertySpecifiers
Returns theExampleMatcher.PropertySpecifier
s of the underlyingExampleMatcher
.- Returns:
- unmodifiable
Collection
ofExampleMatcher.PropertySpecifier
s.
-
hasPropertySpecifier
Returns whether the underlyingExampleMatcher
contains aExampleMatcher.PropertySpecifier
for the given path.- Parameters:
path
- the dot-path identifying a property.- Returns:
- true in case
ExampleMatcher.PropertySpecifier
defined for given path.
-
getPropertySpecifier
Get theExampleMatcher.PropertySpecifier
for given path.
Please check ifhasPropertySpecifier(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
Get theExampleMatcher.StringMatcher
for 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
String
should 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.NoOpPropertyValueTransformer
if none defined.- Parameters:
path
-- Returns:
- never null.
-