KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ziclix > python > sql > procedure > SQLServerProcedure


1 /*
2  * Jython Database Specification API 2.0
3  *
4  * $Id: SQLServerProcedure.java,v 1.2 2005/02/23 04:26:20 bzimmer Exp $
5  *
6  * Copyright (c) 2002 brian zimmer <mailto:bzimmer@ziclix.com>
7  *
8  */

9 package com.ziclix.python.sql.procedure;
10
11 import com.ziclix.python.sql.Procedure;
12 import com.ziclix.python.sql.PyCursor;
13 import org.python.core.Py;
14 import org.python.core.PyObject;
15
16 import java.sql.SQLException JavaDoc;
17
18 /**
19  * Stored procedure support for SQLServer.
20  *
21  * @author brian zimmer
22  * @author last revised by $Author: bzimmer $
23  * @version $Revision: 1.2 $
24  */

25 public class SQLServerProcedure extends Procedure {
26
27     public SQLServerProcedure(PyCursor cursor, PyObject name) throws SQLException JavaDoc {
28         super(cursor, name);
29     }
30
31     protected PyObject getDefault() {
32         return Py.None;
33     }
34
35     protected String JavaDoc getProcedureName() {
36
37         StringBuffer JavaDoc proc = new StringBuffer JavaDoc();
38
39         if (this.procedureSchema.__nonzero__()) {
40             proc.append(this.procedureSchema.toString()).append(".");
41         }
42
43         return proc.append(this.procedureName.toString()).toString();
44     }
45 }
46
Popular Tags