001    /**
002     * Licensed to the Apache Software Foundation (ASF) under one
003     * or more contributor license agreements.  See the NOTICE file
004     * distributed with this work for additional information
005     * regarding copyright ownership.  The ASF licenses this file
006     * to you under the Apache License, Version 2.0 (the
007     * "License"); you may not use this file except in compliance
008     * with the License.  You may obtain a copy of the License at
009     * 
010     *      http://www.apache.org/licenses/LICENSE-2.0
011     * 
012     * Unless required by applicable law or agreed to in writing, software
013     * distributed under the License is distributed on an "AS IS" BASIS,
014     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015     * See the License for the specific language governing permissions and
016     * limitations under the License.
017     */
018    package org.apache.oozie;
019    
020    import java.util.List;
021    
022    /**
023     * Bean that contains the result for a workflows query.
024     */
025    public class WorkflowsInfo {
026        private int start;
027        private int len;
028        private int total;
029        private List<WorkflowJobBean> workflows;
030    
031        /**
032         * Create  a workflows info bean.
033         *
034         * @param workflows workflows being returned.
035         * @param start workflows offset.
036         * @param len number of workflows.
037         * @param total total workflows.
038         */
039        public WorkflowsInfo(List<WorkflowJobBean> workflows, int start, int len, int total) {
040            this.start = start;
041            this.len = len;
042            this.total = total;
043            this.workflows = workflows;
044        }
045    
046        /**
047         * Return the workflows being returned.
048         *
049         * @return the workflows being returned.
050         */
051        public List<WorkflowJobBean> getWorkflows() {
052            return workflows;
053        }
054    
055        /**
056         * Return the offset of the workflows being returned. <p/> For pagination purposes.
057         *
058         * @return the offset of the workflows being returned.
059         */
060        public int getStart() {
061            return start;
062        }
063    
064        /**
065         * Return the number of the workflows being returned. <p/> For pagination purposes.
066         *
067         * @return the number of the workflows being returned.
068         */
069        public int getLen() {
070            return len;
071        }
072    
073        /**
074         * Return the total number of workflows. <p/> For pagination purposes.
075         *
076         * @return the total number of workflows.
077         */
078        public int getTotal() {
079            return total;
080        }
081    
082    }