| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Jython Database Specification API 2.0 | 2 * Jython Database Specification API 2.0 |
| 3 * | 3 * |
| 4 * $Id$ | 4 * $Id$ |
| 5 * | 5 * |
| 6 * Copyright (c) 2001 brian zimmer <bzimmer@ziclix.com> | 6 * Copyright (c) 2001 brian zimmer <bzimmer@ziclix.com> |
| 7 * | 7 * |
| 8 */ | 8 */ |
| 9 package com.ziclix.python.sql; | 9 package com.ziclix.python.sql; |
| 10 | 10 |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 public String toString() { | 154 public String toString() { |
| 155 return __repr__().toString(); | 155 return __repr__().toString(); |
| 156 } | 156 } |
| 157 | 157 |
| 158 /** | 158 /** |
| 159 * Gets the value of the attribute name. | 159 * Gets the value of the attribute name. |
| 160 * | 160 * |
| 161 * @param name | 161 * @param name |
| 162 * @return the attribute for the given name | 162 * @return the attribute for the given name |
| 163 */ | 163 */ |
| 164 public PyObject __findattr__(String name) { | 164 public PyObject __findattr_ex__(String name) { |
| 165 | 165 |
| 166 if ("style".equals(name)) { | 166 if ("style".equals(name)) { |
| 167 return Py.newInteger(style); | 167 return Py.newInteger(style); |
| 168 } else if ("closed".equals(name)) { | 168 } else if ("closed".equals(name)) { |
| 169 return Py.newBoolean(closed); | 169 return Py.newBoolean(closed); |
| 170 } else if ("__statement__".equals(name)) { | 170 } else if ("__statement__".equals(name)) { |
| 171 return Py.java2py(statement); | 171 return Py.java2py(statement); |
| 172 } else if ("__methods__".equals(name)) { | 172 } else if ("__methods__".equals(name)) { |
| 173 return __methods__; | 173 return __methods__; |
| 174 } else if ("__members__".equals(name)) { | 174 } else if ("__members__".equals(name)) { |
| 175 return __members__; | 175 return __members__; |
| 176 } | 176 } |
| 177 | 177 |
| 178 return super.__findattr__(name); | 178 return super.__findattr_ex__(name); |
| 179 } | 179 } |
| 180 | 180 |
| 181 /** | 181 /** |
| 182 * Initializes the object's namespace. | 182 * Initializes the object's namespace. |
| 183 * | 183 * |
| 184 * @param dict | 184 * @param dict |
| 185 */ | 185 */ |
| 186 static public void classDictInit(PyObject dict) { | 186 static public void classDictInit(PyObject dict) { |
| 187 | 187 |
| 188 dict.__setitem__("__version__", Py.newString("$Revision$").__getslice__(
Py.newInteger(11), Py.newInteger(-2), null)); | 188 dict.__setitem__("__version__", Py.newString("$Revision$").__getslice__(
Py.newInteger(11), Py.newInteger(-2), null)); |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 | 324 |
| 325 try { | 325 try { |
| 326 this.statement.close(); | 326 this.statement.close(); |
| 327 } catch (SQLException e) { | 327 } catch (SQLException e) { |
| 328 throw zxJDBC.makeException(e); | 328 throw zxJDBC.makeException(e); |
| 329 } finally { | 329 } finally { |
| 330 this.closed = true; | 330 this.closed = true; |
| 331 } | 331 } |
| 332 } | 332 } |
| 333 } | 333 } |
| OLD | NEW |