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 BundleJobInfo {
023        private int start;
024        private int len;
025        private int total;
026        private List<BundleJobBean> jobs;
027    
028        /**
029         * Create a bundle info bean.
030         *
031         * @param bundle jobs being returned.
032         * @param start bundle jobs offset.
033         * @param len number of bundle jobs.
034         * @param total total bundle jobs.
035         */
036        public BundleJobInfo(List<BundleJobBean> 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 bundle jobs being returned.
045         *
046         * @return the bundle jobs being returned.
047         */
048        public List<BundleJobBean> getBundleJobs() {
049            return jobs;
050        }
051    
052        /**
053         * Return the offset of the bundles being returned.
054         * <p/>
055         * For pagination purposes.
056         *
057         * @return the offset of the bundle jobs being returned.
058         */
059        public int getStart() {
060            return start;
061        }
062    
063        /**
064         * Return the number of the bundle being returned.
065         * <p/>
066         * For pagination purposes.
067         *
068         * @return the number of the bundle jobs being returned.
069         */
070        public int getLen() {
071            return len;
072        }
073    
074        /**
075         * Return the total number of bundles.
076         * <p/>
077         * For pagination purposes.
078         *
079         * @return the total number of bundle jobs.
080         */
081        public int getTotal() {
082            return total;
083        }
084    
085    }