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