Class UntypedExampleMatcher

java.lang.Object
org.springframework.data.mongodb.core.query.UntypedExampleMatcher
All Implemented Interfaces:
org.springframework.data.domain.ExampleMatcher

public class UntypedExampleMatcher extends Object implements org.springframework.data.domain.ExampleMatcher
ExampleMatcher implementation for query by example (QBE). Unlike plain ExampleMatcher this untyped counterpart does not enforce type matching when executing the query. This allows to query unrelated example documents as references for querying collections as long as the used field/property names match.
Since:
2.0
Author:
Christoph Strobl, Mark Paluch
  • Method Details

    • matching

      public static UntypedExampleMatcher matching()
    • matchingAny

      public static UntypedExampleMatcher matchingAny()
    • matchingAll

      public static UntypedExampleMatcher matchingAll()
    • withIgnorePaths

      public UntypedExampleMatcher withIgnorePaths(String... ignoredPaths)
      Specified by:
      withIgnorePaths in interface org.springframework.data.domain.ExampleMatcher
    • withStringMatcher

      public UntypedExampleMatcher withStringMatcher(org.springframework.data.domain.ExampleMatcher.StringMatcher defaultStringMatcher)
      Specified by:
      withStringMatcher in interface org.springframework.data.domain.ExampleMatcher
    • withIgnoreCase

      public UntypedExampleMatcher withIgnoreCase()
      Specified by:
      withIgnoreCase in interface org.springframework.data.domain.ExampleMatcher
    • withIgnoreCase

      public UntypedExampleMatcher withIgnoreCase(boolean defaultIgnoreCase)
      Specified by:
      withIgnoreCase in interface org.springframework.data.domain.ExampleMatcher
    • withMatcher

      public UntypedExampleMatcher withMatcher(String propertyPath, org.springframework.data.domain.ExampleMatcher.MatcherConfigurer<org.springframework.data.domain.ExampleMatcher.GenericPropertyMatcher> matcherConfigurer)
      Specified by:
      withMatcher in interface org.springframework.data.domain.ExampleMatcher
    • withMatcher

      public UntypedExampleMatcher withMatcher(String propertyPath, org.springframework.data.domain.ExampleMatcher.GenericPropertyMatcher genericPropertyMatcher)
      Specified by:
      withMatcher in interface org.springframework.data.domain.ExampleMatcher
    • withTransformer

      public UntypedExampleMatcher withTransformer(String propertyPath, org.springframework.data.domain.ExampleMatcher.PropertyValueTransformer propertyValueTransformer)
      Specified by:
      withTransformer in interface org.springframework.data.domain.ExampleMatcher
    • withIgnoreCase

      public UntypedExampleMatcher withIgnoreCase(String... propertyPaths)
      Specified by:
      withIgnoreCase in interface org.springframework.data.domain.ExampleMatcher
    • withIncludeNullValues

      public UntypedExampleMatcher withIncludeNullValues()
      Specified by:
      withIncludeNullValues in interface org.springframework.data.domain.ExampleMatcher
    • withIgnoreNullValues

      public UntypedExampleMatcher withIgnoreNullValues()
      Specified by:
      withIgnoreNullValues in interface org.springframework.data.domain.ExampleMatcher
    • withNullHandler

      public UntypedExampleMatcher withNullHandler(org.springframework.data.domain.ExampleMatcher.NullHandler nullHandler)
      Specified by:
      withNullHandler in interface org.springframework.data.domain.ExampleMatcher
    • getNullHandler

      public org.springframework.data.domain.ExampleMatcher.NullHandler getNullHandler()
      Specified by:
      getNullHandler in interface org.springframework.data.domain.ExampleMatcher
    • getDefaultStringMatcher

      public org.springframework.data.domain.ExampleMatcher.StringMatcher getDefaultStringMatcher()
      Specified by:
      getDefaultStringMatcher in interface org.springframework.data.domain.ExampleMatcher
    • isIgnoreCaseEnabled

      public boolean isIgnoreCaseEnabled()
      Specified by:
      isIgnoreCaseEnabled in interface org.springframework.data.domain.ExampleMatcher
    • isIgnoredPath

      public boolean isIgnoredPath(String path)
      Specified by:
      isIgnoredPath in interface org.springframework.data.domain.ExampleMatcher
    • getIgnoredPaths

      public Set<String> getIgnoredPaths()
      Specified by:
      getIgnoredPaths in interface org.springframework.data.domain.ExampleMatcher
    • getPropertySpecifiers

      public org.springframework.data.domain.ExampleMatcher.PropertySpecifiers getPropertySpecifiers()
      Specified by:
      getPropertySpecifiers in interface org.springframework.data.domain.ExampleMatcher
    • isAllMatching

      public boolean isAllMatching()
      Specified by:
      isAllMatching in interface org.springframework.data.domain.ExampleMatcher
    • isAnyMatching

      public boolean isAnyMatching()
      Specified by:
      isAnyMatching in interface org.springframework.data.domain.ExampleMatcher
    • getMatchMode

      public org.springframework.data.domain.ExampleMatcher.MatchMode getMatchMode()
      Specified by:
      getMatchMode in interface org.springframework.data.domain.ExampleMatcher
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object