toSnapshot

fun <S : Any> ObjectNode.toSnapshot(type: AggregateType, stateType: Class<S>): Snapshot<S>

This snapshot query record (SnapshotQueryRecords.kt) of type, its state decoded as stateType.