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    public class CoordinatorJobInfo {
023        private int start;
024        private int len;
025        private int total;
026        private List<CoordinatorJobBean> jobs;
027    
028        /**
029         * Create a coordinator info bean.
030         * 
031         * @param coordiantor jobs being returned.
032         * @param start coordiantor jobs offset.
033         * @param len number of coordiantor jobs.
034         * @param total total coordiantor jobs.
035         */
036        public CoordinatorJobInfo(List<CoordinatorJobBean> jobs, int start, int len, int total) {
037            this.start = start;
038            this.len = len;
039            this.total = total;
040            this.jobs = jobs;
041        }
042    
043        /**
044         * Return the coordiantor jobs being returned.
045         *
046         * @return the coordiantor jobs being returned.
047         */
048        public List<CoordinatorJobBean> getCoordJobs() {
049            return jobs;
050        }
051    
052        /**
053         * Return the offset of the workflows being returned. <p/> For pagination purposes.
054         *
055         * @return the offset of the coordiantor jobs being returned.
056         */
057        public int getStart() {
058            return start;
059        }
060    
061        /**
062         * Return the number of the workflows being returned. <p/> For pagination purposes.
063         *
064         * @return the number of the coordiantor jobs being returned.
065         */
066        public int getLen() {
067            return len;
068        }
069    
070        /**
071         * Return the total number of workflows. <p/> For pagination purposes.
072         *
073         * @return the total number of coordiantor jobs.
074         */
075        public int getTotal() {
076            return total;
077        }
078    
079    }