View Javadoc

1   /**
2    * Copyright 2011 The Kuali Foundation Licensed under the
3    * Educational Community License, Version 2.0 (the "License"); you may
4    * not use this file except in compliance with the License. You may
5    * obtain a copy of the License at
6    *
7    * http://www.osedu.org/licenses/ECL-2.0
8    *
9    * Unless required by applicable law or agreed to in writing,
10   * software distributed under the License is distributed on an "AS IS"
11   * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12   * or implied. See the License for the specific language governing
13   * permissions and limitations under the License.
14   */
15  
16  package org.kuali.common.impex.data;
17  
18  import org.kuali.common.impex.model.Table;
19  import org.kuali.common.util.Weighted;
20  
21  public class ExportTableContext implements Comparable<ExportTableContext>, Weighted {
22  
23      Table table;
24  
25      long rowCount;
26  
27      long size;
28  
29      public ExportTableContext(Table t) {
30          table = t;
31      }
32  
33      @Override
34      public double getWeight() {
35          return rowCount;
36      }
37  
38      @Override
39      public int compareTo(ExportTableContext other) {
40          Long one = rowCount;
41          Long two = other.getRowCount();
42          return one.compareTo(two);
43      }
44  
45      public long getRowCount() {
46          return rowCount;
47      }
48  
49      public void setRowCount(long rowCount) {
50          this.rowCount = rowCount;
51      }
52  
53      public long getSize() {
54          return size;
55      }
56  
57      public void setSize(long size) {
58          this.size = size;
59      }
60  
61      public Table getTable() {
62          return table;
63      }
64  
65      public void setTable(Table table) {
66          this.table = table;
67      }
68  }