Skip to content

Commit 62f0505

Browse files
christophstroblmp911de
authored andcommitted
DATACMNS-1545 - Fix documentation anchors for entity callback API.
Original pull request: #398.
1 parent ed0d30b commit 62f0505

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/main/asciidoc/entity-callbacks.adoc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[entity-callbacks]
1+
[[entity-callbacks]]
22
= Entity Callbacks
33

44
The Spring Data infrastructure provides hooks for modifying an entity before and after certain methods are invoked.
@@ -17,7 +17,7 @@ The Entity Callback API has been introduced with Spring Data Commons 2.2. It is
1717
Existing store specific `ApplicationEvents` are still published *before* the invoking potentially registered `EntityCallback` instances.
1818
====
1919

20-
[entity-callbacks.implement]
20+
[[entity-callbacks.implement]]
2121
== Implementing Entity Callbacks
2222

2323
An `EntityCallback` is directly associated with its domain type through its generic type argument.
@@ -78,7 +78,7 @@ class DefaultingEntityCallback implements BeforeSaveCallback<Person>, Ordered <2
7878
@Override
7979
public Object onBeforeSave(Person entity, String collection) { <1>
8080
81-
if(collection == "user) {
81+
if(collection == "user") {
8282
return // ...
8383
}
8484
@@ -95,7 +95,7 @@ class DefaultingEntityCallback implements BeforeSaveCallback<Person>, Ordered <2
9595
<2> Potentially order the entity callback if multiple ones for the same domain type exist. Ordering follows lowest precedence.
9696
====
9797

98-
[entity-callbacks.register]
98+
[[entity-callbacks.register]]
9999
== Registering Entity Callbacks
100100

101101
`EntityCallback` beans are picked up by the store specific implementations in case they are registered in the `ApplicationContext`.
@@ -107,7 +107,7 @@ The following example explains a collection of valid entity callback registratio
107107
====
108108
[source,java]
109109
----
110-
@Order(1) <1>
110+
@Order(1) <1>
111111
@Component
112112
class First implements BeforeSaveCallback<Person> {
113113
@@ -119,7 +119,7 @@ class First implements BeforeSaveCallback<Person> {
119119
120120
@Component
121121
class DefaultingEntityCallback implements BeforeSaveCallback<Person>,
122-
Ordered <2> {
122+
Ordered { <2>
123123
124124
@Override
125125
public Object onBeforeSave(Person entity, String collection) {
@@ -128,22 +128,22 @@ class DefaultingEntityCallback implements BeforeSaveCallback<Person>,
128128
129129
@Override
130130
public int getOrder() {
131-
return 100; <2>
131+
return 100; <2>
132132
}
133133
}
134134
135135
@Configuration
136136
public class EntityCallbackConfiguration {
137137
138138
@Bean
139-
BeforeSaveCallback<Person> unorderedLambdaReceiverCallback() { <3>
139+
BeforeSaveCallback<Person> unorderedLambdaReceiverCallback() { <3>
140140
return (BeforeSaveCallback<Person>) it -> // ...
141141
}
142142
}
143143
144144
@Component
145145
class UserCallbacks implements BeforeConvertCallback<User>,
146-
BeforeSaveCallback<User> { <4>
146+
BeforeSaveCallback<User> { <4>
147147
148148
@Override
149149
public Person onBeforeConvert(User user) {

0 commit comments

Comments
 (0)