001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.workflow.comparator;
016    
017    import com.liferay.portal.kernel.messaging.proxy.MessagingProxy;
018    import com.liferay.portal.kernel.messaging.proxy.ProxyMode;
019    import com.liferay.portal.kernel.util.OrderByComparator;
020    import com.liferay.portal.kernel.workflow.WorkflowDefinition;
021    import com.liferay.portal.kernel.workflow.WorkflowInstance;
022    import com.liferay.portal.kernel.workflow.WorkflowLog;
023    import com.liferay.portal.kernel.workflow.WorkflowTask;
024    
025    /**
026     * @author Michael C. Han
027     */
028    @MessagingProxy(mode = ProxyMode.SYNC)
029    public interface WorkflowComparatorFactory {
030    
031            public OrderByComparator<WorkflowDefinition> getDefinitionNameComparator(
032                    boolean ascending);
033    
034            public OrderByComparator<WorkflowInstance> getInstanceCompletedComparator(
035                    boolean ascending);
036    
037            public OrderByComparator<WorkflowInstance> getInstanceEndDateComparator(
038                    boolean ascending);
039    
040            public OrderByComparator<WorkflowInstance> getInstanceStartDateComparator(
041                    boolean ascending);
042    
043            public OrderByComparator<WorkflowInstance> getInstanceStateComparator(
044                    boolean ascending);
045    
046            public OrderByComparator<WorkflowLog> getLogCreateDateComparator(
047                    boolean ascending);
048    
049            public OrderByComparator<WorkflowLog> getLogUserIdComparator(
050                    boolean ascending);
051    
052            public OrderByComparator<WorkflowTask> getTaskCompletionDateComparator(
053                    boolean ascending);
054    
055            public OrderByComparator<WorkflowTask> getTaskCreateDateComparator(
056                    boolean ascending);
057    
058            public OrderByComparator<WorkflowTask> getTaskDueDateComparator(
059                    boolean ascending);
060    
061            public OrderByComparator<WorkflowTask> getTaskNameComparator(
062                    boolean ascending);
063    
064            public OrderByComparator<WorkflowTask> getTaskUserIdComparator(
065                    boolean ascending);
066    
067    }