|
1 | 1 | /* |
| 2 | + * Elemental |
| 3 | + * Copyright (C) 2024, Evolved Binary Ltd |
| 4 | + * |
| 5 | + * admin@evolvedbinary.com |
| 6 | + * https://www.evolvedbinary.com | https://www.elemental.xyz |
| 7 | + * |
| 8 | + * This library is free software; you can redistribute it and/or |
| 9 | + * modify it under the terms of the GNU Lesser General Public |
| 10 | + * License as published by the Free Software Foundation; version 2.1. |
| 11 | + * |
| 12 | + * This library is distributed in the hope that it will be useful, |
| 13 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | + * Lesser General Public License for more details. |
| 16 | + * |
| 17 | + * You should have received a copy of the GNU Lesser General Public |
| 18 | + * License along with this library; if not, write to the Free Software |
| 19 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 | + * |
| 21 | + * NOTE: Parts of this file contain code from 'The eXist-db Authors'. |
| 22 | + * The original license header is included below. |
| 23 | + * |
| 24 | + * ===================================================================== |
| 25 | + * |
2 | 26 | * eXist-db Open Source Native XML Database |
3 | 27 | * Copyright (C) 2001 The eXist-db Authors |
4 | 28 | * |
|
65 | 89 | import org.w3c.dom.NodeList; |
66 | 90 |
|
67 | 91 | /** |
68 | | - * eXist Oracle Module Extension ExecuteFunction |
| 92 | + * eXist-db Oracle Module Extension ExecuteFunction |
69 | 93 | * |
70 | 94 | * Execute a PL/SQL stored procedure within an Oracle RDBMS. |
71 | 95 | * |
72 | 96 | * @author <a href="mailto:robert.walpole@metoffice.gov.uk">Robert Walpole</a> |
73 | 97 | * @serial 2009-03-23 |
74 | 98 | * @version 1.0 |
75 | | - * |
76 | | - * @see org.exist.xquery.BasicFunction#BasicFunction(org.exist.xquery.XQueryContext, |
77 | | - * org.exist.xquery.FunctionSignature) |
78 | 99 | */ |
79 | 100 | public class ExecuteFunction extends BasicFunction { |
80 | 101 |
|
@@ -124,17 +145,17 @@ public class ExecuteFunction extends BasicFunction { |
124 | 145 | private final static String TYPE_ATTRIBUTE_NAME = "type"; |
125 | 146 | private final static String POSITION_ATTRIBUTE_NAME = "pos"; |
126 | 147 |
|
127 | | - private DateFormat xmlDf; |
| 148 | + private final DateFormat xmlDf; |
128 | 149 |
|
129 | 150 | /** |
130 | 151 | * ExecuteFunction Constructor |
131 | 152 | * |
132 | | - * @param context |
133 | | - * The Context of the calling XQuery |
| 153 | + * @param context The Context of the calling XQuery. |
| 154 | + * @param signature The signature of the function |
134 | 155 | */ |
135 | | - public ExecuteFunction( XQueryContext context, FunctionSignature signature ) { |
136 | | - super( context, signature ); |
137 | | - xmlDf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS"); |
| 156 | + public ExecuteFunction(final XQueryContext context, final FunctionSignature signature) { |
| 157 | + super(context, signature); |
| 158 | + this.xmlDf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS"); |
138 | 159 | } |
139 | 160 |
|
140 | 161 | @Override |
@@ -372,12 +393,13 @@ public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathExce |
372 | 393 | } |
373 | 394 |
|
374 | 395 | /** |
375 | | - * Release DB resources |
376 | | - * @param connection |
377 | | - * @param statement |
378 | | - * @param rs |
| 396 | + * Release DB resources. |
| 397 | + * |
| 398 | + * @param connection the database connection. |
| 399 | + * @param statement the query statement. |
| 400 | + * @param rs the query results. |
379 | 401 | */ |
380 | | - protected void release(Connection connection, Statement statement, ResultSet rs) { |
| 402 | + protected void release(final Connection connection, final Statement statement, final ResultSet rs) { |
381 | 403 | if (rs != null) { |
382 | 404 | try { |
383 | 405 | rs.close(); |
|
0 commit comments