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