KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > continuent > sequoia > driver > DriverGeneratedKeysResult


1 /**
2  * Sequoia: Database clustering technology.
3  * Copyright (C) 2005 Continuent, Inc.
4  * Contact: sequoia@continuent.org
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * Initial developer(s): Emmanuel Cecchet.
19  * Contributor(s): ______________________.
20  */

21
22 package org.continuent.sequoia.driver;
23
24 import java.sql.SQLWarning JavaDoc;
25
26 /**
27  * This class stores the result of a call to Statement.executeUpdate(sql,
28  * Statement.RETURN_GENERATED_KEYS);
29  *
30  * @author <a HREF="mailto:emmanuel.cecchet@continuent.com">Emmanuel Cecchet</a>
31  * @version 1.0
32  */

33 public class DriverGeneratedKeysResult
34 {
35   private int updateCount = 0;
36   private DriverResultSet drs;
37   private SQLWarning JavaDoc statementWarnings;
38
39   /**
40    * Creates a new <code>DriverGeneratedKeysResult</code> object
41    *
42    * @param drs the ControllerResultSet containing the autogenerated keys
43    * @param updateCount the update count returned by the executeUpdate exection
44    * @param sqlw SQL Warnings
45    */

46   public DriverGeneratedKeysResult(DriverResultSet drs, int updateCount,
47       SQLWarning JavaDoc sqlw)
48   {
49     this.drs = drs;
50     this.updateCount = updateCount;
51     this.statementWarnings = sqlw;
52   }
53
54   /**
55    * Returns the DriverResultSet value.
56    *
57    * @return Returns the drs.
58    */

59   public final DriverResultSet getDriverResultSet()
60   {
61     return drs;
62   }
63
64   /**
65    * Returns the updateCount value.
66    *
67    * @return Returns the updateCount.
68    */

69   public final int getUpdateCount()
70   {
71     return updateCount;
72   }
73
74   /**
75    * Returns the warnings value.
76    *
77    * @return the updateCount warning chain.
78    */

79   public SQLWarning JavaDoc getWarnings()
80   {
81     return statementWarnings;
82   }
83
84 }
85
Popular Tags