Skip to content

Commit 7b4ac8e

Browse files
authored
Merge pull request #78 from holixon/feature/kdoc_improvements
[#18] Feature/kdoc improvements
2 parents 365311e + 3d80beb commit 7b4ac8e

File tree

7 files changed

+35
-19
lines changed

7 files changed

+35
-19
lines changed

kotlin/src/main/kotlin/org/axonframework/extensions/kotlin/AggregateLifecycleExtensions.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import org.axonframework.modelling.command.ApplyMore
2525
* Alias for [AggregateLifecycle.apply] method.
2626
* @param payload payload of the event message to be applied.
2727
* @return fluent instance to apply more.
28+
* @since 0.2.0
2829
*/
2930
fun applyEvent(payload: Any): ApplyMore = AggregateLifecycle.apply(payload)
3031

@@ -33,12 +34,15 @@ fun applyEvent(payload: Any): ApplyMore = AggregateLifecycle.apply(payload)
3334
* @param payload payload of the event message to be applied.
3435
* @param metaData metadata to be included into the event message.
3536
* @return fluent instance to apply more.
37+
* @since 0.2.0
3638
*/
3739
fun applyEvent(payload: Any, metaData: MetaData): ApplyMore = AggregateLifecycle.apply(payload, metaData)
3840

3941
/**
4042
* Create new aggregate instance.
41-
* @param [T] aggregate type.
43+
* @param T aggregate type.
4244
* @param factoryMethod factory method.
45+
* @return new instance of an aggregate.
46+
* @since 0.2.0
4347
*/
4448
inline fun <reified T : Any> createNew(noinline factoryMethod: () -> T): Aggregate<T> = AggregateLifecycle.createNew(T::class.java, factoryMethod)

kotlin/src/main/kotlin/org/axonframework/extensions/kotlin/BuilderExtensions.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,17 @@ import org.axonframework.modelling.command.GenericJpaRepository
2020

2121
/**
2222
* Reified version of the static builder for event souring repository.
23-
* @param [T] aggregate type.
23+
* @param T aggregate type.
2424
* @return event sourcing repository builder for aggregate [T]
25+
* @since 0.2.0
2526
*/
2627
inline fun <reified T : Any> eventSourcingRepositoryBuilder() = EventSourcingRepository.builder(T::class.java)
2728

2829

2930
/**
3031
* Reified version of the static builder for JPA repository.
31-
* @param [T] aggregate type.
32+
* @param T aggregate type.
3233
* @return Generic JPA repository builder for aggregate [T]
34+
* @since 0.2.0
3335
*/
3436
inline fun <reified T : Any> genericJpaRepositoryBuilder() = GenericJpaRepository.builder(T::class.java)

kotlin/src/main/kotlin/org/axonframework/extensions/kotlin/CommandGatewayExtensions.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ import org.axonframework.messaging.MetaData
2525
* @param command The command to send
2626
* @param onError Callback to handle failed execution
2727
* @param onSuccess Callback to handle successful execution
28-
* @param [R] the type of result of the command handling
29-
* @param [C] the type of payload of the command
28+
* @param R the type of result of the command handling
29+
* @param C the type of payload of the command
3030
* @see CommandGateway.send
31+
* @since 0.1.0
3132
*/
3233
inline fun <reified C : Any, reified R : Any?> CommandGateway.send(
3334
command: C,

kotlin/src/main/kotlin/org/axonframework/extensions/kotlin/EventUpcaster.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import kotlin.reflect.KClass
2323

2424
/**
2525
* Helpers for event upcaster.
26+
* @since 0.1.0
2627
*/
2728
object EventUpcaster {
2829
/**

kotlin/src/main/kotlin/org/axonframework/extensions/kotlin/QueryGatewayExtensions.kt

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ import java.util.concurrent.CompletableFuture
2525
* Reified version of [QueryGateway.query]
2626
* which expects a collection as a response using [org.axonframework.messaging.responsetypes.MultipleInstancesResponseType]
2727
* @param query Query to send
28-
* @param [Q] the type of payload of the query
29-
* @param [R] the type of result of the query
28+
* @param Q the type of payload of the query
29+
* @param R the type of result of the query
3030
* @return [CompletableFuture] wrapping the result of the query
3131
* @see QueryGateway.query
3232
* @see ResponseTypes
33+
* @since 0.1.0
3334
*/
3435
inline fun <reified R, reified Q> QueryGateway.queryMany(query: Q): CompletableFuture<List<R>> {
3536
return this.query(query, ResponseTypes.multipleInstancesOf(R::class.java))
@@ -40,11 +41,12 @@ inline fun <reified R, reified Q> QueryGateway.queryMany(query: Q): CompletableF
4041
* which expects a collection as a response using [org.axonframework.messaging.responsetypes.MultipleInstancesResponseType]
4142
* @param queryName Name of the query
4243
* @param query Query to send
43-
* @param [Q] the type of payload of the query
44-
* @param [R] the type of result of the query
44+
* @param Q the type of payload of the query
45+
* @param R the type of result of the query
4546
* @return [CompletableFuture] wrapping the result of the query
4647
* @see QueryGateway.query
4748
* @see ResponseTypes
49+
* @since 0.1.0
4850
*/
4951
inline fun <reified R, reified Q> QueryGateway.queryMany(queryName: String, query: Q): CompletableFuture<List<R>> {
5052
return this.query(queryName, query, ResponseTypes.multipleInstancesOf(R::class.java))
@@ -54,11 +56,12 @@ inline fun <reified R, reified Q> QueryGateway.queryMany(queryName: String, quer
5456
* Reified version of [QueryGateway.query]
5557
* which expects a single object as a response using [org.axonframework.messaging.responsetypes.InstanceResponseType]
5658
* @param query Query to send
57-
* @param [Q] the type of payload of the query
58-
* @param [R] the type of result of the query
59+
* @param Q the type of payload of the query
60+
* @param R the type of result of the query
5961
* @return [CompletableFuture] wrapping the result of the query
6062
* @see QueryGateway.query
6163
* @see ResponseTypes
64+
* @since 0.1.0
6265
*/
6366
inline fun <reified R, reified Q> QueryGateway.query(query: Q): CompletableFuture<R> {
6467
return this.query(query, ResponseTypes.instanceOf(R::class.java))
@@ -69,11 +72,12 @@ inline fun <reified R, reified Q> QueryGateway.query(query: Q): CompletableFutur
6972
* which expects a single object as a response using [org.axonframework.messaging.responsetypes.InstanceResponseType]
7073
* @param queryName Name of the query
7174
* @param query Query to send
72-
* @param [Q] the type of payload of the query
73-
* @param [R] the type of result of the query
75+
* @param Q the type of payload of the query
76+
* @param R the type of result of the query
7477
* @return [CompletableFuture] wrapping the result of the query
7578
* @see QueryGateway.query
7679
* @see ResponseTypes
80+
* @since 0.1.0
7781
*/
7882
inline fun <reified R, reified Q> QueryGateway.query(queryName: String, query: Q): CompletableFuture<R> {
7983
return this.query(queryName, query, ResponseTypes.instanceOf(R::class.java))
@@ -83,11 +87,12 @@ inline fun <reified R, reified Q> QueryGateway.query(queryName: String, query: Q
8387
* Reified version of [QueryGateway.query]
8488
* which expects an Optional object as a response using [org.axonframework.messaging.responsetypes.OptionalResponseType]
8589
* @param query Query to send
86-
* @param [Q] the type of payload of the query
87-
* @param [R] the type of result of the query
90+
* @param Q the type of payload of the query
91+
* @param R the type of result of the query
8892
* @return [CompletableFuture] wrapping the result of the query
8993
* @see QueryGateway.query
9094
* @see ResponseTypes
95+
* @since 0.1.0
9196
*/
9297
inline fun <reified R, reified Q> QueryGateway.queryOptional(query: Q): CompletableFuture<Optional<R>> {
9398
return this.query(query, ResponseTypes.optionalInstanceOf(R::class.java))
@@ -98,11 +103,12 @@ inline fun <reified R, reified Q> QueryGateway.queryOptional(query: Q): Completa
98103
* which expects an Optional object as a response using [org.axonframework.messaging.responsetypes.OptionalResponseType]
99104
* @param queryName Name of the query
100105
* @param query Query to send
101-
* @param [Q] the type of payload of the query
102-
* @param [R] the type of result of the query
106+
* @param Q the type of payload of the query
107+
* @param R the type of result of the query
103108
* @return [CompletableFuture] wrapping the result of the query
104109
* @see QueryGateway.query
105110
* @see ResponseTypes
111+
* @since 0.1.0
106112
*/
107113
inline fun <reified R, reified Q> QueryGateway.queryOptional(queryName: String, query: Q): CompletableFuture<Optional<R>> {
108114
return this.query(queryName, query, ResponseTypes.optionalInstanceOf(R::class.java))

kotlin/src/main/kotlin/org/axonframework/extensions/kotlin/QueryUpdateEmitterExtensions.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ import org.axonframework.queryhandling.QueryUpdateEmitter
1212
*
1313
* @param update incremental update
1414
* @param filter predicate on query payload used to filter subscription queries
15-
* @param [Q] the type of the query
16-
* @param [U] the type of the update
15+
* @param Q the type of the query
16+
* @param U the type of the update
1717
* @see org.axonframework.queryhandling.QueryUpdateEmitter.emit
1818
* @author Stefan Andjelkovic
19+
* @since 0.1.0
1920
*/
2021
inline fun <reified Q, reified U : Any> QueryUpdateEmitter.emit(update: U, noinline filter: (Q) -> Boolean) =
2122
this.emit(Q::class.java, filter, update)

kotlin/src/main/kotlin/org/axonframework/extensions/kotlin/ResultDiscriminatorCommandCallback.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import org.axonframework.messaging.MetaData
2828
* @param [C] the type of payload of the command
2929
* @see CommandCallback
3030
* @author Stefan Andjelkovic
31+
* @since 0.1.0
3132
*/
3233
class ResultDiscriminatorCommandCallback<C, R>(
3334
val onSuccess: (commandMessage: CommandMessage<out C>, result: R, metaData: MetaData) -> Unit,

0 commit comments

Comments
 (0)