KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > slide > store > impl > rdbms > OldJDBCAdapter


1 /*
2  * $Header: /home/cvs/jakarta-slide/src/stores/org/apache/slide/store/impl/rdbms/OldJDBCAdapter.java,v 1.4 2004/07/28 09:34:17 ib Exp $
3  * $Revision: 1.4 $
4  * $Date: 2004/07/28 09:34:17 $
5  *
6  * ====================================================================
7  *
8  * Copyright 1999-2002 The Apache Software Foundation
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  *
22  */

23
24 package org.apache.slide.store.impl.rdbms;
25
26 import java.lang.reflect.Constructor JavaDoc;
27 import java.sql.Connection JavaDoc;
28 import java.sql.PreparedStatement JavaDoc;
29 import java.sql.ResultSet JavaDoc;
30 import java.sql.SQLException JavaDoc;
31 import java.sql.Statement JavaDoc;
32 import java.util.Date JavaDoc;
33 import java.util.Enumeration JavaDoc;
34 import java.util.Hashtable JavaDoc;
35 import java.util.Vector JavaDoc;
36
37 import org.apache.slide.common.Service;
38 import org.apache.slide.common.ServiceAccessException;
39 import org.apache.slide.common.Uri;
40 import org.apache.slide.content.NodeProperty;
41 import org.apache.slide.content.NodeRevisionContent;
42 import org.apache.slide.content.NodeRevisionDescriptor;
43 import org.apache.slide.content.NodeRevisionDescriptors;
44 import org.apache.slide.content.NodeRevisionNumber;
45 import org.apache.slide.content.RevisionAlreadyExistException;
46 import org.apache.slide.content.RevisionDescriptorNotFoundException;
47 import org.apache.slide.content.RevisionNotFoundException;
48 import org.apache.slide.lock.LockTokenNotFoundException;
49 import org.apache.slide.lock.NodeLock;
50 import org.apache.slide.security.NodePermission;
51 import org.apache.slide.structure.LinkNode;
52 import org.apache.slide.structure.ObjectAlreadyExistsException;
53 import org.apache.slide.structure.ObjectNode;
54 import org.apache.slide.structure.ObjectNotFoundException;
55 import org.apache.slide.util.logger.Logger;
56
57 /**
58 * A database adapter, which is using almost the same SQL scheme as the
59 * deprecated slidestore.reference.JDBCDescriptorsStore. This adapter this
60 * meant for backward compatibility with Slide 1.x. Don't use this adapter
61 * for new projects.
62 * <strong>The content store methods are not supported.</strong>
63 *
64 * This adapter requires a minor change of table locks. It should look like
65 * this (Postgres dialect, adapt it for your database):
66 * <pre>
67 * create table locks(id varchar(4000), object varchar(4000),
68 * subject varchar(4000), type varchar(4000),
69 * expirationdate varchar(15), inheritable int,
70 * xexclusive int, ownerinfo varchar(255));
71 * </pre>
72 *
73 * You may overide the method {@link #createException} for
74 * better error messages in case of parallel access.
75 *
76 * Oliver Zeigermann.
77 * @version $Revision: 1.4 $ $Date: 2004/07/28 09:34:17 $
78 *
79 */

80 public class OldJDBCAdapter extends AbstractRDBMSAdapter {
81
82     protected static final String JavaDoc LOG_CHANNEL =
83         StandardRDBMSAdapter.class.getName();
84     // -------------------------------------------------------------- Constants
85

86     // Column numbers
87

88     // Structure descriptors
89

90     protected static final int OBJECTS_URI = 1;
91     protected static final int OBJECTS_CLASS = 2;
92
93     protected static final int CHILDREN_URI = 1;
94     protected static final int CHILDREN_CHILDURI = 2;
95
96     protected static final int LINKS_LINK = 1;
97     protected static final int LINKS_LINKTO = 2;
98
99     // Security descriptors
100

101     protected static final int PERMISSIONS_OBJECT = 1;
102     protected static final int PERMISSIONS_REVISION_NUMBER = 2;
103     protected static final int PERMISSIONS_SUBJECT = 3;
104     protected static final int PERMISSIONS_ACTION = 4;
105     protected static final int PERMISSIONS_INHERITABLE = 5;
106     protected static final int PERMISSIONS_NEGATIVE = 6;
107
108     // Lock descriptors
109

110     protected static final int LOCKS_ID = 1;
111     protected static final int LOCKS_OBJECT = 2;
112     protected static final int LOCKS_SUBJECT = 3;
113     protected static final int LOCKS_TYPE = 4;
114     protected static final int LOCKS_EXPIRATIONDATE = 5;
115     protected static final int LOCKS_INHERITABLE = 6;
116     protected static final int LOCKS_EXCLUSIVE = 7;
117     protected static final int LOCKS_OWNER = 8;
118
119     // Content descriptors
120

121     protected static final int REVISIONS_URI = 1;
122     protected static final int REVISIONS_ISVERSIONED = 2;
123     protected static final int REVISIONS_INITIALREVISION = 3;
124
125     protected static final int WORKINGREVISION_URI = 1;
126     protected static final int WORKINGREVISION_BASEREVISION = 2;
127     protected static final int WORKINGREVISION_NUMBER = 3;
128
129     protected static final int LATESTREVISIONS_URI = 1;
130     protected static final int LATESTREVISIONS_BRANCHNAME = 2;
131     protected static final int LATESTREVISIONS_NUMBER = 3;
132
133     protected static final int BRANCHES_URI = 1;
134     protected static final int BRANCHES_NUMBER = 2;
135     protected static final int BRANCHES_CHILDNUMBER = 3;
136
137     protected static final int REVISION_URI = 1;
138     protected static final int REVISION_NUMBER = 2;
139     protected static final int REVISION_BRANCHNAME = 3;
140
141     protected static final int LABEL_URI = 1;
142     protected static final int LABEL_NUMBER = 2;
143     protected static final int LABEL_LABEL = 3;
144
145     protected static final int PROPERTY_URI = 1;
146     protected static final int PROPERTY_NUMBER = 2;
147     protected static final int PROPERTY_NAME = 3;
148     protected static final int PROPERTY_VALUE = 4;
149     protected static final int PROPERTY_NAMESPACE = 5;
150     protected static final int PROPERTY_TYPE = 6;
151     protected static final int PROPERTY_PROTECTED = 7;
152
153     public OldJDBCAdapter(Service service, Logger logger) {
154         super(service, logger);
155     }
156
157     // ----------------------------------------------- DescriptorsStore Methods
158

159     /**
160      * Retrive an object.
161      *
162      * @param uri Uri of the object we want to retrieve
163      * @exception ServiceAccessException Error accessing the Service
164      * @exception ObjectNotFoundException The object to retrieve was not found
165      */

166     public ObjectNode retrieveObject(Connection JavaDoc connection, Uri uri)
167         throws ServiceAccessException, ObjectNotFoundException {
168
169         ObjectNode result = null;
170         PreparedStatement JavaDoc statement = null;
171
172         try {
173
174             statement =
175                 connection.prepareStatement(
176                     "select * from objects where uri= ?");
177             statement.setString(1, uri.toString());
178
179             ResultSet JavaDoc res = statement.executeQuery();
180
181             // Parsing result set
182

183             String JavaDoc className;
184
185             if (res.next()) {
186                 // Retrieving and loading the object
187
className = res.getString(OBJECTS_CLASS);
188             } else {
189                 // Object was not found ...
190
throw new ObjectNotFoundException(uri);
191             }
192
193             closeStatement(statement);
194
195             // Then, retrieve the children
196
statement =
197                 connection.prepareStatement(
198                     "select * from children where uri= ?");
199             statement.setString(1, uri.toString());
200             res = statement.executeQuery();
201
202             Vector JavaDoc childrenVector = new Vector JavaDoc();
203
204             // Parse result set
205
while (res.next()) {
206                 // Load each permission
207
childrenVector.addElement(res.getString(CHILDREN_CHILDURI));
208             }
209             closeStatement(statement);
210
211             statement =
212                 connection.prepareStatement(
213                     "select * from links where linkto= ?");
214             statement.setString(1, uri.toString());
215             res = statement.executeQuery();
216
217             Vector JavaDoc linksVector = new Vector JavaDoc();
218
219             // Parse result set
220
while (res.next()) {
221                 // Load each permission
222
linksVector.addElement(res.getString(LINKS_LINKTO));
223             }
224
225             closeStatement(statement);
226
227             if (className.equals("org.apache.slide.structure.LinkNode")) {
228
229                 String JavaDoc linkTo = new String JavaDoc();
230                 statement =
231                     connection.prepareStatement(
232                         "select * from links where link= ?");
233                 statement.setString(1, uri.toString());
234                 res = statement.executeQuery();
235
236                 if (res.next())
237                     linkTo = res.getString(LINKS_LINKTO);
238
239                 closeStatement(statement);
240
241                 result =
242                     new LinkNode(
243                         uri.toString(),
244                         childrenVector,
245                         linksVector,
246                         linkTo);
247
248             } else {
249
250                 try {
251                     Class JavaDoc objclass = Class.forName(className);
252
253                     Class JavaDoc[] argClasses =
254                         {
255                             Class.forName("java.lang.String"),
256                             Class.forName("java.util.Vector"),
257                             Class.forName("java.util.Vector")};
258                     Object JavaDoc[] arguments =
259                         { uri.toString(), childrenVector, linksVector };
260
261                     Constructor JavaDoc constructor =
262                         objclass.getConstructor(argClasses);
263                     result = (ObjectNode) constructor.newInstance(arguments);
264                 } catch (Exception JavaDoc e) {
265                     // ClassNotFoundException, NoSuchMethodException, etc.
266
throw createException(e, uri);
267                 }
268
269             }
270
271         } catch (SQLException JavaDoc e) {
272             throw createException(e, uri);
273         } finally {
274             closeStatement(statement);
275         }
276         return result;
277     }
278
279     /**
280      * Update an object.
281      *
282      * @param object Object to update
283      * @exception ServiceAccessException Error accessing the Service
284      * @exception ObjectNotFoundException The object to update was not found
285      */

286     public void storeObject(Connection JavaDoc connection, Uri uri, ObjectNode object)
287         throws ServiceAccessException, ObjectNotFoundException {
288
289         PreparedStatement JavaDoc statement = null;
290
291         try {
292             statement =
293                 connection.prepareStatement(
294                     "select * from objects where uri= ?");
295             statement.setString(1, uri.toString());
296
297             ResultSet JavaDoc res = statement.executeQuery();
298
299             // Parsing result set
300

301             if (!res.next()) {
302                 throw new ObjectNotFoundException(uri);
303             }
304
305             closeStatement(statement);
306
307             // Updating children
308
statement =
309                 connection.prepareStatement(
310                     "delete from children where uri= ?");
311             statement.setString(1, object.getUri());
312             statement.execute();
313             closeStatement(statement);
314
315             statement = null;
316             Enumeration JavaDoc children = object.enumerateChildren();
317             while (children.hasMoreElements()) {
318                 if (statement == null) {
319                     statement =
320                         connection.prepareStatement(
321                             "insert into children values(?, ?)");
322                 }
323                 statement.setString(1, object.getUri());
324                 statement.setString(2, (String JavaDoc) children.nextElement());
325                 statement.execute();
326             }
327             closeStatement(statement);
328
329             // Updating inbound links
330
/*
331             s = "delete from links where linkto='" + object.getUri() + "'";
332             statement.execute(s);
333             Enumeration links = object.enumerateLinks();
334             while (children.hasMoreElements()) {
335                 s = "insert into links values('"
336                     + (String) links.nextElement() + "', '"
337                     + object.getUri() + "')";
338                 statement.execute(s);
339             }
340             */

341
342             // Updating links
343
statement =
344                 connection.prepareStatement("delete from links where link= ?");
345             statement.setString(1, object.getUri());
346             statement.execute();
347             closeStatement(statement);
348
349             if (object instanceof LinkNode) {
350                 statement =
351                     connection.prepareStatement(
352                         "insert into links values(?,?)");
353                 statement.setString(1, object.getUri());
354                 statement.setString(2, ((LinkNode) object).getLinkedUri());
355                 statement.execute();
356                 closeStatement(statement);
357             }
358
359         } catch (SQLException JavaDoc e) {
360             throw createException(e, uri);
361         } finally {
362             closeStatement(statement);
363         }
364
365     }
366
367     /**
368       * Create a new object.
369       *
370       * @param object ObjectNode
371        * @param uri Uri of the object we want to create
372        * @exception ServiceAccessException Error accessing the Service
373        * @exception ObjectAlreadyExistsException An object already exists
374        * at this Uri
375        */

376     public void createObject(Connection JavaDoc connection, Uri uri, ObjectNode object)
377         throws ServiceAccessException, ObjectAlreadyExistsException {
378
379         PreparedStatement JavaDoc statement = null;
380         try {
381
382             String JavaDoc className = object.getClass().getName();
383             statement =
384                 connection.prepareStatement(
385                     "select * from objects where uri= ?");
386             statement.setString(1, uri.toString());
387             ResultSet JavaDoc res = statement.executeQuery();
388             // Parsing result set
389
if (res.next()) {
390                 throw new ObjectAlreadyExistsException(uri.toString());
391             }
392
393             closeStatement(statement);
394             statement =
395                 connection.prepareStatement("insert into objects values(?,?)");
396             statement.setString(1, uri.toString());
397             statement.setString(2, className);
398             statement.execute();
399             closeStatement(statement);
400             statement = null;
401             // Inserting children
402
Enumeration JavaDoc children = object.enumerateChildren();
403             while (children.hasMoreElements()) {
404                 if (statement == null) {
405                     statement =
406                         connection.prepareStatement(
407                             "insert into children values(?,?)");
408                 }
409                 statement.setString(1, uri.toString());
410                 statement.setString(2, (String JavaDoc) children.nextElement());
411                 statement.execute();
412             }
413             closeStatement(statement);
414             // Updating inbound links
415
/*
416             Enumeration links = object.enumerateLinks();
417             while (children.hasMoreElements()) {
418                 s = "insert into links values('"
419                     + (String) links.nextElement() + "', '"
420                     + object.getUri() + "')";
421                 statement.execute(s);
422             }
423             */
// If the object is a link, also store the link information
424
if (object instanceof LinkNode) {
425                 statement =
426                     connection.prepareStatement(
427                         "insert into links values(?,?)");
428                 statement.setString(1, uri.toString());
429                 statement.setString(2, ((LinkNode) object).getLinkedUri());
430                 statement.execute();
431                 closeStatement(statement);
432             }
433
434         } catch (SQLException JavaDoc e) {
435             throw createException(e, uri);
436         } finally {
437             closeStatement(statement);
438         }
439
440     }
441
442     /**
443       * Remove an object.
444       *
445       * @param object Object to remove
446       * @exception ServiceAccessException Error accessing the Service
447       * @exception ObjectNotFoundException The object to remove was not found
448       */

449     public void removeObject(Connection JavaDoc connection, Uri uri, ObjectNode object)
450         throws ServiceAccessException, ObjectNotFoundException {
451
452         PreparedStatement JavaDoc statement = null;
453
454         try {
455
456             // Removing object
457
statement =
458                 connection.prepareStatement("delete from objects where uri= ?");
459             statement.setString(1, object.getUri());
460             statement.execute();
461             closeStatement(statement);
462
463             // Removing children
464
statement =
465                 connection.prepareStatement("delete from children where uri=?");
466             statement.setString(1, object.getUri());
467             statement.execute();
468             closeStatement(statement);
469
470             // Removing inbound links
471
/*
472             s = "delete from links where linkto='" + object.getUri() + "'";
473             statement.execute(s);
474             */

475
476             // Removing links
477
statement =
478                 connection.prepareStatement("delete from links where link= ?");
479             statement.setString(1, object.getUri());
480             statement.execute();
481             closeStatement(statement);
482
483         } catch (SQLException JavaDoc e) {
484             throw createException(e, uri);
485         }
486     }
487     
488     /**
489      * Grant a new permission.
490      *
491      * @param permission Permission we want to create
492      * @exception ServiceAccessException Error accessing the Service
493      */

494     public void grantPermission(Connection JavaDoc connection, Uri uri, NodePermission permission)
495         throws ServiceAccessException {
496         
497         PreparedStatement JavaDoc statement = null;
498         
499         try {
500             int inheritable = 0;
501             if (permission.isInheritable()) {
502                 inheritable = 1;
503             }
504             
505             int negative = 0;
506             if (permission.isNegative()) {
507                 negative = 1;
508             }
509             
510             NodeRevisionNumber revisionNumber = permission.getRevisionNumber();
511             String JavaDoc revisionNumberStr =
512                 (revisionNumber == null) ? null : revisionNumber.toString();
513             
514             statement = connection.prepareStatement
515                 ("insert into permissions values(?,?,?,?,?,?)");
516             statement.setString(1, permission.getObjectUri());
517             statement.setString(2, revisionNumberStr);
518             statement.setString(3, permission.getSubjectUri());
519             statement.setString(4, permission.getActionUri());
520             statement.setInt(5, inheritable);
521             statement.setInt(6, negative);
522             statement.execute();
523         } catch (SQLException JavaDoc e) {
524             throw createException(e,uri);
525         } finally {
526             closeStatement(statement);
527         }
528         
529     }
530     
531     
532     /**
533      * Revoke a permission.
534      *
535      * @param permission Permission we want to create
536      * @exception ServiceAccessException Error accessing the Service
537      */

538     public void revokePermission(Connection JavaDoc connection,Uri uri, NodePermission permission)
539         throws ServiceAccessException {
540         
541         /* Warning changes to this method should also be done to CloudscapeDescriptorsStore */
542         
543         PreparedStatement JavaDoc statement = null;
544         
545         try {
546             NodeRevisionNumber revisionNumber = permission.getRevisionNumber();
547             if(revisionNumber != null) {
548                 statement = connection.prepareStatement
549                     ("delete from permissions where object= ? and subject = ? and action = ? and revisionnumber = ? ");
550                 statement.setString(4, revisionNumber.toString());
551             }
552             else {
553                 statement = connection.prepareStatement
554                     ("delete from permissions where object = ? and subject = ? and action = ? and revisionnumber is NULL");
555             }
556
557             statement.setString(1, permission.getObjectUri());
558             statement.setString(2, permission.getSubjectUri());
559             statement.setString(3, permission.getActionUri());
560         
561             statement.execute();
562         } catch (SQLException JavaDoc e) {
563             throw createException(e,uri);
564         } finally {
565             closeStatement(statement);
566         }
567         
568     }
569     
570     
571     /**
572      * Revoke all the permissions on an object.
573      *
574      * @param permission Permission we want to create
575      * @exception ServiceAccessException Error accessing the Service
576      */

577     public void revokePermissions(Connection JavaDoc connection,Uri uri)
578         throws ServiceAccessException {
579         
580         PreparedStatement JavaDoc statement = null;
581         
582         try {
583             
584             statement = connection.prepareStatement
585                 ("delete from permissions where object= ?");
586             statement.setString(1, uri.toString());
587             statement.execute();
588         } catch (SQLException JavaDoc e) {
589             throw createException(e,uri);
590         } finally {
591             closeStatement(statement);
592         }
593         
594     }
595     
596     
597     /**
598      * Enumerate permissions on an object.
599      *
600      * @param permission Permission we want to create
601      * @exception ServiceAccessException Error accessing the Service
602      */

603     public Enumeration JavaDoc enumeratePermissions(Connection JavaDoc connection,Uri uri)
604         throws ServiceAccessException {
605         
606         Vector JavaDoc permissionVector = new Vector JavaDoc();
607         PreparedStatement JavaDoc statement = null;
608         
609         try {
610             statement = connection.prepareStatement
611                 ("select * from permissions where object= ?");
612             statement.setString(1, uri.toString());
613             ResultSet JavaDoc res = statement.executeQuery();
614             
615             while (res.next()) {
616                 String JavaDoc object = res.getString(PERMISSIONS_OBJECT);
617                 String JavaDoc revision = res.getString(PERMISSIONS_REVISION_NUMBER);
618                 String JavaDoc subject = res.getString(PERMISSIONS_SUBJECT);
619                 String JavaDoc action = res.getString(PERMISSIONS_ACTION);
620  
621                 boolean inheritable = false;
622                 if (res.getInt(PERMISSIONS_INHERITABLE) == 1) {
623                     inheritable = true;
624                 }
625                 boolean negative = false;
626                 if (res.getInt(PERMISSIONS_NEGATIVE) == 1) {
627                     negative = true;
628                 }
629                 NodePermission permission =
630                     new NodePermission(object,revision,subject,
631                                        action,inheritable,negative);
632                 permissionVector.addElement(permission);
633             }
634             
635         } catch (SQLException JavaDoc e) {
636             throw createException(e,uri);
637         } finally {
638             closeStatement(statement);
639         }
640         
641         return permissionVector.elements();
642     }
643     
644     /**
645      * Create a new lock.
646      *
647      * @param lock Lock token
648      * @exception ServiceAccessException Service access error
649      */

650     public void putLock(Connection JavaDoc connection,Uri uri, NodeLock lock)
651         throws ServiceAccessException {
652         
653         PreparedStatement JavaDoc statement = null;
654         
655         try {
656             int inheritable = 0;
657             if (lock.isInheritable()) {
658                 inheritable = 1;
659             }
660             
661             int exclusive = 0;
662             if (lock.isExclusive()) {
663                 exclusive = 1;
664             }
665             
666             statement = connection.prepareStatement
667                 ("insert into locks values(?,?,?,?,?,?,?,?)");
668             statement.setString(1, lock.getLockId());
669             statement.setString(2, lock.getObjectUri());
670             statement.setString(3, lock.getSubjectUri());
671             statement.setString(4, lock.getTypeUri());
672             statement.setString
673                 (5, String.valueOf(lock.getExpirationDate().getTime()));
674             statement.setInt(6,inheritable);
675             statement.setInt(7, exclusive);
676             statement.setString(8,lock.getOwnerInfo());
677             statement.execute();
678         } catch (SQLException JavaDoc e) {
679             throw createException(e,uri);
680         } finally {
681             closeStatement(statement);
682         }
683         
684     }
685     
686     
687     /**
688      * Renew a lock.
689      *
690      * @param lock Token to renew
691      * @exception ServiceAccessException Service access error
692      * @exception LockTokenNotFoundException Lock token was not found
693      */

694     public void renewLock(Connection JavaDoc connection,Uri uri, NodeLock lock)
695         throws ServiceAccessException, LockTokenNotFoundException {
696         
697         PreparedStatement JavaDoc statement = null;
698         
699         try {
700             
701             int inheritable = 0;
702             if (lock.isInheritable()) {
703                 inheritable = 1;
704             }
705             
706             int exclusive = 0;
707             if (lock.isExclusive()) {
708                 exclusive = 1;
709             }
710             
711             statement = connection.prepareStatement
712                 ("delete from locks where id=?");
713             statement.setString(1, lock.getLockId());
714             statement.execute();
715             closeStatement(statement);
716             
717             statement = connection.prepareStatement
718                 ("insert into locks values(?,?,?,?,?,?,?,?)");
719             statement.setString(1, lock.getLockId());
720             statement.setString(2, lock.getObjectUri());
721             statement.setString(3, lock.getSubjectUri());
722             statement.setString(4, lock.getTypeUri());
723             statement.setString
724                 (5, String.valueOf(lock.getExpirationDate().getTime()));
725             statement.setInt(6, inheritable);
726             statement.setInt(7, exclusive);
727             statement.setString(8,lock.getOwnerInfo());
728             statement.execute();
729             
730         } catch (SQLException JavaDoc e) {
731             throw createException(e,uri);
732         } finally {
733             closeStatement(statement);
734         }
735         
736     }
737     
738     
739     /**
740      * Unlock.
741      *
742      * @param lock Token to remove
743      * @exception ServiceAccessException Service access error
744      * @exception LockTokenNotFoundException Lock token was not found
745      */

746     public void removeLock(Connection JavaDoc connection,Uri uri, NodeLock lock)
747         throws ServiceAccessException, LockTokenNotFoundException {
748         
749         Statement JavaDoc statement = null;
750         
751         try {
752             
753             statement = connection.createStatement();
754             
755             String JavaDoc s = null;
756             
757             s = "delete from locks where id='" + lock.getLockId() + "'";
758             statement.execute(s);
759             
760         } catch (SQLException JavaDoc e) {
761             throw createException(e,uri);
762         } <