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;
017
018 public class SqlMetaData implements Comparable<SqlMetaData> {
019
020 // The number of individual sql statements
021 long count;
022
023 // The collective size of the individual sql statements
024 long size;
025
026 public SqlMetaData() {
027 this(0, 0);
028 }
029
030 public SqlMetaData(long count, long size) {
031 super();
032 this.count = count;
033 this.size = size;
034 }
035
036 @Override
037 public int compareTo(SqlMetaData other) {
038 Long size1 = this.size;
039 Long size2 = other.getSize();
040 return size1.compareTo(size2);
041 }
042
043 public long getCount() {
044 return count;
045 }
046
047 public void setCount(long count) {
048 this.count = count;
049 }
050
051 public long getSize() {
052 return size;
053 }
054
055 public void setSize(long size) {
056 this.size = size;
057 }
058
059 }