001 /**
002 * Copyright 2010-2013 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.kuali.common.jdbc.threads;
017
018 import java.util.ArrayList;
019 import java.util.List;
020
021 import org.kuali.common.jdbc.SqlSource;
022
023 public class SqlBucket implements Comparable<SqlBucket> {
024
025 long count;
026 long size;
027 List<SqlSource> sources = new ArrayList<SqlSource>();
028
029 @Override
030 public int compareTo(SqlBucket other) {
031 Long size1 = this.size;
032 Long size2 = other.getSize();
033 return size1.compareTo(size2);
034 }
035
036 public long getCount() {
037 return count;
038 }
039
040 public void setCount(long count) {
041 this.count = count;
042 }
043
044 public long getSize() {
045 return size;
046 }
047
048 public void setSize(long size) {
049 this.size = size;
050 }
051
052 public List<SqlSource> getSources() {
053 return sources;
054 }
055
056 public void setSources(List<SqlSource> sources) {
057 this.sources = sources;
058 }
059
060 }