andrea-patricelli commented on a change in pull request #213:
URL: https://github.com/apache/syncope/pull/213#discussion_r492538792
##########
File path:
core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPATaskDAO.java
##########
@@ -167,11 +141,11 @@ private String getEntityTableName(final TaskType type) {
return query.getResultList();
}
- private <T extends Task> StringBuilder buildFindAllQueryJPA(final TaskType
type) {
+ private <T extends Task> StringBuilder buildFindAllQueryJPA(final Class<T>
reference) {
StringBuilder builder = new StringBuilder("SELECT t FROM ").
- append(getEntityReference(type).getSimpleName()).
+ append(getEntityReference(reference).getSimpleName()).
append(" t WHERE ");
- if (type == TaskType.SCHEDULED) {
+ if (SchedTask.class.isAssignableFrom(reference)) {
Review comment:
Ok, going to replace with `JPASchedTask`
##########
File path:
core/logic/src/main/java/org/apache/syncope/core/logic/SyncopeLogic.java
##########
@@ -448,7 +448,7 @@ public NumbersInfo numbers() {
numbersInfo.getConfCompleteness().put(
NumbersInfo.ConfItem.NOTIFICATION.name(),
!notificationDAO.findAll().isEmpty());
numbersInfo.getConfCompleteness().put(
- NumbersInfo.ConfItem.PULL_TASK.name(),
!taskDAO.findAll(TaskType.PULL).isEmpty());
Review comment:
We cannot remove `TaskType` enum, it is necessary for search and to
build `TaskQuery` objects.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]