Skip to content

Commit

Permalink
Use the constant value from the class for 100000000000 value
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-ronge committed Aug 29, 2024
1 parent d19a4a3 commit 968a976
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.apache.commons.lang3.tuple.Pair;
import org.kitodo.data.database.beans.BaseBean;
import org.kitodo.data.database.beans.Role;
import org.kitodo.production.enums.ProcessState;
import org.primefaces.model.SortOrder;

public class BeanQuery {
Expand Down Expand Up @@ -179,9 +180,13 @@ public void restrictToClient(int sessionClientId) {
parameters.put("sessionClientId", sessionClientId);
}

/**
* Requires that the search only finds processes that are not yet completed.
*/
public void restrictToNotCompletedProcesses() {
restrictions.add('(' + varName + ".sortHelperStatus IS NULL OR " + varName
+ ".sortHelperStatus != '100000000000')");
+ ".sortHelperStatus != :completedState)");
parameters.put("completedState", ProcessState.COMPLETED.getValue());
}

/**
Expand Down

0 comments on commit 968a976

Please sign in to comment.