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