Description of your use case: The old query methods marked as deprecated should be removed.
/**
* Legacy handler to support old query.
*/
@Deprecated("Will be removed in future versions", ReplaceWith("query(query: TaskWithDataEntriesForIdQuery): Optional<TaskWithDataEntries>"))
@QueryHandler
fun legacyQuery(query: TaskWithDataEntriesForIdQuery): TaskWithDataEntries? {
logger.warn { "You are using deprecated API, consider to switch to query(TaskWithDataEntriesForIdQuery): Optional<TaskWithDataEntries>" }
return query(query).orElse(null)
}
/**
* Legacy handler to support old query.
*/
@Deprecated("Will be removed in future versions", ReplaceWith("query(TaskForIdQuery): Optional<Task>"))
@QueryHandler
fun legacyQuery(query: TaskForIdQuery): Task? {
logger.warn { "You are using deprecated API, consider to switch to query(TaskForIdQuery): Optional<Task>" }
return query(query).orElse(null)
}
Scenario