01: /**
02: * Sequoia: Database clustering technology.
03: * Copyright (C) 2006 Continuent, Inc.
04: * Contact: sequoia@continuent.org
05: *
06: * Licensed under the Apache License, Version 2.0 (the "License");
07: * you may not use this file except in compliance with the License.
08: * You may obtain a copy of the License at
09: *
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: */package org.continuent.sequoia.controller.requests;
21:
22: import java.io.Serializable;
23:
24: /**
25: * This class defines a StoredProcedureCallResult to store the result of a
26: * stored procedure call including information about the OUT and named
27: * parameters.
28: *
29: * @author <a href="mailto:emmanuel.cecchet@continuent.com">Emmanuel Cecchet</a>
30: * @version 1.0
31: */
32: public class StoredProcedureCallResult implements Serializable {
33: private static final long serialVersionUID = -9116817669101507041L;
34:
35: private Object result;
36: private StoredProcedure proc;
37:
38: /**
39: * Creates a new <code>StoredProcedureCallResult</code> object
40: *
41: * @param proc the stored procedure call (including out and named parameters
42: * information)
43: * @param result the result of the call
44: */
45: public StoredProcedureCallResult(StoredProcedure proc, Object result) {
46: this .proc = proc;
47: this .result = result;
48: }
49:
50: /**
51: * Returns the result value.
52: *
53: * @return Returns the result.
54: */
55: public final Object getResult() {
56: return result;
57: }
58:
59: /**
60: * Returns the stored procedure object containing the parameters information
61: *
62: * @return a stored procedure object
63: */
64: public StoredProcedure getStoredProcedure() {
65: return proc;
66: }
67:
68: }
|