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