View Javadoc

1   /**
2    * Copyright 2010-2013 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.common.jdbc.threads;
17  
18  import java.util.ArrayList;
19  import java.util.List;
20  
21  import org.kuali.common.jdbc.SqlSource;
22  
23  public class SqlBucket implements Comparable<SqlBucket> {
24  
25  	long count;
26  	long size;
27  	List<SqlSource> sources = new ArrayList<SqlSource>();
28  
29  	@Override
30  	public int compareTo(SqlBucket other) {
31  		Long size1 = this.size;
32  		Long size2 = other.getSize();
33  		return size1.compareTo(size2);
34  	}
35  
36  	public long getCount() {
37  		return count;
38  	}
39  
40  	public void setCount(long count) {
41  		this.count = count;
42  	}
43  
44  	public long getSize() {
45  		return size;
46  	}
47  
48  	public void setSize(long size) {
49  		this.size = size;
50  	}
51  
52  	public List<SqlSource> getSources() {
53  		return sources;
54  	}
55  
56  	public void setSources(List<SqlSource> sources) {
57  		this.sources = sources;
58  	}
59  
60  }