staticAggregateIdGetterIfAnnotated

Creates a property getter for the static aggregate ID using reified generics.

This inline function provides a convenient way to get the static aggregate ID getter without explicitly specifying the class type.

Example usage:

@StaticAggregateId(aggregateId = "fixed-order-id")
class OrderAggregate

val idGetter = staticAggregateIdGetterIfAnnotated<OrderAggregate>()
val id = idGetter?.get(OrderAggregate()) // Returns "fixed-order-id"

Return

a PropertyGetter for the static aggregate ID, or null if the class is not annotated

Parameters

T

the type of the class (inferred at compile time)

See also