public boolean isIgnoreCaseEnabled() { return delegate.isIgnoreCaseEnabled(); }
public boolean isIgnoreCaseEnabled() { return delegate.isIgnoreCaseEnabled(); }
/** * @return {@literal true} if {@link String} should be matched with ignore case option. */ public boolean isIgnoreCaseEnabled() { return matcher.isIgnoreCaseEnabled(); }
/** * Get the ignore case flag for a given path or return the default one if none defined. * * @param path * @return never {@literal null}. */ public boolean isIgnoreCaseForPath(String path) { if (!hasPropertySpecifier(path)) { return matcher.isIgnoreCaseEnabled(); } ExampleMatcher.PropertySpecifier specifier = getPropertySpecifier(path); Boolean ignoreCase = specifier.getIgnoreCase(); return ignoreCase != null ? ignoreCase : matcher.isIgnoreCaseEnabled(); }
private boolean ignoreCase(ExampleMatcher matcher, String path) { final ExampleMatcher.PropertySpecifier specifier = matcher.getPropertySpecifiers().getForPath(path); return matcher.isIgnoreCaseEnabled() || specifier != null && Boolean.TRUE.equals(specifier.getIgnoreCase()); }
private boolean ignoreCase(ExampleMatcher matcher, String path) { final ExampleMatcher.PropertySpecifier specifier = matcher.getPropertySpecifiers().getForPath(path); return matcher.isIgnoreCaseEnabled() || specifier != null && Boolean.TRUE.equals(specifier.getIgnoreCase()); }
private <T> void validateExample(Example<T> example) { Assert.notNull(example, "A non-null example is expected"); ExampleMatcher matcher = example.getMatcher(); if (!matcher.isAllMatching()) { throw new DatastoreDataException("Unsupported MatchMode. Only MatchMode.ALL is supported"); } if (matcher.isIgnoreCaseEnabled()) { throw new DatastoreDataException("Ignore case matching is not supported"); } if (!(matcher.getDefaultStringMatcher() == ExampleMatcher.StringMatcher.EXACT || matcher.getDefaultStringMatcher() == ExampleMatcher.StringMatcher.DEFAULT)) { throw new DatastoreDataException("Unsupported StringMatcher. Only EXACT and DEFAULT are supported"); } Optional<String> path = example.getMatcher().getIgnoredPaths().stream().filter((s) -> s.contains(".")).findFirst(); if (path.isPresent()) { throw new DatastoreDataException("Ignored paths deeper than 1 are not supported"); } if (matcher.getPropertySpecifiers().hasValues()) { throw new DatastoreDataException("Property matchers are not supported"); } } }
clause = String.format("e.%s == null", fullPath); } else if (String.class.isAssignableFrom(value.getClass())) { final boolean ignoreCase = specifier == null ? example.getMatcher().isIgnoreCaseEnabled() : (specifier.getIgnoreCase() == null ? false : specifier.getIgnoreCase()); final ExampleMatcher.StringMatcher stringMatcher = (specifier == null
clause = String.format("e.%s == null", fullPath); } else if (String.class.isAssignableFrom(value.getClass())) { final boolean ignoreCase = specifier == null ? example.getMatcher().isIgnoreCaseEnabled() : (specifier.getIgnoreCase() == null ? false : specifier.getIgnoreCase()); final ExampleMatcher.StringMatcher stringMatcher = (specifier == null
example.getMatcher().isIgnoreCaseEnabled(), likeType);
example.getMatcher().isIgnoreCaseEnabled(), likeType);