holunda-io / camunda-bpm-taskpool

Library for pooling user tasks and process related business objects.
https://www.holunda.io/camunda-bpm-taskpool/
Apache License 2.0
68 stars 26 forks source link

Remove deprecated query methods from JPA projection #952

Closed zambrovski closed 7 months ago

zambrovski commented 7 months ago

Scenario


  /**
   * 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)
  }