OSDN Git Service

Upgrade to 4.2.0
[stew/Stew4.git] / src / net / argius / stew / ResultSetReference.java
1 package net.argius.stew;
2
3 import java.sql.*;
4
5 /**
6  * This object holds the reference of ResultSet.
7  */
8 public final class ResultSetReference {
9
10     private final ResultSet rs;
11     private final ColumnOrder order;
12     private final String commandString;
13
14     private int recordCount;
15
16     /**
17      * A constructor.
18      * @param rs ResultSet
19      * @param commandString
20      */
21     public ResultSetReference(ResultSet rs, String commandString) {
22         this.rs = rs;
23         this.order = new ColumnOrder();
24         this.commandString = commandString;
25     }
26
27     /**
28      * Returns the ResultSet.
29      * @return
30      */
31     public ResultSet getResultSet() {
32         return rs;
33     }
34
35     /**
36      * Returns the ColumnOrder.
37      * @return
38      */
39     public ColumnOrder getOrder() {
40         return order;
41     }
42
43     /**
44      * Returns the command string.
45      * @return
46      */
47     public String getCommandString() {
48         return commandString;
49     }
50
51     /**
52      * Returns the count of records.
53      * @return
54      */
55     public int getRecordCount() {
56         return recordCount;
57     }
58
59     /**
60      * Sets the count of records.
61      * @param recordCount
62      */
63     public void setRecordCount(int recordCount) {
64         this.recordCount = recordCount;
65     }
66
67 }