View Javadoc

1   package net.sf.gaeappmanager.google.appengine;
2   
3   import java.util.ArrayList;
4   import java.util.List;
5   
6   /**
7    * Quota details of application.
8    * 
9    * @author Alois Belaska
10   */
11  public class QuotaDetails {
12  
13  	private int resetIntervalHours = -1;
14  	
15  	private int nextResetWithinHours = -1;
16  	
17  	private List<QuotaValue> values = new ArrayList<QuotaValue>();
18  	
19  	public int getResetIntervalHours() {
20  		return resetIntervalHours;
21  	}
22  	
23  	public void setResetIntervalHours(int resetIntervalHours) {
24  		this.resetIntervalHours = resetIntervalHours;
25  	}
26  	
27  	public int getNextResetWithinHours() {
28  		return nextResetWithinHours;
29  	}
30  	
31  	public void setNextResetWithinHours(int nextResetWithinHours) {
32  		this.nextResetWithinHours = nextResetWithinHours;
33  	}
34  	
35  	public List<QuotaValue> getValues() {
36  		return values;
37  	}
38  	
39  	public QuotaValue findQuota(Quota findQuota) {
40  		for (QuotaValue qValue : values) {
41  			if (qValue.getQuota().equals(findQuota)) {
42  				return qValue;
43  			}
44  		}
45  		return null;
46  	}
47  }