Skip to content

Commit ef7315a

Browse files
committed
DATACMNS-810 - Improvements to the Query by Example documentation.
Fixed a few left over references to ExampleSpec which is now ExampleMatcher. Removed references to previous model of typed and untyped matchers.
1 parent 26f725b commit ef7315a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/main/asciidoc/query-by-example.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ You can read more about <<query.by.example.execution, Query by Example Execution
8686
[[query.by.example.matcher]]
8787
=== Example matchers
8888

89-
Examples are not limited to default settings. You can specify own defaults for string matching, null handling and property-specific settings using the `ExampleMatcher`. `ExampleMatcher` comes in two flavors: untyped and typed. By default `Example.of(Person.class)` uses an untyped `ExampleMatcher`. Using untyped `ExampleMatcher` will use the Repository entity information to determine the type to query and has no control over inheritance queries. Also, untyped `ExampleMatcher` will use the probe type when using with a Template to determine the type to query. Read more about <<query.by.example.matcher.typed,typed `ExampleMatcher`>> below.
89+
Examples are not limited to default settings. You can specify own defaults for string matching, null handling and property-specific settings using the `ExampleMatcher`.
9090

91-
.Untyped Example Spec with customized matching
91+
.Example matcher with customized matching
9292
====
9393
[source,java]
9494
----
@@ -118,7 +118,7 @@ You can specify behavior for individual properties (e.g. "firstname" and "lastna
118118
====
119119
[source,java]
120120
----
121-
ExampleMatcher exampleSpec = ExampleMatcher.untyped()
121+
ExampleMatcher matcher = ExampleMatcher.matching()
122122
.withMatcher("firstname", endsWith())
123123
.withMatcher("lastname", startsWith().ignoreCase());
124124
}
@@ -131,9 +131,9 @@ Another style to configure matcher options is by using Java 8 lambdas. This appr
131131
====
132132
[source,java]
133133
----
134-
ExampleMatcher exampleSpec = ExampleMatcher.untyped()
135-
.withMatcher("firstname", matcher -> matcher.endsWith())
136-
.withMatcher("firstname", matcher -> matcher.startsWith());
134+
ExampleMatcher matcher = ExampleMatcher.matching()
135+
.withMatcher("firstname", match -> match.endsWith())
136+
.withMatcher("firstname", match -> match.startsWith());
137137
}
138138
----
139139
====

0 commit comments

Comments
 (0)