001 /*
002 * JBoss DNA (http://www.jboss.org/dna)
003 * See the COPYRIGHT.txt file distributed with this work for information
004 * regarding copyright ownership. Some portions may be licensed
005 * to Red Hat, Inc. under one or more contributor license agreements.
006 * See the AUTHORS.txt file in the distribution for a full listing of
007 * individual contributors.
008 *
009 * JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
010 * is licensed to you under the terms of the GNU Lesser General Public License as
011 * published by the Free Software Foundation; either version 2.1 of
012 * the License, or (at your option) any later version.
013 *
014 * JBoss DNA is distributed in the hope that it will be useful,
015 * but WITHOUT ANY WARRANTY; without even the implied warranty of
016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
017 * Lesser General Public License for more details.
018 *
019 * You should have received a copy of the GNU Lesser General Public
020 * License along with this software; if not, write to the Free
021 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
022 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
023 */
024 package org.jboss.dna.common.jdbc.model.spi;
025
026 import java.util.ArrayList;
027 import java.util.List;
028 import java.util.Set;
029 import java.util.HashSet;
030 import org.jboss.dna.common.jdbc.model.api.*;
031
032 /**
033 * Provides RDBMS wide meta data retrieved from java.sql.DatabaseMetaData.
034 *
035 * @author <a href="mailto:litsenko_sergey@yahoo.com">Sergiy Litsenko</a>
036 */
037 public class DatabaseBean extends CoreMetaDataBean implements Database {
038 private static final long serialVersionUID = 6634428066138252064L;
039 // database metadata provider exception list
040 private List<DatabaseMetaDataMethodException> exceptionList = new ArrayList<DatabaseMetaDataMethodException>();
041 private String name;
042 private Boolean allProceduresAreCallable;
043 private Boolean allTablesAreSelectable;
044 private String url;
045 private String userName;
046 private Boolean readOnly;
047 private Boolean nullsAreSortedHigh;
048 private Boolean nullsAreSortedLow;
049 private Boolean nullsAreSortedAtStart;
050 private Boolean nullsAreSortedAtEnd;
051 private String databaseProductName;
052 private String databaseProductVersion;
053 private String driverName;
054 private String driverVersion;
055 private Integer driverMajorVersion;
056 private Integer driverMinorVersion;
057 private Boolean usesLocalFiles;
058 private Boolean usesLocalFilePerTable;
059 private Boolean supportsMixedCaseIdentifiers;
060 private Boolean storesUpperCaseIdentifiers;
061 private Boolean storesLowerCaseIdentifiers;
062 private Boolean storesMixedCaseIdentifiers;
063 private Boolean supportsMixedCaseQuotedIdentifiers;
064 private Boolean storesUpperCaseQuotedIdentifiers;
065 private Boolean storesLowerCaseQuotedIdentifiers;
066 private Boolean storesMixedCaseQuotedIdentifiers;
067 private String identifierQuoteString;
068 private Set<String> sqlKeywords = new HashSet<String>();
069 private Set<String> numericFunctions = new HashSet<String>();
070 private Set<String> stringFunctions = new HashSet<String>();
071 private Set<String> systemFunctions = new HashSet<String>();
072 private Set<String> timeDateFunctions = new HashSet<String>();
073 private String searchStringEscape;
074 private String extraNameCharacters;
075 private Boolean supportsAlterTableWithAddColumn;
076 private Boolean supportsAlterTableWithDropColumn;
077 private Boolean supportsColumnAliasing;
078 private Boolean nullPlusNonNullIsNull;
079 private Boolean supportsConvert;
080 private Boolean supportsTableCorrelationNames;
081 private Boolean supportsDifferentTableCorrelationNames;
082 private Boolean supportsExpressionsInOrderBy;
083 private Boolean supportsOrderByUnrelated;
084 private Boolean supportsGroupBy;
085 private Boolean supportsGroupByUnrelated;
086 private Boolean supportsGroupByBeyondSelect;
087 private Boolean supportsLikeEscapeClause;
088 private Boolean supportsMultipleResultSets;
089 private Boolean supportsMultipleTransactions;
090 private Boolean supportsNonNullableColumns;
091 private Boolean supportsMinimumSQLGrammar;
092 private Boolean supportsCoreSQLGrammar;
093 private Boolean supportsExtendedSQLGrammar;
094 private Boolean supportsANSI92EntryLevelSQL;
095 private Boolean supportsANSI92IntermediateSQL;
096 private Boolean supportsANSI92FullSQL;
097 private Boolean supportsIntegrityEnhancementFacility;
098 private Boolean supportsOuterJoins;
099 private Boolean supportsFullOuterJoins;
100 private Boolean supportsLimitedOuterJoins;
101 private String schemaTerm;
102 private String procedureTerm;
103 private String catalogTerm;
104 private Boolean catalogAtStart;
105 private String catalogSeparator;
106 private Boolean supportsSchemasInDataManipulation;
107 private Boolean supportsSchemasInProcedureCalls;
108 private Boolean supportsSchemasInTableDefinitions;
109 private Boolean supportsSchemasInIndexDefinitions;
110 private Boolean supportsSchemasInPrivilegeDefinitions;
111 private Boolean supportsCatalogsInDataManipulation;
112 private Boolean supportsCatalogsInProcedureCalls;
113 private Boolean supportsCatalogsInTableDefinitions;
114 private Boolean supportsCatalogsInIndexDefinitions;
115 private Boolean supportsCatalogsInPrivilegeDefinitions;
116 private Boolean supportsPositionedDelete;
117 private Boolean supportsPositionedUpdate;
118 private Boolean supportsSelectForUpdate;
119 private Boolean supportsStoredProcedures;
120 private Boolean supportsSubqueriesInComparisons;
121 private Boolean supportsSubqueriesInExists;
122 private Boolean supportsSubqueriesInIns;
123 private Boolean supportsSubqueriesInQuantifieds;
124 private Boolean supportsCorrelatedSubqueries;
125 private Boolean supportsUnion;
126 private Boolean supportsUnionAll;
127 private Boolean supportsOpenCursorsAcrossCommit;
128 private Boolean supportsOpenCursorsAcrossRollback;
129 private Boolean supportsOpenStatementsAcrossCommit;
130 private Boolean supportsOpenStatementsAcrossRollback;
131 private Integer maxBinaryLiteralLength;
132 private Integer maxCharLiteralLength;
133 private Integer maxColumnNameLength;
134 private Integer maxColumnsInGroupBy;
135 private Integer maxColumnsInIndex;
136 private Integer maxColumnsInOrderBy;
137 private Integer maxColumnsInSelect;
138 private Integer maxColumnsInTable;
139 private Integer maxConnections;
140 private Integer maxCursorNameLength;
141 private Integer maxIndexLength;
142 private Integer maxSchemaNameLength;
143 private Integer maxProcedureNameLength;
144 private Integer maxCatalogNameLength;
145 private Integer maxRowSize;
146 private Boolean maxRowSizeIncludeBlobs;
147 private Integer maxStatementLength;
148 private Integer maxStatements;
149 private Integer maxTableNameLength;
150 private Integer maxTablesInSelect;
151 private Integer maxUserNameLength;
152 private Integer defaultTransactionIsolation;
153 private Boolean supportsTransactions;
154 private Set<TransactionIsolationLevelType> supportedTransactionIsolationLevels = new HashSet<TransactionIsolationLevelType>();
155 private Boolean supportsDataDefinitionAndDataManipulationTransactions;
156 private Boolean supportsDataManipulationTransactionsOnly;
157 private Boolean dataDefinitionCausesTransactionCommit;
158 private Boolean dataDefinitionIgnoredInTransactions;
159 private Set<StoredProcedure> storedProcedures = new HashSet<StoredProcedure>();
160 private Set<Table> tables = new HashSet<Table>();
161 private Set<Schema> schemas = new HashSet<Schema>();
162 private Set<Catalog> catalogs = new HashSet<Catalog>();
163 private Set<TableType> tableTypes = new HashSet<TableType>();
164 private Set<SqlTypeInfo> sqlTypeInfos = new HashSet<SqlTypeInfo>();
165 private Set<ResultSetType> supportedResultSetTypes = new HashSet<ResultSetType>();
166 private Set<UserDefinedType> userDefinedTypes = new HashSet<UserDefinedType>();
167 private Set<SqlTypeConversionPair> supportedConversions = new HashSet<SqlTypeConversionPair>();
168 private Set<ResultSetConcurrencyType> supportedForwardOnlyResultSetConcurrencies = new HashSet<ResultSetConcurrencyType>();
169 private Set<ResultSetConcurrencyType> supportedScrollInsensitiveResultSetConcurrencies = new HashSet<ResultSetConcurrencyType>();
170 private Set<ResultSetConcurrencyType> supportedScrollSensitiveResultSetConcurrencies = new HashSet<ResultSetConcurrencyType>();
171 private Boolean forwardOnlyResultSetOwnUpdatesAreVisible;
172 private Boolean scrollInsensitiveResultSetOwnUpdatesAreVisible;
173 private Boolean scrollSensitiveResultSetOwnUpdatesAreVisible;
174 private Boolean forwardOnlyResultSetOwnDeletesAreVisible;
175 private Boolean scrollInsensitiveResultSetOwnDeletesAreVisible;
176 private Boolean scrollSensitiveResultSetOwnDeletesAreVisible;
177 private Boolean forwardOnlyResultSetOwnInsertsAreVisible;
178 private Boolean scrollInsensitiveResultSetOwnInsertsAreVisible;
179 private Boolean scrollSensitiveResultSetOwnInsertsAreVisible;
180 private Boolean forwardOnlyResultSetOthersUpdatesAreVisible;
181 private Boolean scrollInsensitiveResultSetOthersUpdatesAreVisible;
182 private Boolean scrollSensitiveResultSetOthersUpdatesAreVisible;
183 private Boolean forwardOnlyResultSetOthersDeletesAreVisible;
184 private Boolean scrollInsensitiveResultSetOthersDeletesAreVisible;
185 private Boolean scrollSensitiveResultSetOthersDeletesAreVisible;
186 private Boolean forwardOnlyResultSetOthersInsertsAreVisible;
187 private Boolean scrollInsensitiveResultSetOthersInsertsAreVisible;
188 private Boolean scrollSensitiveResultSetOthersInsertsAreVisible;
189 private Boolean forwardOnlyResultSetUpdatesAreDetected;
190 private Boolean scrollInsensitiveResultSetUpdatesAreDetected;
191 private Boolean scrollSensitiveResultSetUpdatesAreDetected;
192 private Boolean forwardOnlyResultSetDeletesAreDetected;
193 private Boolean scrollInsensitiveResultSetDeletesAreDetected;
194 private Boolean scrollSensitiveResultSetDeletesAreDetected;
195 private Boolean forwardOnlyResultInsertsAreDetected;
196 private Boolean scrollInsensitiveResultInsertsAreDetected;
197 private Boolean scrollSensitiveResultInsertsAreDetected;
198 private Boolean supportsBatchUpdates;
199 private Boolean supportsSavepoints;
200 private Boolean supportsNamedParameters;
201 private Boolean supportsMultipleOpenResults;
202 private Boolean supportsGetGeneratedKeys;
203 private Boolean supportsResultSetHoldCurrorsOverCommitHoldability;
204 private Boolean supportsResultSetCloseCurrorsAtCommitHoldability;
205 private ResultSetHoldabilityType resultSetHoldabilityType;
206 private Integer databaseMajorVersion;
207 private Integer databaseMinorVersion;
208 private Integer jdbcMajorVersion;
209 private Integer jdbcMinorVersion;
210 private SQLStateType sqlStateType;
211 private Boolean locatorsUpdateCopy;
212 private Boolean supportsStatementPooling;
213
214 /**
215 * Default constructor
216 */
217 public DatabaseBean() {
218 }
219
220 /**
221 * Returns list of failed database metadata methods through the DatabaseMetaDataMethodExceptions
222 *
223 * @return list of failed database metadata methods through the DatabaseMetaDataMethodExceptions
224 */
225 public List<DatabaseMetaDataMethodException> getExceptionList() {
226 return exceptionList;
227 }
228
229 /**
230 * Adds the DatabaseMetaDataMethodException to the DatabaseMetadataProvider exception list
231 *
232 * @param exception the DatabaseMetaDataMethodException
233 */
234 public void addException( DatabaseMetaDataMethodException exception ) {
235 exceptionList.add(exception);
236 }
237
238 /**
239 * Searches the DatabaseMetaDataMethodException by method name
240 *
241 * @param methodName the name of method that caused exception
242 * @return the DatabaseMetaDataMethodException if found, otherwise returns null
243 */
244 public DatabaseMetaDataMethodException findException( String methodName ) {
245 // trying to find exception
246 for (DatabaseMetaDataMethodException exception : exceptionList) {
247 if (exception.getMethodName().equals(methodName)) {
248 return exception;
249 }
250 }
251 return null;
252 }
253
254 /**
255 * Checks that specified database metadata method of provider is failed or not
256 *
257 * @param methodName the name of method that caused exception
258 * @return true if method failed; false otherwise
259 */
260 public boolean isDatabaseMetaDataMethodFailed( String methodName ) {
261 return (findException(methodName) != null);
262 }
263
264 /**
265 * Gets database name
266 *
267 * @return database name
268 */
269 public String getName() {
270 return name;
271 }
272
273 /**
274 * Sets database name
275 *
276 * @param name the database name
277 */
278 public void setName( String name ) {
279 this.name = name;
280 }
281
282 // ----------------------------------------------------------------------
283 // A variety of minor information about the target database.
284 // ----------------------------------------------------------------------
285
286 /**
287 * Retrieves whether the current user can call all the procedures returned by the method
288 * <code>DatabaseMetaData.getProcedures</code>.
289 *
290 * @return <code>true</code> if so; <code>false</code> otherwise
291 */
292 public Boolean isAllProceduresAreCallable() {
293 return allProceduresAreCallable;
294 }
295
296 /**
297 * sets whether the current user can call all the procedures returned by the method
298 * <code>DatabaseMetaData.getProcedures</code>.
299 *
300 * @param allProceduresAreCallable <code>true</code> if so; <code>false</code> otherwise
301 */
302 public void setAllProceduresAreCallable( Boolean allProceduresAreCallable ) {
303 this.allProceduresAreCallable = allProceduresAreCallable;
304 }
305
306 /**
307 * Retrieves whether the current user can use all the tables returned by the method <code>DatabaseMetaData.getTables</code> in
308 * a <code>SELECT</code> statement.
309 *
310 * @return <code>true</code> if so; <code>false</code> otherwise
311 */
312 public Boolean isAllTablesAreSelectable() {
313 return allTablesAreSelectable;
314 }
315
316 /**
317 * Sets whether the current user can use all the tables returned by the method <code>DatabaseMetaData.getTables</code> in a
318 * <code>SELECT</code> statement.
319 *
320 * @param allTablesAreSelectable <code>true</code> if so; <code>false</code> otherwise
321 */
322 public void setAllTablesAreSelectable( Boolean allTablesAreSelectable ) {
323 this.allTablesAreSelectable = allTablesAreSelectable;
324 }
325
326 /**
327 * Retrieves the URL for this DBMS.
328 *
329 * @return the URL for this DBMS or <code>null</code> if it cannot be generated
330 */
331 public String getURL() {
332 return url;
333 }
334
335 /**
336 * Sets the URL for this DBMS.
337 *
338 * @param url the URL for this DBMS or <code>null</code> if it cannot be generated
339 */
340 public void setURL( String url ) {
341 this.url = url;
342 }
343
344 /**
345 * Retrieves the user name as known to this database.
346 *
347 * @return the database user name
348 */
349 public String getUserName() {
350 return userName;
351 }
352
353 /**
354 * Sets the user name as known to this database.
355 *
356 * @param userName the database user name
357 */
358 public void setUserName( String userName ) {
359 this.userName = userName;
360 }
361
362 /**
363 * Retrieves whether this database is in read-only mode.
364 *
365 * @return <code>true</code> if so; <code>false</code> otherwise
366 */
367 public Boolean isReadOnly() {
368 return readOnly;
369 }
370
371 /**
372 * Sets whether this database is in read-only mode.
373 *
374 * @param readOnly <code>true</code> if so; <code>false</code> otherwise
375 */
376 public void setReadOnly( Boolean readOnly ) {
377 this.readOnly = readOnly;
378 }
379
380 /**
381 * Retrieves whether <code>NULL</code> values are sorted high. Sorted high means that <code>NULL</code> values sort higher
382 * than any other value in a domain. In an ascending order, if this method returns <code>true</code>, <code>NULL</code> values
383 * will appear at the end. By contrast, the method <code>DatabaseMetaData.nullsAreSortedAtEnd</code> indicates whether
384 * <code>NULL</code> values are sorted at the end regardless of sort order.
385 *
386 * @return <code>true</code> if so; <code>false</code> otherwise
387 */
388 public Boolean isNullsAreSortedHigh() {
389 return nullsAreSortedHigh;
390 }
391
392 /**
393 * Sets whether <code>NULL</code> values are sorted high. Sorted high means that <code>NULL</code> values sort higher than any
394 * other value in a domain. In an ascending order, if this method returns <code>true</code>, <code>NULL</code> values will
395 * appear at the end. By contrast, the method <code>DatabaseMetaData.nullsAreSortedAtEnd</code> indicates whether
396 * <code>NULL</code> values are sorted at the end regardless of sort order.
397 *
398 * @param nullsAreSortedHigh <code>true</code> if so; <code>false</code> otherwise
399 */
400 public void setNullsAreSortedHigh( Boolean nullsAreSortedHigh ) {
401 this.nullsAreSortedHigh = nullsAreSortedHigh;
402 }
403
404 /**
405 * Retrieves whether <code>NULL</code> values are sorted low. Sorted low means that <code>NULL</code> values sort lower than
406 * any other value in a domain. In an ascending order, if this method returns <code>true</code>, <code>NULL</code> values will
407 * appear at the beginning. By contrast, the method <code>DatabaseMetaData.nullsAreSortedAtStart</code> indicates whether
408 * <code>NULL</code> values are sorted at the beginning regardless of sort order.
409 *
410 * @return <code>true</code> if so; <code>false</code> otherwise
411 */
412 public Boolean isNullsAreSortedLow() {
413 return nullsAreSortedLow;
414 }
415
416 /**
417 * Sets whether <code>NULL</code> values are sorted low. Sorted low means that <code>NULL</code> values sort lower than any
418 * other value in a domain. In an ascending order, if this method returns <code>true</code>, <code>NULL</code> values will
419 * appear at the beginning. By contrast, the method <code>DatabaseMetaData.nullsAreSortedAtStart</code> indicates whether
420 * <code>NULL</code> values are sorted at the beginning regardless of sort order.
421 *
422 * @param nullsAreSortedLow <code>true</code> if so; <code>false</code> otherwise
423 */
424 public void setNullsAreSortedLow( Boolean nullsAreSortedLow ) {
425 this.nullsAreSortedLow = nullsAreSortedLow;
426 }
427
428 /**
429 * Retrieves whether <code>NULL</code> values are sorted at the start regardless of sort order.
430 *
431 * @return <code>true</code> if so; <code>false</code> otherwise
432 */
433 public Boolean isNullsAreSortedAtStart() {
434 return nullsAreSortedAtStart;
435 }
436
437 /**
438 * Sets whether <code>NULL</code> values are sorted at the start regardless of sort order.
439 *
440 * @param nullsAreSortedAtStart <code>true</code> if so; <code>false</code> otherwise
441 */
442 public void setNullsAreSortedAtStart( Boolean nullsAreSortedAtStart ) {
443 this.nullsAreSortedAtStart = nullsAreSortedAtStart;
444 }
445
446 /**
447 * Retrieves whether <code>NULL</code> values are sorted at the end regardless of sort order.
448 *
449 * @return <code>true</code> if so; <code>false</code> otherwise
450 */
451 public Boolean isNullsAreSortedAtEnd() {
452 return nullsAreSortedAtEnd;
453 }
454
455 /**
456 * Sets whether <code>NULL</code> values are sorted at the end regardless of sort order.
457 *
458 * @param nullsAreSortedAtEnd <code>true</code> if so; <code>false</code> otherwise
459 */
460 public void setNullsAreSortedAtEnd( Boolean nullsAreSortedAtEnd ) {
461 this.nullsAreSortedAtEnd = nullsAreSortedAtEnd;
462 }
463
464 /**
465 * Retrieves the name of this database product.
466 *
467 * @return database product name
468 */
469 public String getDatabaseProductName() {
470 return databaseProductName;
471 }
472
473 /**
474 * Sets the name of this database product.
475 *
476 * @param databaseProductName database product name
477 */
478 public void setDatabaseProductName( String databaseProductName ) {
479 this.databaseProductName = databaseProductName;
480 }
481
482 /**
483 * Retrieves the version number of this database product.
484 *
485 * @return database version number
486 */
487 public String getDatabaseProductVersion() {
488 return databaseProductVersion;
489 }
490
491 /**
492 * Sets the version number of this database product.
493 *
494 * @param databaseProductVersion database version number
495 */
496 public void setDatabaseProductVersion( String databaseProductVersion ) {
497 this.databaseProductVersion = databaseProductVersion;
498 }
499
500 /**
501 * Retrieves the name of this JDBC driver.
502 *
503 * @return JDBC driver name
504 */
505 public String getDriverName() {
506 return driverName;
507 }
508
509 /**
510 * Sets the name of this JDBC driver.
511 *
512 * @param driverName JDBC driver name
513 */
514 public void setDriverName( String driverName ) {
515 this.driverName = driverName;
516 }
517
518 /**
519 * Retrieves the version number of this JDBC driver as a <code>String</code>.
520 *
521 * @return JDBC driver version
522 */
523 public String getDriverVersion() {
524 return driverVersion;
525 }
526
527 /**
528 * Sets the version number of this JDBC driver as a <code>String</code>.
529 *
530 * @param driverVersion the JDBC driver version
531 */
532 public void setDriverVersion( String driverVersion ) {
533 this.driverVersion = driverVersion;
534 }
535
536 /**
537 * Retrieves this JDBC driver's minor version number.
538 *
539 * @return JDBC driver minor version number
540 */
541 public Integer getDriverMajorVersion() {
542 return driverMajorVersion;
543 }
544
545 /**
546 * Sets this JDBC driver's major version number.
547 *
548 * @param driverMajorVersion the JDBC driver major version
549 */
550 public void setDriverMajorVersion( Integer driverMajorVersion ) {
551 this.driverMajorVersion = driverMajorVersion;
552 }
553
554 /**
555 * Retrieves this JDBC driver's minor version number.
556 *
557 * @return JDBC driver minor version number
558 */
559 public Integer getDriverMinorVersion() {
560 return driverMinorVersion;
561 }
562
563 /**
564 * Sets this JDBC driver's minor version number.
565 *
566 * @param driverMinorVersion the JDBC driver minor version number
567 */
568 public void setDriverMinorVersion( Integer driverMinorVersion ) {
569 this.driverMinorVersion = driverMinorVersion;
570 }
571
572 /**
573 * Retrieves whether this database stores tables in a local file.
574 *
575 * @return <code>true</code> if so; <code>false</code> otherwise
576 */
577 public Boolean isUsesLocalFiles() {
578 return usesLocalFiles;
579 }
580
581 /**
582 * Sets whether this database stores tables in a local file.
583 *
584 * @param usesLocalFiles <code>true</code> if so; <code>false</code> otherwise
585 */
586 public void setUsesLocalFiles( Boolean usesLocalFiles ) {
587 this.usesLocalFiles = usesLocalFiles;
588 }
589
590 /**
591 * Retrieves whether this database uses a file for each table.
592 *
593 * @return <code>true</code> if this database uses a local file for each table; <code>false</code> otherwise
594 */
595 public Boolean isUsesLocalFilePerTable() {
596 return usesLocalFilePerTable;
597 }
598
599 /**
600 * Sets whether this database uses a file for each table.
601 *
602 * @param usesLocalFilePerTable <code>true</code> if this database uses a local file for each table; <code>false</code>
603 * otherwise
604 */
605 public void setUsesLocalFilePerTable( Boolean usesLocalFilePerTable ) {
606 this.usesLocalFilePerTable = usesLocalFilePerTable;
607 }
608
609 /**
610 * Retrieves whether this database treats mixed case unquoted SQL identifiers as case sensitive and as a result stores them in
611 * mixed case.
612 *
613 * @return <code>true</code> if so; <code>false</code> otherwise
614 */
615 public Boolean isSupportsMixedCaseIdentifiers() {
616 return supportsMixedCaseIdentifiers;
617 }
618
619 /**
620 * Sets whether this database treats mixed case unquoted SQL identifiers as case sensitive and as a result stores them in
621 * mixed case.
622 *
623 * @param supportsMixedCaseIdentifiers <code>true</code> if so; <code>false</code> otherwise
624 */
625 public void setSupportsMixedCaseIdentifiers( Boolean supportsMixedCaseIdentifiers ) {
626 this.supportsMixedCaseIdentifiers = supportsMixedCaseIdentifiers;
627 }
628
629 /**
630 * Retrieves whether this database treats mixed case unquoted SQL identifiers as case insensitive and stores them in upper
631 * case.
632 *
633 * @return <code>true</code> if so; <code>false</code> otherwise
634 */
635 public Boolean isStoresUpperCaseIdentifiers() {
636 return storesUpperCaseIdentifiers;
637 }
638
639 /**
640 * Sets whether this database treats mixed case unquoted SQL identifiers as case insensitive and stores them in upper case.
641 *
642 * @param storesUpperCaseIdentifiers <code>true</code> if so; <code>false</code> otherwise
643 */
644 public void setStoresUpperCaseIdentifiers( Boolean storesUpperCaseIdentifiers ) {
645 this.storesUpperCaseIdentifiers = storesUpperCaseIdentifiers;
646 }
647
648 /**
649 * Retrieves whether this database treats mixed case unquoted SQL identifiers as case insensitive and stores them in lower
650 * case.
651 *
652 * @return <code>true</code> if so; <code>false</code> otherwise
653 */
654 public Boolean isStoresLowerCaseIdentifiers() {
655 return storesLowerCaseIdentifiers;
656 }
657
658 /**
659 * sets whether this database treats mixed case unquoted SQL identifiers as case insensitive and stores them in lower case.
660 *
661 * @param storesLowerCaseIdentifiers <code>true</code> if so; <code>false</code> otherwise
662 */
663 public void setStoresLowerCaseIdentifiers( Boolean storesLowerCaseIdentifiers ) {
664 this.storesLowerCaseIdentifiers = storesLowerCaseIdentifiers;
665 }
666
667 /**
668 * Retrieves whether this database treats mixed case unquoted SQL identifiers as case insensitive and stores them in mixed
669 * case.
670 *
671 * @return <code>true</code> if so; <code>false</code> otherwise
672 */
673 public Boolean isStoresMixedCaseIdentifiers() {
674 return storesMixedCaseIdentifiers;
675 }
676
677 /**
678 * Sets whether this database treats mixed case unquoted SQL identifiers as case insensitive and stores them in mixed case.
679 *
680 * @param storesMixedCaseIdentifiers <code>true</code> if so; <code>false</code> otherwise
681 */
682 public void setStoresMixedCaseIdentifiers( Boolean storesMixedCaseIdentifiers ) {
683 this.storesMixedCaseIdentifiers = storesMixedCaseIdentifiers;
684 }
685
686 /**
687 * Retrieves whether this database treats mixed case quoted SQL identifiers as case sensitive and as a result stores them in
688 * mixed case.
689 *
690 * @return <code>true</code> if so; <code>false</code> otherwise
691 */
692 public Boolean isSupportsMixedCaseQuotedIdentifiers() {
693 return supportsMixedCaseQuotedIdentifiers;
694 }
695
696 /**
697 * Sets whether this database treats mixed case quoted SQL identifiers as case sensitive and as a result stores them in mixed
698 * case.
699 *
700 * @param supportsMixedCaseQuotedIdentifiers <code>true</code> if so; <code>false</code> otherwise
701 */
702 public void setSupportsMixedCaseQuotedIdentifiers( Boolean supportsMixedCaseQuotedIdentifiers ) {
703 this.supportsMixedCaseQuotedIdentifiers = supportsMixedCaseQuotedIdentifiers;
704 }
705
706 /**
707 * Retrieves whether this database treats mixed case quoted SQL identifiers as case insensitive and stores them in upper case.
708 *
709 * @return <code>true</code> if so; <code>false</code> otherwise
710 */
711 public Boolean isStoresUpperCaseQuotedIdentifiers() {
712 return storesUpperCaseQuotedIdentifiers;
713 }
714
715 /**
716 * Sets whether this database treats mixed case quoted SQL identifiers as case insensitive and stores them in upper case.
717 *
718 * @param storesUpperCaseQuotedIdentifiers <code>true</code> if so; <code>false</code> otherwise
719 */
720 public void setStoresUpperCaseQuotedIdentifiers( Boolean storesUpperCaseQuotedIdentifiers ) {
721 this.storesUpperCaseQuotedIdentifiers = storesUpperCaseQuotedIdentifiers;
722 }
723
724 /**
725 * Retrieves whether this database treats mixed case quoted SQL identifiers as case insensitive and stores them in lower case.
726 *
727 * @return <code>true</code> if so; <code>false</code> otherwise
728 */
729 public Boolean isStoresLowerCaseQuotedIdentifiers() {
730 return storesLowerCaseQuotedIdentifiers;
731 }
732
733 /**
734 * Sets whether this database treats mixed case quoted SQL identifiers as case insensitive and stores them in lower case.
735 *
736 * @param storesLowerCaseQuotedIdentifiers <code>true</code> if so; <code>false</code> otherwise
737 */
738 public void setStoresLowerCaseQuotedIdentifiers( Boolean storesLowerCaseQuotedIdentifiers ) {
739 this.storesLowerCaseQuotedIdentifiers = storesLowerCaseQuotedIdentifiers;
740 }
741
742 /**
743 * Retrieves whether this database treats mixed case quoted SQL identifiers as case insensitive and stores them in mixed case.
744 *
745 * @return <code>true</code> if so; <code>false</code> otherwise
746 */
747 public Boolean isStoresMixedCaseQuotedIdentifiers() {
748 return storesMixedCaseQuotedIdentifiers;
749 }
750
751 /**
752 * Sets whether this database treats mixed case quoted SQL identifiers as case insensitive and stores them in mixed case.
753 *
754 * @param storesMixedCaseQuotedIdentifiers <code>true</code> if so; <code>false</code> otherwise
755 */
756 public void setStoresMixedCaseQuotedIdentifiers( Boolean storesMixedCaseQuotedIdentifiers ) {
757 this.storesMixedCaseQuotedIdentifiers = storesMixedCaseQuotedIdentifiers;
758 }
759
760 /**
761 * Retrieves the string used to quote SQL identifiers. This method returns a space " " if identifier quoting is not supported.
762 *
763 * @return the quoting string or a space if quoting is not supported
764 */
765 public String getIdentifierQuoteString() {
766 return identifierQuoteString;
767 }
768
769 /**
770 * Sets the string used to quote SQL identifiers. This method returns a space " " if identifier quoting is not supported.
771 *
772 * @param identifierQuoteString the quoting string or a space if quoting is not supported
773 */
774 public void setIdentifierQuoteString( String identifierQuoteString ) {
775 this.identifierQuoteString = identifierQuoteString;
776 }
777
778 /**
779 * Retrieves a list of all of this database's SQL keywords that are NOT also SQL92 keywords.
780 *
781 * @return the list of this database's keywords that are not also SQL92 keywords
782 */
783 public Set<String> getSQLKeywords() {
784 return sqlKeywords;
785 }
786
787 /**
788 * Adds SQL keyword
789 *
790 * @param sqlKeyword the SQL keyword to add
791 */
792 public void addSQLKeyword( String sqlKeyword ) {
793 sqlKeywords.add(sqlKeyword);
794 }
795
796 /**
797 * Deletes SQL keyword
798 *
799 * @param sqlKeyword the SQL keyword to delete
800 */
801 public void deleteSQLKeyword( String sqlKeyword ) {
802 sqlKeywords.remove(sqlKeyword);
803 }
804
805 /**
806 * Is SQL keyword supported
807 *
808 * @param sqlKeyword the SQL keyword to search
809 * @return true if supported; false otherwiose
810 */
811 public Boolean isSQLKeywordSupported( String sqlKeyword ) {
812 for (String s : sqlKeywords) {
813 if (s.equals(sqlKeyword)) {
814 return Boolean.TRUE;
815 }
816 }
817 // return false
818 return Boolean.FALSE;
819 }
820
821 /**
822 * Retrieves a list of math functions available with this database. These are the Open /Open CLI math function names used in
823 * the JDBC function escape clause.
824 *
825 * @return the list of math functions supported by this database
826 */
827 public Set<String> getNumericFunctions() {
828 return numericFunctions;
829 }
830
831 /**
832 * Adds numeric function
833 *
834 * @param functionName the name of numeric function to add
835 */
836 public void addNumericFunction( String functionName ) {
837 numericFunctions.add(functionName);
838 }
839
840 /**
841 * Deletes numeric function
842 *
843 * @param functionName the name of numeric function to delete
844 */
845 public void deleteNumericFunction( String functionName ) {
846 numericFunctions.remove(functionName);
847 }
848
849 /**
850 * Is Numeric function supported
851 *
852 * @param functionName the name of numeric function
853 * @return true is supported; false otherwise
854 */
855 public Boolean isNumericFunctionSupported( String functionName ) {
856 for (String s : numericFunctions) {
857 if (s.equals(functionName)) {
858 return Boolean.TRUE;
859 }
860 }
861 // return false
862 return Boolean.FALSE;
863 }
864
865 /**
866 * Retrieves a list of string functions available with this database. These are the Open Group CLI string function names used
867 * in the JDBC function escape clause.
868 *
869 * @return the list of string functions supported by this database
870 */
871 public Set<String> getStringFunctions() {
872 return stringFunctions;
873 }
874
875 /**
876 * Adds String function
877 *
878 * @param functionName the name of String function to add
879 */
880 public void addStringFunction( String functionName ) {
881 stringFunctions.add(functionName);
882 }
883
884 /**
885 * Deletes String function
886 *
887 * @param functionName the name of String function to delete
888 */
889 public void deleteStringFunction( String functionName ) {
890 stringFunctions.remove(functionName);
891 }
892
893 /**
894 * Is String function supported
895 *
896 * @param functionName the name of String function
897 * @return true is supported; false otherwise
898 */
899 public Boolean isStringFunctionSupported( String functionName ) {
900 for (String s : stringFunctions) {
901 if (s.equals(functionName)) {
902 return Boolean.TRUE;
903 }
904 }
905 // return false
906 return Boolean.FALSE;
907 }
908
909 /**
910 * Retrieves a list of system functions available with this database. These are the Open Group CLI system function names used
911 * in the JDBC function escape clause.
912 *
913 * @return a list of system functions supported by this database
914 */
915 public Set<String> getSystemFunctions() {
916 return systemFunctions;
917 }
918
919 /**
920 * Adds System function
921 *
922 * @param functionName the name of System function to add
923 */
924 public void addSystemFunction( String functionName ) {
925 systemFunctions.add(functionName);
926 }
927
928 /**
929 * deletes System function
930 *
931 * @param functionName the name of System function to delete
932 */
933 public void deleteSystemFunction( String functionName ) {
934 systemFunctions.remove(functionName);
935 }
936
937 /**
938 * Is System function supported
939 *
940 * @param functionName the name of System function
941 * @return true is supported; false otherwise
942 */
943 public Boolean isSystemFunctionSupported( String functionName ) {
944 for (String s : systemFunctions) {
945 if (s.equals(functionName)) {
946 return Boolean.TRUE;
947 }
948 }
949 // return false
950 return Boolean.FALSE;
951 }
952
953 /**
954 * Retrieves a list of the time and date functions available with this database.
955 *
956 * @return the list of time and date functions supported by this database
957 */
958 public Set<String> getTimeDateFunctions() {
959 return timeDateFunctions;
960 }
961
962 /**
963 * Adds Time/Date function
964 *
965 * @param functionName the name of Time/Date function to add
966 */
967 public void addTimeDateFunction( String functionName ) {
968 timeDateFunctions.add(functionName);
969 }
970
971 /**
972 * deletes Time/Date function
973 *
974 * @param functionName the name of Time/Date function to delete
975 */
976 public void deleteTimeDateFunction( String functionName ) {
977 timeDateFunctions.remove(functionName);
978 }
979
980 /**
981 * Is Time/Date function supported
982 *
983 * @param functionName the name of Time/Date function
984 * @return true is supported; false otherwise
985 */
986 public Boolean isTimeDateFunctionSupported( String functionName ) {
987 for (String s : timeDateFunctions) {
988 if (s.equals(functionName)) {
989 return Boolean.TRUE;
990 }
991 }
992 // return false
993 return Boolean.FALSE;
994 }
995
996 /**
997 * Retrieves the string that can be used to escape wildcard characters. This is the string that can be used to escape '_' or
998 * '%' in the catalog search parameters that are a pattern (and therefore use one of the wildcard characters).
999 * <P>
1000 * The '_' character represents any single character; the '%' character represents any sequence of zero or more characters.
1001 *
1002 * @return the string used to escape wildcard characters
1003 */
1004 public String getSearchStringEscape() {
1005 return searchStringEscape;
1006 }
1007
1008 /**
1009 * Sets the string that can be used to escape wildcard characters. This is the string that can be used to escape '_' or '%' in
1010 * the catalog search parameters that are a pattern (and therefore use one of the wildcard characters).
1011 * <P>
1012 * The '_' character represents any single character; the '%' character represents any sequence of zero or more characters.
1013 *
1014 * @param searchStringEscape the string used to escape wildcard characters
1015 */
1016 public void setSearchStringEscape( String searchStringEscape ) {
1017 this.searchStringEscape = searchStringEscape;
1018 }
1019
1020 /**
1021 * Retrieves all the "extra" characters that can be used in unquoted identifier names (those beyond a-z, A-Z, 0-9 and _).
1022 *
1023 * @return the string containing the extra characters
1024 */
1025 public String getExtraNameCharacters() {
1026 return extraNameCharacters;
1027 }
1028
1029 /**
1030 * Sets all the "extra" characters that can be used in unquoted identifier names (those beyond a-z, A-Z, 0-9 and _).
1031 *
1032 * @param extraNameCharacters the string containing the extra characters
1033 */
1034 public void setExtraNameCharacters( String extraNameCharacters ) {
1035 this.extraNameCharacters = extraNameCharacters;
1036 }
1037
1038 // --------------------------------------------------------------------
1039 // Functions describing which features are supported.
1040 // --------------------------------------------------------------------
1041
1042 /**
1043 * Retrieves whether this database supports <code>ALTER TABLE</code> with add column.
1044 *
1045 * @return <code>true</code> if so; <code>false</code> otherwise
1046 */
1047 public Boolean isSupportsAlterTableWithAddColumn() {
1048 return supportsAlterTableWithAddColumn;
1049 }
1050
1051 /**
1052 * Sets whether this database supports <code>ALTER TABLE</code> with add column.
1053 *
1054 * @param supportsAlterTableWithAddColumn <code>true</code> if so; <code>false</code> otherwise
1055 */
1056 public void setSupportsAlterTableWithAddColumn( Boolean supportsAlterTableWithAddColumn ) {
1057 this.supportsAlterTableWithAddColumn = supportsAlterTableWithAddColumn;
1058 }
1059
1060 /**
1061 * Retrieves whether this database supports <code>ALTER TABLE</code> with drop column.
1062 *
1063 * @return <code>true</code> if so; <code>false</code> otherwise
1064 */
1065 public Boolean isSupportsAlterTableWithDropColumn() {
1066 return supportsAlterTableWithDropColumn;
1067 }
1068
1069 /**
1070 * Sets whether this database supports <code>ALTER TABLE</code> with drop column.
1071 *
1072 * @param supportsAlterTableWithDropColumn <code>true</code> if so; <code>false</code> otherwise
1073 */
1074 public void setSupportsAlterTableWithDropColumn( Boolean supportsAlterTableWithDropColumn ) {
1075 this.supportsAlterTableWithDropColumn = supportsAlterTableWithDropColumn;
1076 }
1077
1078 /**
1079 * Retrieves whether this database supports column aliasing.
1080 * <P>
1081 * If so, the SQL AS clause can be used to provide names for computed columns or to provide alias names for columns as
1082 * required.
1083 *
1084 * @return <code>true</code> if so; <code>false</code> otherwise
1085 */
1086 public Boolean isSupportsColumnAliasing() {
1087 return supportsColumnAliasing;
1088 }
1089
1090 /**
1091 * Sets whether this database supports column aliasing.
1092 * <P>
1093 * If so, the SQL AS clause can be used to provide names for computed columns or to provide alias names for columns as
1094 * required.
1095 *
1096 * @param supportsColumnAliasing <code>true</code> if so; <code>false</code> otherwise
1097 */
1098 public void setSupportsColumnAliasing( Boolean supportsColumnAliasing ) {
1099 this.supportsColumnAliasing = supportsColumnAliasing;
1100 }
1101
1102 /**
1103 * Retrieves whether this database supports concatenations between <code>NULL</code> and non-<code>NULL</code> values being
1104 * <code>NULL</code>.
1105 *
1106 * @return <code>true</code> if so; <code>false</code> otherwise
1107 */
1108 public Boolean isNullPlusNonNullIsNull() {
1109 return nullPlusNonNullIsNull;
1110 }
1111
1112 /**
1113 * Sets whether this database supports concatenations between <code>NULL</code> and non-<code>NULL</code> values being
1114 * <code>NULL</code>.
1115 * @param nullPlusNonNullIsNull true if so
1116 *
1117 */
1118 public void setNullPlusNonNullIsNull( Boolean nullPlusNonNullIsNull ) {
1119 this.nullPlusNonNullIsNull = nullPlusNonNullIsNull;
1120 }
1121
1122 /**
1123 * Retrieves whether this database supports the <code>CONVERT</code> function between SQL types.
1124 *
1125 * @return <code>true</code> if so; <code>false</code> otherwise
1126 */
1127 public Boolean isSupportsConvert() {
1128 return supportsConvert;
1129 }
1130
1131 /**
1132 * Sets whether this database supports the <code>CONVERT</code> function between SQL types.
1133 *
1134 * @param supportsConvert <code>true</code> if so; <code>false</code> otherwise
1135 */
1136 public void setSupportsConvert( Boolean supportsConvert ) {
1137 this.supportsConvert = supportsConvert;
1138 }
1139
1140 /**
1141 * Retrieves whether this database supports the <code>CONVERT</code> for given SQL types. It uses original
1142 * <code>DatabaseMetaData.supportsConvert</code> to check common (NOT ALL POSSIBLE) conversions.
1143 *
1144 * @return list of common (NOT ALL POSSIBLE) conversions.
1145 * @see java.sql.Types
1146 */
1147 public Set<SqlTypeConversionPair> getSupportedConversions() {
1148 return supportedConversions;
1149 }
1150
1151 /**
1152 * Adds SqlTypeConversionPair
1153 *
1154 * @param sqlTypeConversionPair the SqlTypeConversionPair
1155 */
1156 public void addSqlTypeConversionPair( SqlTypeConversionPair sqlTypeConversionPair ) {
1157 supportedConversions.add(sqlTypeConversionPair);
1158 }
1159
1160 /**
1161 * deletes SqlTypeConversionPair
1162 *
1163 * @param sqlTypeConversionPair the SqlTypeConversionPair
1164 */
1165 public void deleteSqlTypeConversionPair( SqlTypeConversionPair sqlTypeConversionPair ) {
1166 supportedConversions.remove(sqlTypeConversionPair);
1167 }
1168
1169 /**
1170 * Searches set of SqlTypeConversionPair by SrcType
1171 * @param srcType
1172 *
1173 * @return set of SqlTypeConversionPair
1174 */
1175 public Set<SqlTypeConversionPair> findSqlTypeConversionPairBySrcType( String srcType ) {
1176 // create set holder
1177 Set<SqlTypeConversionPair> set = new HashSet<SqlTypeConversionPair>();
1178 // if found
1179 for (SqlTypeConversionPair c : supportedConversions) {
1180 if (c.getSrcType().toString().equals(srcType)) {
1181 set.add(c);
1182 }
1183 }
1184 // return nothing
1185 return set;
1186 }
1187
1188 /**
1189 * Retrieves whether this database supports table correlation names.
1190 *
1191 * @return <code>true</code> if so; <code>false</code> otherwise
1192 */
1193 public Boolean isSupportsTableCorrelationNames() {
1194 return supportsTableCorrelationNames;
1195 }
1196
1197 /**
1198 * Sets whether this database supports table correlation names.
1199 *
1200 * @param supportsTableCorrelationNames <code>true</code> if so; <code>false</code> otherwise
1201 */
1202 public void setSupportsTableCorrelationNames( Boolean supportsTableCorrelationNames ) {
1203 this.supportsTableCorrelationNames = supportsTableCorrelationNames;
1204 }
1205
1206 /**
1207 * Retrieves whether, when table correlation names are supported, they are restricted to being different from the names of the
1208 * tables.
1209 *
1210 * @return <code>true</code> if so; <code>false</code> otherwise
1211 */
1212 public Boolean isSupportsDifferentTableCorrelationNames() {
1213 return supportsDifferentTableCorrelationNames;
1214 }
1215
1216 /**
1217 * Sets whether, when table correlation names are supported, they are restricted to being different from the names of the
1218 * tables.
1219 *
1220 * @param supportsDifferentTableCorrelationNames <code>true</code> if so; <code>false</code> otherwise
1221 */
1222 public void setSupportsDifferentTableCorrelationNames( Boolean supportsDifferentTableCorrelationNames ) {
1223 this.supportsDifferentTableCorrelationNames = supportsDifferentTableCorrelationNames;
1224 }
1225
1226 /**
1227 * Retrieves whether this database supports expressions in <code>ORDER BY</code> lists.
1228 *
1229 * @return <code>true</code> if so; <code>false</code> otherwise
1230 */
1231 public Boolean isSupportsExpressionsInOrderBy() {
1232 return supportsExpressionsInOrderBy;
1233 }
1234
1235 /**
1236 * Sets whether this database supports expressions in <code>ORDER BY</code> lists.
1237 *
1238 * @param supportsExpressionsInOrderBy <code>true</code> if so; <code>false</code> otherwise
1239 */
1240 public void setSupportsExpressionsInOrderBy( Boolean supportsExpressionsInOrderBy ) {
1241 this.supportsExpressionsInOrderBy = supportsExpressionsInOrderBy;
1242 }
1243
1244 /**
1245 * Retrieves whether this database supports using a column that is not in the <code>SELECT</code> statement in an
1246 * <code>ORDER BY</code> clause.
1247 *
1248 * @return <code>true</code> if so; <code>false</code> otherwise
1249 */
1250 public Boolean isSupportsOrderByUnrelated() {
1251 return supportsOrderByUnrelated;
1252 }
1253
1254 /**
1255 * Sets whether this database supports using a column that is not in the <code>SELECT</code> statement in an
1256 * <code>ORDER BY</code> clause.
1257 * @param supportsOrderByUnrelated true if so
1258 *
1259 */
1260 public void setSupportsOrderByUnrelated( Boolean supportsOrderByUnrelated ) {
1261 this.supportsOrderByUnrelated = supportsOrderByUnrelated;
1262 }
1263
1264 /**
1265 * Retrieves whether this database supports some form of <code>GROUP BY</code> clause.
1266 *
1267 * @return <code>true</code> if so; <code>false</code> otherwise
1268 */
1269 public Boolean isSupportsGroupBy() {
1270 return supportsGroupBy;
1271 }
1272
1273 /**
1274 * Sets whether this database supports some form of <code>GROUP BY</code> clause.
1275 *
1276 * @param supportsGroupBy <code>true</code> if so; <code>false</code> otherwise
1277 */
1278 public void setSupportsGroupBy( Boolean supportsGroupBy ) {
1279 this.supportsGroupBy = supportsGroupBy;
1280 }
1281
1282 /**
1283 * Retrieves whether this database supports using a column that is not in the <code>SELECT</code> statement in a
1284 * <code>GROUP BY</code> clause.
1285 *
1286 * @return <code>true</code> if so; <code>false</code> otherwise
1287 */
1288 public Boolean isSupportsGroupByUnrelated() {
1289 return supportsGroupByUnrelated;
1290 }
1291
1292 /**
1293 * Sets whether this database supports using a column that is not in the <code>SELECT</code> statement in a
1294 * <code>GROUP BY</code> clause.
1295 *
1296 * @param supportsGroupByUnrelated <code>true</code> if so; <code>false</code> otherwise
1297 */
1298 public void setSupportsGroupByUnrelated( Boolean supportsGroupByUnrelated ) {
1299 this.supportsGroupByUnrelated = supportsGroupByUnrelated;
1300 }
1301
1302 /**
1303 * Retrieves whether this database supports using columns not included in the <code>SELECT</code> statement in a
1304 * <code>GROUP BY</code> clause provided that all of the columns in the <code>SELECT</code> statement are included in the
1305 * <code>GROUP BY</code> clause.
1306 *
1307 * @return <code>true</code> if so; <code>false</code> otherwise
1308 */
1309 public Boolean isSupportsGroupByBeyondSelect() {
1310 return supportsGroupByBeyondSelect;
1311 }
1312
1313 /**
1314 * Sets whether this database supports using columns not included in the <code>SELECT</code> statement in a
1315 * <code>GROUP BY</code> clause provided that all of the columns in the <code>SELECT</code> statement are included in the
1316 * <code>GROUP BY</code> clause.
1317 *
1318 * @param supportsGroupByBeyondSelect <code>true</code> if so; <code>false</code> otherwise
1319 */
1320 public void setSupportsGroupByBeyondSelect( Boolean supportsGroupByBeyondSelect ) {
1321 this.supportsGroupByBeyondSelect = supportsGroupByBeyondSelect;
1322 }
1323
1324 /**
1325 * Retrieves whether this database supports specifying a <code>LIKE</code> escape clause.
1326 *
1327 * @return <code>true</code> if so; <code>false</code> otherwise
1328 */
1329 public Boolean isSupportsLikeEscapeClause() {
1330 return supportsLikeEscapeClause;
1331 }
1332
1333 /**
1334 * Sets whether this database supports specifying a <code>LIKE</code> escape clause.
1335 *
1336 * @param supportsLikeEscapeClause <code>true</code> if so; <code>false</code> otherwise
1337 */
1338 public void setSupportsLikeEscapeClause( Boolean supportsLikeEscapeClause ) {
1339 this.supportsLikeEscapeClause = supportsLikeEscapeClause;
1340 }
1341
1342 /**
1343 * Retrieves whether this database supports getting multiple <code>ResultSet</code> objects from a single call to the method
1344 * <code>execute</code>.
1345 *
1346 * @return <code>true</code> if so; <code>false</code> otherwise
1347 */
1348 public Boolean isSupportsMultipleResultSets() {
1349 return supportsMultipleResultSets;
1350 }
1351
1352 /**
1353 * Sets whether this database supports getting multiple <code>ResultSet</code> objects from a single call to the method
1354 * <code>execute</code>.
1355 *
1356 * @param supportsMultipleResultSets <code>true</code> if so; <code>false</code> otherwise
1357 */
1358 public void setSupportsMultipleResultSets( Boolean supportsMultipleResultSets ) {
1359 this.supportsMultipleResultSets = supportsMultipleResultSets;
1360 }
1361
1362 /**
1363 * Retrieves whether this database allows having multiple transactions open at once (on different connections).
1364 *
1365 * @return <code>true</code> if so; <code>false</code> otherwise
1366 */
1367 public Boolean isSupportsMultipleTransactions() {
1368 return supportsMultipleTransactions;
1369 }
1370
1371 /**
1372 * Sets whether this database allows having multiple transactions open at once (on different connections).
1373 *
1374 * @param supportsMultipleTransactions <code>true</code> if so; <code>false</code> otherwise
1375 */
1376 public void setSupportsMultipleTransactions( Boolean supportsMultipleTransactions ) {
1377 this.supportsMultipleTransactions = supportsMultipleTransactions;
1378 }
1379
1380 /**
1381 * Retrieves whether columns in this database may be defined as non-nullable.
1382 *
1383 * @return <code>true</code> if so; <code>false</code> otherwise
1384 */
1385 public Boolean isSupportsNonNullableColumns() {
1386 return supportsNonNullableColumns;
1387 }
1388
1389 /**
1390 * Sets whether columns in this database may be defined as non-nullable.
1391 *
1392 * @param supportsNonNullableColumns <code>true</code> if so; <code>false</code> otherwise
1393 */
1394 public void setSupportsNonNullableColumns( Boolean supportsNonNullableColumns ) {
1395 this.supportsNonNullableColumns = supportsNonNullableColumns;
1396 }
1397
1398 /**
1399 * Retrieves whether this database supports the ODBC Minimum SQL grammar.
1400 *
1401 * @return <code>true</code> if so; <code>false</code> otherwise
1402 */
1403 public Boolean isSupportsMinimumSQLGrammar() {
1404 return supportsMinimumSQLGrammar;
1405 }
1406
1407 /**
1408 * Sets whether this database supports the ODBC Minimum SQL grammar.
1409 *
1410 * @param supportsMinimumSQLGrammar <code>true</code> if so; <code>false</code> otherwise
1411 */
1412 public void setSupportsMinimumSQLGrammar( Boolean supportsMinimumSQLGrammar ) {
1413 this.supportsMinimumSQLGrammar = supportsMinimumSQLGrammar;
1414 }
1415
1416 /**
1417 * Retrieves whether this database supports the ODBC Core SQL grammar.
1418 *
1419 * @return <code>true</code> if so; <code>false</code> otherwise
1420 */
1421 public Boolean isSupportsCoreSQLGrammar() {
1422 return supportsCoreSQLGrammar;
1423 }
1424
1425 /**
1426 * Sets whether this database supports the ODBC Core SQL grammar.
1427 *
1428 * @param supportsCoreSQLGrammar <code>true</code> if so; <code>false</code> otherwise
1429 */
1430 public void setSupportsCoreSQLGrammar( Boolean supportsCoreSQLGrammar ) {
1431 this.supportsCoreSQLGrammar = supportsCoreSQLGrammar;
1432 }
1433
1434 /**
1435 * Retrieves whether this database supports the ODBC Extended SQL grammar.
1436 *
1437 * @return <code>true</code> if so; <code>false</code> otherwise
1438 */
1439 public Boolean isSupportsExtendedSQLGrammar() {
1440 return supportsExtendedSQLGrammar;
1441 }
1442
1443 /**
1444 * Sets whether this database supports the ODBC Extended SQL grammar.
1445 *
1446 * @param supportsExtendedSQLGrammar <code>true</code> if so; <code>false</code> otherwise
1447 */
1448 public void setSupportsExtendedSQLGrammar( Boolean supportsExtendedSQLGrammar ) {
1449 this.supportsExtendedSQLGrammar = supportsExtendedSQLGrammar;
1450 }
1451
1452 /**
1453 * Retrieves whether this database supports the ANSI92 entry level SQL grammar.
1454 *
1455 * @return <code>true</code> if so; <code>false</code> otherwise
1456 */
1457 public Boolean isSupportsANSI92EntryLevelSQL() {
1458 return supportsANSI92EntryLevelSQL;
1459 }
1460
1461 /**
1462 * Sets whether this database supports the ANSI92 entry level SQL grammar.
1463 *
1464 * @param supportsANSI92EntryLevelSQL <code>true</code> if so; <code>false</code> otherwise
1465 */
1466 public void setSupportsANSI92EntryLevelSQL( Boolean supportsANSI92EntryLevelSQL ) {
1467 this.supportsANSI92EntryLevelSQL = supportsANSI92EntryLevelSQL;
1468 }
1469
1470 /**
1471 * Retrieves whether this database supports the ANSI92 intermediate SQL grammar supported.
1472 *
1473 * @return <code>true</code> if so; <code>false</code> otherwise
1474 */
1475 public Boolean isSupportsANSI92IntermediateSQL() {
1476 return supportsANSI92IntermediateSQL;
1477 }
1478
1479 /**
1480 * Sets whether this database supports the ANSI92 intermediate SQL grammar supported.
1481 *
1482 * @param supportsANSI92IntermediateSQL <code>true</code> if so; <code>false</code> otherwise
1483 */
1484 public void setSupportsANSI92IntermediateSQL( Boolean supportsANSI92IntermediateSQL ) {
1485 this.supportsANSI92IntermediateSQL = supportsANSI92IntermediateSQL;
1486 }
1487
1488 /**
1489 * Retrieves whether this database supports the ANSI92 full SQL grammar supported.
1490 *
1491 * @return <code>true</code> if so; <code>false</code> otherwise
1492 */
1493 public Boolean isSupportsANSI92FullSQL() {
1494 return supportsANSI92FullSQL;
1495 }
1496
1497 /**
1498 * Sets whether this database supports the ANSI92 full SQL grammar supported.
1499 *
1500 * @param supportsANSI92FullSQL <code>true</code> if so; <code>false</code> otherwise
1501 */
1502 public void setSupportsANSI92FullSQL( Boolean supportsANSI92FullSQL ) {
1503 this.supportsANSI92FullSQL = supportsANSI92FullSQL;
1504 }
1505
1506 /**
1507 * Retrieves whether this database supports the SQL Integrity Enhancement Facility.
1508 *
1509 * @return <code>true</code> if so; <code>false</code> otherwise
1510 */
1511 public Boolean isSupportsIntegrityEnhancementFacility() {
1512 return supportsIntegrityEnhancementFacility;
1513 }
1514
1515 /**
1516 * Sets whether this database supports the SQL Integrity Enhancement Facility.
1517 *
1518 * @param supportsIntegrityEnhancementFacility <code>true</code> if so; <code>false</code> otherwise
1519 */
1520 public void setSupportsIntegrityEnhancementFacility( Boolean supportsIntegrityEnhancementFacility ) {
1521 this.supportsIntegrityEnhancementFacility = supportsIntegrityEnhancementFacility;
1522 }
1523
1524 /**
1525 * Retrieves whether this database supports some form of outer join.
1526 *
1527 * @return <code>true</code> if so; <code>false</code> otherwise
1528 */
1529 public Boolean isSupportsOuterJoins() {
1530 return supportsOuterJoins;
1531 }
1532
1533 /**
1534 * Sets whether this database supports some form of outer join.
1535 *
1536 * @param supportsOuterJoins <code>true</code> if so; <code>false</code> otherwise
1537 */
1538 public void setSupportsOuterJoins( Boolean supportsOuterJoins ) {
1539 this.supportsOuterJoins = supportsOuterJoins;
1540 }
1541
1542 /**
1543 * Retrieves whether this database supports full nested outer joins.
1544 *
1545 * @return <code>true</code> if so; <code>false</code> otherwise
1546 */
1547 public Boolean isSupportsFullOuterJoins() {
1548 return supportsFullOuterJoins;
1549 }
1550
1551 /**
1552 * Sets whether this database supports full nested outer joins.
1553 *
1554 * @param supportsFullOuterJoins <code>true</code> if so; <code>false</code> otherwise
1555 */
1556 public void setSupportsFullOuterJoins( Boolean supportsFullOuterJoins ) {
1557 this.supportsFullOuterJoins = supportsFullOuterJoins;
1558 }
1559
1560 /**
1561 * Retrieves whether this database provides limited support for outer joins. (This will be <code>true</code> if the method
1562 * <code>DatabaseMetaData.supportsFullOuterJoins</code> returns <code>true</code>).
1563 *
1564 * @return <code>true</code> if so; <code>false</code> otherwise
1565 */
1566 public Boolean isSupportsLimitedOuterJoins() {
1567 return supportsLimitedOuterJoins;
1568 }
1569
1570 /**
1571 * Sets whether this database provides limited support for outer joins. (This will be <code>true</code> if the method
1572 * <code>DatabaseMetaData.supportsFullOuterJoins</code> returns <code>true</code>).
1573 *
1574 * @param supportsLimitedOuterJoins <code>true</code> if so; <code>false</code> otherwise
1575 */
1576 public void setSupportsLimitedOuterJoins( Boolean supportsLimitedOuterJoins ) {
1577 this.supportsLimitedOuterJoins = supportsLimitedOuterJoins;
1578 }
1579
1580 /**
1581 * Retrieves the database vendor's preferred term for "schema".
1582 *
1583 * @return the vendor term for "schema"
1584 */
1585 public String getSchemaTerm() {
1586 return schemaTerm;
1587 }
1588
1589 /**
1590 * Sets the database vendor's preferred term for "schema".
1591 *
1592 * @param schemaTerm the vendor term for "schema"
1593 */
1594 public void setSchemaTerm( String schemaTerm ) {
1595 this.schemaTerm = schemaTerm;
1596 }
1597
1598 /**
1599 * Retrieves the database vendor's preferred term for "procedure".
1600 *
1601 * @return the vendor term for "procedure"
1602 */
1603 public String getProcedureTerm() {
1604 return procedureTerm;
1605 }
1606
1607 /**
1608 * Sets the database vendor's preferred term for "procedure".
1609 *
1610 * @param procedureTerm the vendor term for "procedure"
1611 */
1612 public void setProcedureTerm( String procedureTerm ) {
1613 this.procedureTerm = procedureTerm;
1614 }
1615
1616 /**
1617 * Retrieves the database vendor's preferred term for "catalog".
1618 *
1619 * @return the vendor term for "catalog"
1620 */
1621 public String getCatalogTerm() {
1622 return catalogTerm;
1623 }
1624
1625 /**
1626 * Sets the database vendor's preferred term for "catalog".
1627 *
1628 * @param catalogTerm the vendor term for "catalog"
1629 */
1630 public void setCatalogTerm( String catalogTerm ) {
1631 this.catalogTerm = catalogTerm;
1632 }
1633
1634 /**
1635 * Retrieves whether a catalog appears at the start of a fully qualified table name. If not, the catalog appears at the end.
1636 *
1637 * @return <code>true</code> if the catalog name appears at the beginning of a fully qualified table name; <code>false</code>
1638 * otherwise
1639 */
1640 public Boolean isCatalogAtStart() {
1641 return catalogAtStart;
1642 }
1643
1644 /**
1645 * Sets whether a catalog appears at the start of a fully qualified table name. If not, the catalog appears at the end.
1646 *
1647 * @param catalogAtStart <code>true</code> if the catalog name appears at the beginning of a fully qualified table name;
1648 * <code>false</code> otherwise
1649 */
1650 public void setCatalogAtStart( Boolean catalogAtStart ) {
1651 this.catalogAtStart = catalogAtStart;
1652 }
1653
1654 /**
1655 * Retrieves the <code>String</code> that this database uses as the separator between a catalog and table name.
1656 *
1657 * @return the separator string
1658 */
1659 public String getCatalogSeparator() {
1660 return catalogSeparator;
1661 }
1662
1663 /**
1664 * Sets the <code>String</code> that this database uses as the separator between a catalog and table name.
1665 *
1666 * @param catalogSeparator the separator string
1667 */
1668 public void setCatalogSeparator( String catalogSeparator ) {
1669 this.catalogSeparator = catalogSeparator;
1670 }
1671
1672 /**
1673 * Retrieves whether a schema name can be used in a data manipulation statement.
1674 *
1675 * @return <code>true</code> if so; <code>false</code> otherwise
1676 */
1677 public Boolean isSupportsSchemasInDataManipulation() {
1678 return supportsSchemasInDataManipulation;
1679 }
1680
1681 /**
1682 * Sets whether a schema name can be used in a data manipulation statement.
1683 *
1684 * @param supportsSchemasInDataManipulation <code>true</code> if so; <code>false</code> otherwise
1685 */
1686 public void setSupportsSchemasInDataManipulation( Boolean supportsSchemasInDataManipulation ) {
1687 this.supportsSchemasInDataManipulation = supportsSchemasInDataManipulation;
1688 }
1689
1690 /**
1691 * Retrieves whether a schema name can be used in a procedure call statement.
1692 *
1693 * @return <code>true</code> if so; <code>false</code> otherwise
1694 */
1695 public Boolean isSupportsSchemasInProcedureCalls() {
1696 return supportsSchemasInProcedureCalls;
1697 }
1698
1699 /**
1700 * Sets whether a schema name can be used in a procedure call statement.
1701 *
1702 * @param supportsSchemasInProcedureCalls <code>true</code> if so; <code>false</code> otherwise
1703 */
1704 public void setSupportsSchemasInProcedureCalls( Boolean supportsSchemasInProcedureCalls ) {
1705 this.supportsSchemasInProcedureCalls = supportsSchemasInProcedureCalls;
1706 }
1707
1708 /**
1709 * Retrieves whether a schema name can be used in a table definition statement.
1710 *
1711 * @return <code>true</code> if so; <code>false</code> otherwise
1712 */
1713 public Boolean isSupportsSchemasInTableDefinitions() {
1714 return supportsSchemasInTableDefinitions;
1715 }
1716
1717 /**
1718 * Sets whether a schema name can be used in a table definition statement.
1719 *
1720 * @param supportsSchemasInTableDefinitions <code>true</code> if so; <code>false</code> otherwise
1721 */
1722 public void setSupportsSchemasInTableDefinitions( Boolean supportsSchemasInTableDefinitions ) {
1723 this.supportsSchemasInTableDefinitions = supportsSchemasInTableDefinitions;
1724 }
1725
1726 /**
1727 * Retrieves whether a schema name can be used in an index definition statement.
1728 *
1729 * @return <code>true</code> if so; <code>false</code> otherwise
1730 */
1731 public Boolean isSupportsSchemasInIndexDefinitions() {
1732 return supportsSchemasInIndexDefinitions;
1733 }
1734
1735 /**
1736 * Sets whether a schema name can be used in an index definition statement.
1737 *
1738 * @param supportsSchemasInIndexDefinitions <code>true</code> if so; <code>false</code> otherwise
1739 */
1740 public void setSupportsSchemasInIndexDefinitions( Boolean supportsSchemasInIndexDefinitions ) {
1741 this.supportsSchemasInIndexDefinitions = supportsSchemasInIndexDefinitions;
1742 }
1743
1744 /**
1745 * Retrieves whether a schema name can be used in a privilege definition statement.
1746 *
1747 * @return <code>true</code> if so; <code>false</code> otherwise
1748 */
1749 public Boolean isSupportsSchemasInPrivilegeDefinitions() {
1750 return supportsSchemasInPrivilegeDefinitions;
1751 }
1752
1753 /**
1754 * Sets whether a schema name can be used in a privilege definition statement.
1755 *
1756 * @param supportsSchemasInPrivilegeDefinitions <code>true</code> if so; <code>false</code> otherwise
1757 */
1758 public void setSupportsSchemasInPrivilegeDefinitions( Boolean supportsSchemasInPrivilegeDefinitions ) {
1759 this.supportsSchemasInPrivilegeDefinitions = supportsSchemasInPrivilegeDefinitions;
1760 }
1761
1762 /**
1763 * Retrieves whether a catalog name can be used in a data manipulation statement.
1764 *
1765 * @return <code>true</code> if so; <code>false</code> otherwise
1766 */
1767 public Boolean isSupportsCatalogsInDataManipulation() {
1768 return supportsCatalogsInDataManipulation;
1769 }
1770
1771 /**
1772 * Sets whether a catalog name can be used in a data manipulation statement.
1773 *
1774 * @param supportsCatalogsInDataManipulation <code>true</code> if so; <code>false</code> otherwise
1775 */
1776 public void setSupportsCatalogsInDataManipulation( Boolean supportsCatalogsInDataManipulation ) {
1777 this.supportsCatalogsInDataManipulation = supportsCatalogsInDataManipulation;
1778 }
1779
1780 /**
1781 * Retrieves whether a catalog name can be used in a procedure call statement.
1782 *
1783 * @return <code>true</code> if so; <code>false</code> otherwise
1784 */
1785 public Boolean isSupportsCatalogsInProcedureCalls() {
1786 return supportsCatalogsInProcedureCalls;
1787 }
1788
1789 /**
1790 * Sets whether a catalog name can be used in a procedure call statement.
1791 *
1792 * @param supportsCatalogsInProcedureCalls <code>true</code> if so; <code>false</code> otherwise
1793 */
1794 public void setSupportsCatalogsInProcedureCalls( Boolean supportsCatalogsInProcedureCalls ) {
1795 this.supportsCatalogsInProcedureCalls = supportsCatalogsInProcedureCalls;
1796 }
1797
1798 /**
1799 * Retrieves whether a catalog name can be used in a table definition statement.
1800 *
1801 * @return <code>true</code> if so; <code>false</code> otherwise
1802 */
1803 public Boolean isSupportsCatalogsInTableDefinitions() {
1804 return supportsCatalogsInTableDefinitions;
1805 }
1806
1807 /**
1808 * Sets whether a catalog name can be used in a table definition statement.
1809 *
1810 * @param supportsCatalogsInTableDefinitions <code>true</code> if so; <code>false</code> otherwise
1811 */
1812 public void setSupportsCatalogsInTableDefinitions( Boolean supportsCatalogsInTableDefinitions ) {
1813 this.supportsCatalogsInTableDefinitions = supportsCatalogsInTableDefinitions;
1814 }
1815
1816 /**
1817 * Retrieves whether a catalog name can be used in an index definition statement.
1818 *
1819 * @return <code>true</code> if so; <code>false</code> otherwise
1820 */
1821 public Boolean isSupportsCatalogsInIndexDefinitions() {
1822 return supportsCatalogsInIndexDefinitions;
1823 }
1824
1825 /**
1826 * Sets whether a catalog name can be used in an index definition statement.
1827 *
1828 * @param supportsCatalogsInIndexDefinitions <code>true</code> if so; <code>false</code> otherwise
1829 *
1830 */
1831 public void setSupportsCatalogsInIndexDefinitions( Boolean supportsCatalogsInIndexDefinitions ) {
1832 this.supportsCatalogsInIndexDefinitions = supportsCatalogsInIndexDefinitions;
1833 }
1834
1835 /**
1836 * Retrieves whether a catalog name can be used in a privilege definition statement.
1837 *
1838 * @return <code>true</code> if so; <code>false</code> otherwise
1839 */
1840 public Boolean isSupportsCatalogsInPrivilegeDefinitions() {
1841 return supportsCatalogsInPrivilegeDefinitions;
1842 }
1843
1844 /**
1845 * Sets whether a catalog name can be used in a privilege definition statement.
1846 *
1847 * @param supportsCatalogsInPrivilegeDefinitions <code>true</code> if so; <code>false</code> otherwise
1848 */
1849 public void setSupportsCatalogsInPrivilegeDefinitions( Boolean supportsCatalogsInPrivilegeDefinitions ) {
1850 this.supportsCatalogsInPrivilegeDefinitions = supportsCatalogsInPrivilegeDefinitions;
1851 }
1852
1853 /**
1854 * Retrieves whether this database supports positioned <code>DELETE</code> statements.
1855 *
1856 * @return <code>true</code> if so; <code>false</code> otherwise
1857 */
1858 public Boolean isSupportsPositionedDelete() {
1859 return supportsPositionedDelete;
1860 }
1861
1862 /**
1863 * Sets whether this database supports positioned <code>DELETE</code> statements.
1864 *
1865 * @param supportsPositionedDelete <code>true</code> if so; <code>false</code> otherwise
1866 */
1867 public void setSupportsPositionedDelete( Boolean supportsPositionedDelete ) {
1868 this.supportsPositionedDelete = supportsPositionedDelete;
1869 }
1870
1871 /**
1872 * Retrieves whether this database supports positioned <code>UPDATE</code> statements.
1873 *
1874 * @return <code>true</code> if so; <code>false</code> otherwise
1875 */
1876 public Boolean isSupportsPositionedUpdate() {
1877 return supportsPositionedUpdate;
1878 }
1879
1880 /**
1881 * Sets whether this database supports positioned <code>UPDATE</code> statements.
1882 *
1883 * @param supportsPositionedUpdate <code>true</code> if so; <code>false</code> otherwise
1884 */
1885 public void setSupportsPositionedUpdate( Boolean supportsPositionedUpdate ) {
1886 this.supportsPositionedUpdate = supportsPositionedUpdate;
1887 }
1888
1889 /**
1890 * Retrieves whether this database supports <code>SELECT FOR UPDATE</code> statements.
1891 *
1892 * @return <code>true</code> if so; <code>false</code> otherwise
1893 */
1894 public Boolean isSupportsSelectForUpdate() {
1895 return supportsSelectForUpdate;
1896 }
1897
1898 /**
1899 * Sets whether this database supports <code>SELECT FOR UPDATE</code> statements.
1900 *
1901 * @param supportsSelectForUpdate <code>true</code> if so; <code>false</code> otherwise
1902 */
1903 public void setSupportsSelectForUpdate( Boolean supportsSelectForUpdate ) {
1904 this.supportsSelectForUpdate = supportsSelectForUpdate;
1905 }
1906
1907 /**
1908 * Retrieves whether this database supports stored procedure calls that use the stored procedure escape syntax.
1909 *
1910 * @return <code>true</code> if so; <code>false</code> otherwise
1911 */
1912 public Boolean isSupportsStoredProcedures() {
1913 return supportsStoredProcedures;
1914 }
1915
1916 /**
1917 * Sets whether this database supports stored procedure calls that use the stored procedure escape syntax.
1918 *
1919 * @param supportsStoredProcedures <code>true</code> if so; <code>false</code> otherwise
1920 */
1921 public void setSupportsStoredProcedures( Boolean supportsStoredProcedures ) {
1922 this.supportsStoredProcedures = supportsStoredProcedures;
1923 }
1924
1925 /**
1926 * Retrieves whether this database supports subqueries in comparison expressions.
1927 *
1928 * @return <code>true</code> if so; <code>false</code> otherwise
1929 */
1930 public Boolean isSupportsSubqueriesInComparisons() {
1931 return supportsSubqueriesInComparisons;
1932 }
1933
1934 /**
1935 * Retrieves whether this database supports subqueries in comparison expressions.
1936 *
1937 * @param supportsSubqueriesInComparisons <code>true</code> if so; <code>false</code> otherwise
1938 */
1939 public void setSupportsSubqueriesInComparisons( Boolean supportsSubqueriesInComparisons ) {
1940 this.supportsSubqueriesInComparisons = supportsSubqueriesInComparisons;
1941 }
1942
1943 /**
1944 * Retrieves whether this database supports subqueries in <code>EXISTS</code> expressions.
1945 *
1946 * @return <code>true</code> if so; <code>false</code> otherwise
1947 */
1948 public Boolean isSupportsSubqueriesInExists() {
1949 return supportsSubqueriesInExists;
1950 }
1951
1952 /**
1953 * Sets whether this database supports subqueries in <code>EXISTS</code> expressions.
1954 *
1955 * @param supportsSubqueriesInExists <code>true</code> if so; <code>false</code> otherwise
1956 */
1957 public void setSupportsSubqueriesInExists( Boolean supportsSubqueriesInExists ) {
1958 this.supportsSubqueriesInExists = supportsSubqueriesInExists;
1959 }
1960
1961 /**
1962 * Retrieves whether this database supports subqueries in <code>IN</code> statements.
1963 *
1964 * @return <code>true</code> if so; <code>false</code> otherwise
1965 */
1966 public Boolean isSupportsSubqueriesInIns() {
1967 return supportsSubqueriesInIns;
1968 }
1969
1970 /**
1971 * Sets whether this database supports subqueries in <code>IN</code> statements.
1972 *
1973 * @param supportsSubqueriesInIns <code>true</code> if so; <code>false</code> otherwise
1974 */
1975 public void setSupportsSubqueriesInIns( Boolean supportsSubqueriesInIns ) {
1976 this.supportsSubqueriesInIns = supportsSubqueriesInIns;
1977 }
1978
1979 /**
1980 * Retrieves whether this database supports subqueries in quantified expressions.
1981 *
1982 * @return <code>true</code> if so; <code>false</code> otherwise
1983 */
1984 public Boolean isSupportsSubqueriesInQuantifieds() {
1985 return supportsSubqueriesInQuantifieds;
1986 }
1987
1988 /**
1989 * Sets whether this database supports subqueries in quantified expressions.
1990 *
1991 * @param supportsSubqueriesInQuantifieds <code>true</code> if so; <code>false</code> otherwise
1992 */
1993 public void setSupportsSubqueriesInQuantifieds( Boolean supportsSubqueriesInQuantifieds ) {
1994 this.supportsSubqueriesInQuantifieds = supportsSubqueriesInQuantifieds;
1995 }
1996
1997 /**
1998 * Retrieves whether this database supports correlated subqueries.
1999 *
2000 * @return <code>true</code> if so; <code>false</code> otherwise
2001 */
2002 public Boolean isSupportsCorrelatedSubqueries() {
2003 return supportsCorrelatedSubqueries;
2004 }
2005
2006 /**
2007 * Sets whether this database supports correlated subqueries.
2008 *
2009 * @param supportsCorrelatedSubqueries <code>true</code> if so; <code>false</code> otherwise
2010 */
2011 public void setSupportsCorrelatedSubqueries( Boolean supportsCorrelatedSubqueries ) {
2012 this.supportsCorrelatedSubqueries = supportsCorrelatedSubqueries;
2013 }
2014
2015 /**
2016 * Retrieves whether this database supports SQL <code>UNION</code>.
2017 *
2018 * @return <code>true</code> if so; <code>false</code> otherwise
2019 */
2020 public Boolean isSupportsUnion() {
2021 return supportsUnion;
2022 }
2023
2024 /**
2025 * Sets whether this database supports SQL <code>UNION</code>.
2026 *
2027 * @param supportsUnion <code>true</code> if so; <code>false</code> otherwise
2028 */
2029 public void setSupportsUnion( Boolean supportsUnion ) {
2030 this.supportsUnion = supportsUnion;
2031 }
2032
2033 /**
2034 * Retrieves whether this database supports SQL <code>UNION ALL</code>.
2035 *
2036 * @return <code>true</code> if so; <code>false</code> otherwise
2037 */
2038 public Boolean isSupportsUnionAll() {
2039 return supportsUnionAll;
2040 }
2041
2042 /**
2043 * Sets whether this database supports SQL <code>UNION ALL</code>.
2044 *
2045 * @param supportsUnionAll <code>true</code> if so; <code>false</code> otherwise
2046 */
2047 public void setSupportsUnionAll( Boolean supportsUnionAll ) {
2048 this.supportsUnionAll = supportsUnionAll;
2049 }
2050
2051 /**
2052 * Retrieves whether this database supports keeping cursors open across commits.
2053 *
2054 * @return <code>true</code> if cursors always remain open; <code>false</code> if they might not remain open
2055 */
2056 public Boolean isSupportsOpenCursorsAcrossCommit() {
2057 return supportsOpenCursorsAcrossCommit;
2058 }
2059
2060 /**
2061 * Sets whether this database supports keeping cursors open across commits.
2062 *
2063 * @param supportsOpenCursorsAcrossCommit <code>true</code> if cursors always remain open; <code>false</code> if they might
2064 * not remain open
2065 */
2066 public void setSupportsOpenCursorsAcrossCommit( Boolean supportsOpenCursorsAcrossCommit ) {
2067 this.supportsOpenCursorsAcrossCommit = supportsOpenCursorsAcrossCommit;
2068 }
2069
2070 /**
2071 * Retrieves whether this database supports keeping cursors open across rollbacks.
2072 *
2073 * @return <code>true</code> if cursors always remain open; <code>false</code> if they might not remain open
2074 */
2075 public Boolean isSupportsOpenCursorsAcrossRollback() {
2076 return supportsOpenCursorsAcrossRollback;
2077 }
2078
2079 /**
2080 * Sets whether this database supports keeping cursors open across rollbacks.
2081 *
2082 * @param supportsOpenCursorsAcrossRollback <code>true</code> if cursors always remain open; <code>false</code> if they might
2083 * not remain open
2084 */
2085 public void setSupportsOpenCursorsAcrossRollback( Boolean supportsOpenCursorsAcrossRollback ) {
2086 this.supportsOpenCursorsAcrossRollback = supportsOpenCursorsAcrossRollback;
2087 }
2088
2089 /**
2090 * Retrieves whether this database supports keeping statements open across commits.
2091 *
2092 * @return <code>true</code> if statements always remain open; <code>false</code> if they might not remain open
2093 */
2094 public Boolean isSupportsOpenStatementsAcrossCommit() {
2095 return supportsOpenStatementsAcrossCommit;
2096 }
2097
2098 /**
2099 * sets whether this database supports keeping statements open across commits.
2100 *
2101 * @param supportsOpenStatementsAcrossCommit <code>true</code> if statements always remain open; <code>false</code> if they
2102 * might not remain open
2103 */
2104 public void setSupportsOpenStatementsAcrossCommit( Boolean supportsOpenStatementsAcrossCommit ) {
2105 this.supportsOpenStatementsAcrossCommit = supportsOpenStatementsAcrossCommit;
2106 }
2107
2108 /**
2109 * Retrieves whether this database supports keeping statements open across rollbacks.
2110 *
2111 * @return <code>true</code> if statements always remain open; <code>false</code> if they might not remain open
2112 */
2113 public Boolean isSupportsOpenStatementsAcrossRollback() {
2114 return supportsOpenStatementsAcrossRollback;
2115 }
2116
2117 /**
2118 * Sets whether this database supports keeping statements open across rollbacks.
2119 *
2120 * @param supportsOpenStatementsAcrossRollback <code>true</code> if statements always remain open; <code>false</code> if they
2121 * might not remain open
2122 */
2123 public void setSupportsOpenStatementsAcrossRollback( Boolean supportsOpenStatementsAcrossRollback ) {
2124 this.supportsOpenStatementsAcrossRollback = supportsOpenStatementsAcrossRollback;
2125 }
2126
2127 // ----------------------------------------------------------------------
2128 // The following group of methods exposes various limitations based on the target
2129 // database with the current driver. Unless otherwise specified, a result of zero
2130 // means there is no limit, or the limit is not known.
2131 // ----------------------------------------------------------------------
2132
2133 /**
2134 * Retrieves the maximum number of hex characters this database allows in an inline binary literal.
2135 *
2136 * @return max the maximum length (in hex characters) for a binary literal; a result of zero means that there is no limit or
2137 * the limit is not known
2138 */
2139 public Integer getMaxBinaryLiteralLength() {
2140 return maxBinaryLiteralLength;
2141 }
2142
2143 /**
2144 * sets the maximum number of hex characters this database allows in an inline binary literal.
2145 *
2146 * @param maxBinaryLiteralLength max the maximum length (in hex characters) for a binary literal; a result of zero means that
2147 * there is no limit or the limit is not known
2148 */
2149 public void setMaxBinaryLiteralLength( Integer maxBinaryLiteralLength ) {
2150 this.maxBinaryLiteralLength = maxBinaryLiteralLength;
2151 }
2152
2153 /**
2154 * Retrieves the maximum number of characters this database allows for a character literal.
2155 *
2156 * @return the maximum number of characters allowed for a character literal; a result of zero means that there is no limit or
2157 * the limit is not known
2158 */
2159 public Integer getMaxCharLiteralLength() {
2160 return maxCharLiteralLength;
2161 }
2162
2163 /**
2164 * Sets the maximum number of characters this database allows for a character literal.
2165 *
2166 * @param maxCharLiteralLength the maximum number of characters allowed for a character literal; a result of zero means that
2167 * there is no limit or the limit is not known
2168 */
2169 public void setMaxCharLiteralLength( Integer maxCharLiteralLength ) {
2170 this.maxCharLiteralLength = maxCharLiteralLength;
2171 }
2172
2173 /**
2174 * Retrieves the maximum number of characters this database allows for a column name.
2175 *
2176 * @return the maximum number of characters allowed for a column name; a result of zero means that there is no limit or the
2177 * limit is not known
2178 */
2179 public Integer getMaxColumnNameLength() {
2180 return maxColumnNameLength;
2181 }
2182
2183 /**
2184 * Sets the maximum number of characters this database allows for a column name.
2185 *
2186 * @param maxColumnNameLength the maximum number of characters allowed for a column name; a result of zero means that there is
2187 * no limit or the limit is not known
2188 */
2189 public void setMaxColumnNameLength( Integer maxColumnNameLength ) {
2190 this.maxColumnNameLength = maxColumnNameLength;
2191 }
2192
2193 /**
2194 * Retrieves the maximum number of columns this database allows in a <code>GROUP BY</code> clause.
2195 *
2196 * @return the maximum number of columns allowed; a result of zero means that there is no limit or the limit is not known
2197 */
2198 public Integer getMaxColumnsInGroupBy() {
2199 return maxColumnsInGroupBy;
2200 }
2201
2202 /**
2203 * Sets the maximum number of columns this database allows in a <code>GROUP BY</code> clause.
2204 *
2205 * @param maxColumnsInGroupBy the maximum number of columns allowed; a result of zero means that there is no limit or the
2206 * limit is not known
2207 */
2208 public void setMaxColumnsInGroupBy( Integer maxColumnsInGroupBy ) {
2209 this.maxColumnsInGroupBy = maxColumnsInGroupBy;
2210 }
2211
2212 /**
2213 * Retrieves the maximum number of columns this database allows in an index.
2214 *
2215 * @return the maximum number of columns allowed; a result of zero means that there is no limit or the limit is not known
2216 */
2217 public Integer getMaxColumnsInIndex() {
2218 return maxColumnsInIndex;
2219 }
2220
2221 /**
2222 * Sets the maximum number of columns this database allows in an index.
2223 *
2224 * @param maxColumnsInIndex the maximum number of columns allowed; a result of zero means that there is no limit or the limit
2225 * is not known
2226 */
2227 public void setMaxColumnsInIndex( Integer maxColumnsInIndex ) {
2228 this.maxColumnsInIndex = maxColumnsInIndex;
2229 }
2230
2231 /**
2232 * Retrieves the maximum number of columns this database allows in an <code>ORDER BY</code> clause.
2233 *
2234 * @return the maximum number of columns allowed; a result of zero means that there is no limit or the limit is not known
2235 */
2236 public Integer getMaxColumnsInOrderBy() {
2237 return maxColumnsInOrderBy;
2238 }
2239
2240 /**
2241 * Sets the maximum number of columns this database allows in an <code>ORDER BY</code> clause.
2242 *
2243 * @param maxColumnsInOrderBy the maximum number of columns allowed; a result of zero means that there is no limit or the
2244 * limit is not known
2245 */
2246 public void setMaxColumnsInOrderBy( Integer maxColumnsInOrderBy ) {
2247 this.maxColumnsInOrderBy = maxColumnsInOrderBy;
2248 }
2249
2250 /**
2251 * Retrieves the maximum number of columns this database allows in a <code>SELECT</code> list.
2252 *
2253 * @return the maximum number of columns allowed; a result of zero means that there is no limit or the limit is not known
2254 */
2255 public Integer getMaxColumnsInSelect() {
2256 return maxColumnsInSelect;
2257 }
2258
2259 /**
2260 * Sets the maximum number of columns this database allows in a <code>SELECT</code> list.
2261 *
2262 * @param maxColumnsInSelect the maximum number of columns allowed; a result of zero means that there is no limit or the limit
2263 * is not known
2264 */
2265 public void setMaxColumnsInSelect( Integer maxColumnsInSelect ) {
2266 this.maxColumnsInSelect = maxColumnsInSelect;
2267 }
2268
2269 /**
2270 * Retrieves the maximum number of columns this database allows in a table.
2271 *
2272 * @return the maximum number of columns allowed; a result of zero means that there is no limit or the limit is not known
2273 */
2274 public Integer getMaxColumnsInTable() {
2275 return maxColumnsInTable;
2276 }
2277
2278 /**
2279 * Sets the maximum number of columns this database allows in a table.
2280 *
2281 * @param maxColumnsInTable the maximum number of columns allowed; a result of zero means that there is no limit or the limit
2282 * is not known
2283 */
2284 public void setMaxColumnsInTable( Integer maxColumnsInTable ) {
2285 this.maxColumnsInTable = maxColumnsInTable;
2286 }
2287
2288 /**
2289 * Retrieves the maximum number of concurrent connections to this database that are possible.
2290 *
2291 * @return the maximum number of active connections possible at one time; a result of zero means that there is no limit or the
2292 * limit is not known
2293 */
2294 public Integer getMaxConnections() {
2295 return maxConnections;
2296 }
2297
2298 /**
2299 * Sets the maximum number of concurrent connections to this database that are possible.
2300 *
2301 * @param maxConnections the maximum number of active connections possible at one time; a result of zero means that there is
2302 * no limit or the limit is not known
2303 */
2304 public void setMaxConnections( Integer maxConnections ) {
2305 this.maxConnections = maxConnections;
2306 }
2307
2308 /**
2309 * Retrieves the maximum number of characters that this database allows in a cursor name.
2310 *
2311 * @return the maximum number of characters allowed in a cursor name; a result of zero means that there is no limit or the
2312 * limit is not known
2313 */
2314 public Integer getMaxCursorNameLength() {
2315 return maxCursorNameLength;
2316 }
2317
2318 /**
2319 * Sets the maximum number of characters that this database allows in a cursor name.
2320 *
2321 * @param maxCursorNameLength the maximum number of characters allowed in a cursor name; a result of zero means that there is
2322 * no limit or the limit is not known
2323 */
2324 public void setMaxCursorNameLength( Integer maxCursorNameLength ) {
2325 this.maxCursorNameLength = maxCursorNameLength;
2326 }
2327
2328 /**
2329 * Retrieves the maximum number of bytes this database allows for an index, including all of the parts of the index.
2330 *
2331 * @return the maximum number of bytes allowed; this limit includes the composite of all the constituent parts of the index; a
2332 * result of zero means that there is no limit or the limit is not known
2333 */
2334 public Integer getMaxIndexLength() {
2335 return maxIndexLength;
2336 }
2337
2338 /**
2339 * Sets the maximum number of bytes this database allows for an index, including all of the parts of the index.
2340 *
2341 * @param maxIndexLength the maximum number of bytes allowed; this limit includes the composite of all the constituent parts
2342 * of the index; a result of zero means that there is no limit or the limit is not known
2343 */
2344 public void setMaxIndexLength( Integer maxIndexLength ) {
2345 this.maxIndexLength = maxIndexLength;
2346 }
2347
2348 /**
2349 * Retrieves the maximum number of characters that this database allows in a schema name.
2350 *
2351 * @return the maximum number of characters allowed in a schema name; a result of zero means that there is no limit or the
2352 * limit is not known
2353 */
2354 public Integer getMaxSchemaNameLength() {
2355 return maxSchemaNameLength;
2356 }
2357
2358 /**
2359 * Sets the maximum number of characters that this database allows in a schema name.
2360 *
2361 * @param maxSchemaNameLength the maximum number of characters allowed in a schema name; a result of zero means that there is
2362 * no limit or the limit is not known
2363 */
2364 public void setMaxSchemaNameLength( Integer maxSchemaNameLength ) {
2365 this.maxSchemaNameLength = maxSchemaNameLength;
2366 }
2367
2368 /**
2369 * Retrieves the maximum number of characters that this database allows in a procedure name.
2370 *
2371 * @return the maximum number of characters allowed in a procedure name; a result of zero means that there is no limit or the
2372 * limit is not known
2373 */
2374 public Integer getMaxProcedureNameLength() {
2375 return maxProcedureNameLength;
2376 }
2377
2378 /**
2379 * Sets the maximum number of characters that this database allows in a procedure name.
2380 *
2381 * @param maxProcedureNameLength the maximum number of characters allowed in a procedure name; a result of zero means that
2382 * there is no limit or the limit is not known
2383 */
2384 public void setMaxProcedureNameLength( Integer maxProcedureNameLength ) {
2385 this.maxProcedureNameLength = maxProcedureNameLength;
2386 }
2387
2388 /**
2389 * Retrieves the maximum number of characters that this database allows in a catalog name.
2390 *
2391 * @return the maximum number of characters allowed in a catalog name; a result of zero means that there is no limit or the
2392 * limit is not known
2393 */
2394 public Integer getMaxCatalogNameLength() {
2395 return maxCatalogNameLength;
2396 }
2397
2398 /**
2399 * Sets the maximum number of characters that this database allows in a catalog name.
2400 *
2401 * @param maxCatalogNameLength the maximum number of characters allowed in a catalog name; a result of zero means that there
2402 * is no limit or the limit is not known
2403 */
2404 public void setMaxCatalogNameLength( Integer maxCatalogNameLength ) {
2405 this.maxCatalogNameLength = maxCatalogNameLength;
2406 }
2407
2408 /**
2409 * Retrieves the maximum number of bytes this database allows in a single row.
2410 *
2411 * @return the maximum number of bytes allowed for a row; a result of zero means that there is no limit or the limit is not
2412 * known
2413 */
2414 public Integer getMaxRowSize() {
2415 return maxRowSize;
2416 }
2417
2418 /**
2419 * Sets the maximum number of bytes this database allows in a single row.
2420 *
2421 * @param maxRowSize the maximum number of bytes allowed for a row; a result of zero means that there is no limit or the limit
2422 * is not known
2423 */
2424 public void setMaxRowSize( Integer maxRowSize ) {
2425 this.maxRowSize = maxRowSize;
2426 }
2427
2428 /**
2429 * Retrieves whether the return value for the method <code>getMaxRowSize</code> includes the SQL data types
2430 * <code>LONGVARCHAR</code> and <code>LONGVARBINARY</code>.
2431 *
2432 * @return <code>true</code> if so; <code>false</code> otherwise
2433 */
2434 public Boolean isMaxRowSizeIncludeBlobs() {
2435 return maxRowSizeIncludeBlobs;
2436 }
2437
2438 /**
2439 * Sets whether the return value for the method <code>getMaxRowSize</code> includes the SQL data types
2440 * <code>LONGVARCHAR</code> and <code>LONGVARBINARY</code>.
2441 *
2442 * @param maxRowSizeIncludeBlobs <code>true</code> if so; <code>false</code> otherwise
2443 */
2444 public void setMaxRowSizeIncludeBlobs( Boolean maxRowSizeIncludeBlobs ) {
2445 this.maxRowSizeIncludeBlobs = maxRowSizeIncludeBlobs;
2446 }
2447
2448 /**
2449 * Retrieves the maximum number of characters this database allows in an SQL statement.
2450 *
2451 * @return the maximum number of characters allowed for an SQL statement; a result of zero means that there is no limit or the
2452 * limit is not known
2453 */
2454 public Integer getMaxStatementLength() {
2455 return maxStatementLength;
2456 }
2457
2458 /**
2459 * Sets the maximum number of characters this database allows in an SQL statement.
2460 *
2461 * @param maxStatementLength the maximum number of characters allowed for an SQL statement; a result of zero means that there
2462 * is no limit or the limit is not known
2463 */
2464 public void setMaxStatementLength( Integer maxStatementLength ) {
2465 this.maxStatementLength = maxStatementLength;
2466 }
2467
2468 /**
2469 * Retrieves the maximum number of active statements to this database that can be open at the same time.
2470 *
2471 * @return the maximum number of statements that can be open at one time; a result of zero means that there is no limit or the
2472 * limit is not known
2473 */
2474 public Integer getMaxStatements() {
2475 return maxStatements;
2476 }
2477
2478 /**
2479 * Sets the maximum number of active statements to this database that can be open at the same time.
2480 *
2481 * @param maxStatements the maximum number of statements that can be open at one time; a result of zero means that there is no
2482 * limit or the limit is not known
2483 */
2484 public void setMaxStatements( Integer maxStatements ) {
2485 this.maxStatements = maxStatements;
2486 }
2487
2488 /**
2489 * Retrieves the maximum number of characters this database allows in a table name.
2490 *
2491 * @return the maximum number of characters allowed for a table name; a result of zero means that there is no limit or the
2492 * limit is not known
2493 */
2494 public Integer getMaxTableNameLength() {
2495 return maxTableNameLength;
2496 }
2497
2498 /**
2499 * Sets the maximum number of characters this database allows in a table name.
2500 *
2501 * @param maxTableNameLength the maximum number of characters allowed for a table name; a result of zero means that there is
2502 * no limit or the limit is not known
2503 */
2504 public void setMaxTableNameLength( Integer maxTableNameLength ) {
2505 this.maxTableNameLength = maxTableNameLength;
2506 }
2507
2508 /**
2509 * Retrieves the maximum number of tables this database allows in a <code>SELECT</code> statement.
2510 *
2511 * @return the maximum number of tables allowed in a <code>SELECT</code> statement; a result of zero means that there is no
2512 * limit or the limit is not known
2513 */
2514 public Integer getMaxTablesInSelect() {
2515 return maxTablesInSelect;
2516 }
2517
2518 /**
2519 * Sets the maximum number of tables this database allows in a <code>SELECT</code> statement.
2520 *
2521 * @param maxTablesInSelect the maximum number of tables allowed in a <code>SELECT</code> statement; a result of zero means
2522 * that there is no limit or the limit is not known
2523 */
2524 public void setMaxTablesInSelect( Integer maxTablesInSelect ) {
2525 this.maxTablesInSelect = maxTablesInSelect;
2526 }
2527
2528 /**
2529 * Retrieves the maximum number of characters this database allows in a user name.
2530 *
2531 * @return the maximum number of characters allowed for a user name; a result of zero means that there is no limit or the
2532 * limit is not known
2533 */
2534 public Integer getMaxUserNameLength() {
2535 return maxUserNameLength;
2536 }
2537
2538 /**
2539 * Sets the maximum number of characters this database allows in a user name.
2540 *
2541 * @param maxUserNameLength the maximum number of characters allowed for a user name; a result of zero means that there is no
2542 * limit or the limit is not known
2543 */
2544 public void setMaxUserNameLength( Integer maxUserNameLength ) {
2545 this.maxUserNameLength = maxUserNameLength;
2546 }
2547
2548 /**
2549 * Retrieves this database's default transaction isolation level. The possible values are defined in
2550 * <code>java.sql.Connection</code>.
2551 *
2552 * @return the default isolation level
2553 * @see java.sql.Connection
2554 */
2555 public Integer getDefaultTransactionIsolation() {
2556 return defaultTransactionIsolation;
2557 }
2558
2559 /**
2560 * Sets this database's default transaction isolation level. The possible values are defined in
2561 * <code>java.sql.Connection</code>.
2562 *
2563 * @param defaultTransactionIsolation the default isolation level
2564 * @see java.sql.Connection
2565 */
2566 public void setDefaultTransactionIsolation( Integer defaultTransactionIsolation ) {
2567 this.defaultTransactionIsolation = defaultTransactionIsolation;
2568 }
2569
2570 /**
2571 * Retrieves whether this database supports transactions. If not, invoking the method <code>commit</code> is a noop, and the
2572 * isolation level is <code>TRANSACTION_NONE</code>.
2573 *
2574 * @return <code>true</code> if transactions are supported; <code>false</code> otherwise
2575 */
2576 public Boolean isSupportsTransactions() {
2577 return supportsTransactions;
2578 }
2579
2580 /**
2581 * Sets whether this database supports transactions. If not, invoking the method <code>commit</code> is a noop, and the
2582 * isolation level is <code>TRANSACTION_NONE</code>.
2583 *
2584 * @param supportsTransactions <code>true</code> if transactions are supported; <code>false</code> otherwise
2585 */
2586 public void setSupportsTransactions( Boolean supportsTransactions ) {
2587 this.supportsTransactions = supportsTransactions;
2588 }
2589
2590 /**
2591 * Retrieves list of database supported transaction isolation levels.
2592 *
2593 * @return list of database supported transaction isolation levels.
2594 * @see java.sql.Connection
2595 */
2596 public Set<TransactionIsolationLevelType> getSupportedTransactionIsolationLevels() {
2597 return supportedTransactionIsolationLevels;
2598 }
2599
2600 /**
2601 * Adds TransactionIsolationLevelType
2602 *
2603 * @param transactionIsolationLevelType the Transaction Isolation Level Type
2604 */
2605 public void addSupportedTransactionIsolationLevelType( TransactionIsolationLevelType transactionIsolationLevelType ) {
2606 supportedTransactionIsolationLevels.add(transactionIsolationLevelType);
2607 }
2608
2609 /**
2610 * Deletes TransactionIsolationLevelType
2611 *
2612 * @param transactionIsolationLevelType the Transaction Isolation Level Type
2613 */
2614 public void deleteSupportedTransactionIsolationLevelType( TransactionIsolationLevelType transactionIsolationLevelType ) {
2615 supportedTransactionIsolationLevels.remove(transactionIsolationLevelType);
2616 }
2617
2618 /**
2619 * Is supported TransactionIsolationLevelType
2620 *
2621 * @param transactionIsolationLevelType the Transaction Isolation Level Type
2622 * @return true if supported
2623 */
2624 public Boolean isSupportedTransactionIsolationLevelType( TransactionIsolationLevelType transactionIsolationLevelType ) {
2625 for (TransactionIsolationLevelType t : supportedTransactionIsolationLevels) {
2626 if (t.equals(transactionIsolationLevelType)) {
2627 return Boolean.TRUE;
2628 }
2629 }
2630 // return false
2631 return Boolean.FALSE;
2632 }
2633
2634 /**
2635 * Retrieves whether this database supports both data definition and data manipulation statements within a transaction.
2636 *
2637 * @return <code>true</code> if so; <code>false</code> otherwise
2638 */
2639 public Boolean isSupportsDataDefinitionAndDataManipulationTransactions() {
2640 return supportsDataDefinitionAndDataManipulationTransactions;
2641 }
2642
2643 /**
2644 * Sets whether this database supports both data definition and data manipulation statements within a transaction.
2645 *
2646 * @param supportsDataDefinitionAndDataManipulationTransactions <code>true</code> if so; <code>false</code> otherwise
2647 */
2648 public void setSupportsDataDefinitionAndDataManipulationTransactions( Boolean supportsDataDefinitionAndDataManipulationTransactions ) {
2649 this.supportsDataDefinitionAndDataManipulationTransactions = supportsDataDefinitionAndDataManipulationTransactions;
2650 }
2651
2652 /**
2653 * Retrieves whether this database supports only data manipulation statements within a transaction.
2654 *
2655 * @return <code>true</code> if so; <code>false</code> otherwise
2656 */
2657 public Boolean isSupportsDataManipulationTransactionsOnly() {
2658 return supportsDataManipulationTransactionsOnly;
2659 }
2660
2661 /**
2662 * Sets whether this database supports only data manipulation statements within a transaction.
2663 *
2664 * @param supportsDataManipulationTransactionsOnly <code>true</code> if so; <code>false</code> otherwise
2665 */
2666 public void setSupportsDataManipulationTransactionsOnly( Boolean supportsDataManipulationTransactionsOnly ) {
2667 this.supportsDataManipulationTransactionsOnly = supportsDataManipulationTransactionsOnly;
2668 }
2669
2670 /**
2671 * Retrieves whether a data definition statement within a transaction forces the transaction to commit.
2672 *
2673 * @return <code>true</code> if so; <code>false</code> otherwise
2674 */
2675 public Boolean isDataDefinitionCausesTransactionCommit() {
2676 return dataDefinitionCausesTransactionCommit;
2677 }
2678
2679 /**
2680 * Sets whether a data definition statement within a transaction forces the transaction to commit.
2681 *
2682 * @param dataDefinitionCausesTransactionCommit <code>true</code> if so; <code>false</code> otherwise
2683 */
2684 public void setDataDefinitionCausesTransactionCommit( Boolean dataDefinitionCausesTransactionCommit ) {
2685 this.dataDefinitionCausesTransactionCommit = dataDefinitionCausesTransactionCommit;
2686 }
2687
2688 /**
2689 * Retrieves whether this database ignores a data definition statement within a transaction.
2690 *
2691 * @return <code>true</code> if so; <code>false</code> otherwise
2692 */
2693 public Boolean isDataDefinitionIgnoredInTransactions() {
2694 return dataDefinitionIgnoredInTransactions;
2695 }
2696
2697 /**
2698 * Sets whether this database ignores a data definition statement within a transaction.
2699 *
2700 * @param dataDefinitionIgnoredInTransactions <code>true</code> if so; <code>false</code> otherwise
2701 */
2702 public void setDataDefinitionIgnoredInTransactions( Boolean dataDefinitionIgnoredInTransactions ) {
2703 this.dataDefinitionIgnoredInTransactions = dataDefinitionIgnoredInTransactions;
2704 }
2705
2706 /**
2707 * Retrieves a description of the stored procedures available in the given catalog.
2708 *
2709 * @return a set of stored procedures available
2710 */
2711 public Set<StoredProcedure> getStoredProcedures() {
2712 return storedProcedures;
2713 }
2714
2715 /**
2716 * Adds Stored Procedure
2717 *
2718 * @param storedProcedure the Stored Procedure
2719 */
2720 public void addStoredProcedure( StoredProcedure storedProcedure ) {
2721 storedProcedures.add(storedProcedure);
2722 }
2723
2724 /**
2725 * Deletes Stored Procedure
2726 *
2727 * @param storedProcedure the Stored Procedure
2728 */
2729 public void deleteStoredProcedure( StoredProcedure storedProcedure ) {
2730 storedProcedures.remove(storedProcedure);
2731 }
2732
2733 /**
2734 * Finds stored procedute by its name.
2735 *
2736 * @param catalog a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a
2737 * catalog; <code>null</code> means that the catalog name should not be used to narrow the search
2738 * @param schema a schema name; must match the schema name as it is stored in the database; "" retrieves those without a
2739 * schema; <code>null</code> means that the schema name should not be used to narrow the search
2740 * @param procedureName a procedure name; must match the procedure name as it is stored in the database
2741 * @return stored procedure or null if not found
2742 */
2743 public StoredProcedure findStoredProcedureByName( String catalog,
2744 String schema,
2745 String procedureName ) {
2746 for (StoredProcedure sp : storedProcedures) {
2747 // if name equals then trying to match catalog and schema
2748 if (sp.getName().equals(procedureName)) {
2749 boolean catalogNameEquals = (sp.getCatalog() != null) ? sp.getCatalog().getName().equals(catalog) : catalog == null;
2750 boolean schemaNameEquals = (sp.getSchema() != null) ? sp.getSchema().getName().equals(schema) : schema == null;
2751 if (catalogNameEquals && schemaNameEquals) {
2752 return sp;
2753 }
2754 }
2755 }
2756 // return nothing
2757 return null;
2758 }
2759
2760 /**
2761 * Retrieves a description of the tables available in the given catalog.
2762 *
2763 * @return a set of tables available
2764 */
2765 public Set<Table> getTables() {
2766 return tables;
2767 }
2768
2769 /**
2770 * Adds Table
2771 *
2772 * @param table the table to add
2773 */
2774 public void addTable( Table table ) {
2775 tables.add(table);
2776 }
2777
2778 /**
2779 * Deletes Table
2780 *
2781 * @param table the table to delete
2782 */
2783 public void deleteTable( Table table ) {
2784 tables.remove(table);
2785 }
2786
2787 /**
2788 * Finds table by its name.
2789 *
2790 * @param catalog a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a
2791 * catalog; <code>null</code> means that the catalog name should not be used to narrow the search
2792 * @param schema a schema name; must match the schema name as it is stored in the database; "" retrieves those without a
2793 * schema; <code>null</code> means that the schema name should not be used to narrow the search
2794 * @param tableName a table name; must match the table name as it is stored in the database
2795 * @return table or null if not found
2796 */
2797 public Table findTableByName( String catalog,
2798 String schema,
2799 String tableName ) {
2800 for (Table t : tables) {
2801 // if name equals then trying to match catalog and schema
2802 if (t.getName().equals(tableName)) {
2803 boolean catalogNameEquals = (t.getCatalog() != null) ? t.getCatalog().getName().equals(catalog) : catalog == null;
2804 boolean schemaNameEquals = (t.getSchema() != null) ? t.getSchema().getName().equals(schema) : schema == null;
2805 if (catalogNameEquals && schemaNameEquals) {
2806 return t;
2807 }
2808 }
2809 }
2810 // return nothing
2811 return null;
2812 }
2813
2814 /**
2815 * Retrieves the schemas available in this database. The results are ordered by schema name.
2816 *
2817 * @return schemas available in this database.
2818 */
2819 public Set<Schema> getSchemas() {
2820 return schemas;
2821 }
2822
2823 /**
2824 * Adds Schema
2825 *
2826 * @param schema the Schema
2827 */
2828 public void addSchema( Schema schema ) {
2829 schemas.add(schema);
2830 }
2831
2832 /**
2833 * Deletes Schema
2834 *
2835 * @param schema the Schema
2836 */
2837 public void deleteSchema( Schema schema ) {
2838 schemas.remove(schema);
2839 }
2840
2841 /**
2842 * Finds schema by its name.
2843 *
2844 * @param catalog a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a
2845 * catalog; <code>null</code> means that the catalog name should not be used to narrow the search
2846 * @param schemaName a schema name; must match the schema name as it is stored in the database;
2847 * @return schema or null if not found
2848 */
2849 public Schema findSchemaByName( String catalog,
2850 String schemaName ) {
2851 for (Schema s : schemas) {
2852 // if name equals then trying to match catalog and schema
2853 if (s.getName().equals(schemaName)) {
2854 boolean catalogNameEquals = (s.getCatalog() != null) ? s.getCatalog().getName().equals(catalog) : catalog == null;
2855 if (catalogNameEquals) {
2856 return s;
2857 }
2858 }
2859 }
2860 // return nothing
2861 return null;
2862 }
2863
2864 /**
2865 * Retrieves the catalogs available in this database
2866 *
2867 * @return catalogs available in this database
2868 */
2869 public Set<Catalog> getCatalogs() {
2870 return catalogs;
2871 }
2872
2873 /**
2874 * Adds Catalog
2875 *
2876 * @param catalog the catalog to add
2877 */
2878 public void addCatalog( Catalog catalog ) {
2879 catalogs.add(catalog);
2880 }
2881
2882 /**
2883 * Deletes Catalog
2884 *
2885 * @param catalog the catalog to delete
2886 */
2887 public void deleteCatalog( Catalog catalog ) {
2888 catalogs.remove(catalog);
2889 }
2890
2891 /**
2892 * Finds catalog by its name.
2893 *
2894 * @param catalogName a catalog name; must match the catalog name as it is stored in the database;
2895 * @return catalog or null if not found
2896 */
2897 public Catalog findCatalogByName( String catalogName ) {
2898 for (Catalog c : catalogs) {
2899 // if name equals then return
2900 if (c.getName().equals(catalogName)) {
2901 return c;
2902 }
2903 }
2904 // return nothing
2905 return null;
2906 }
2907
2908 /**
2909 * Retrieves the table types available in this database. The results are ordered by table type.
2910 * <P>
2911 * The table type is:
2912 * <OL>
2913 * <LI><B>TABLE_TYPE</B> String => table type. Typical types are "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY",
2914 * "LOCAL TEMPORARY", "ALIAS", "SYNONYM".
2915 * </OL>
2916 *
2917 * @return table types available in this database
2918 */
2919 public Set<TableType> getTableTypes() {
2920 return tableTypes;
2921 }
2922
2923 /**
2924 * Adds TableType
2925 *
2926 * @param tableType the table type to add
2927 */
2928 public void addTableType( TableType tableType ) {
2929 tableTypes.add(tableType);
2930 }
2931
2932 /**
2933 * Deletes TableType
2934 *
2935 * @param tableType the table type to delete
2936 */
2937 public void deleteTableType( TableType tableType ) {
2938 tableTypes.remove(tableType);
2939 }
2940
2941 /**
2942 * Finds table type by its name.
2943 *
2944 * @param typeName a table type name; must match the type name as it is stored in the database;
2945 * @return table type or null if not found
2946 */
2947 public TableType findTableTypeByTypeName( String typeName ) {
2948 for (TableType tt : tableTypes) {
2949 // if name equals then return
2950 if (tt.getName().equals(typeName)) {
2951 return tt;
2952 }
2953 }
2954 // return nothing
2955 return null;
2956 }
2957
2958 /**
2959 * Retrieves a description of all the standard SQL types supported by this database
2960 *
2961 * @return all the standard SQL types supported by this database
2962 */
2963 public Set<SqlTypeInfo> getSqlTypeInfos() {
2964 return sqlTypeInfos;
2965 }
2966
2967 /**
2968 * Adds SqlTypeInfo
2969 *
2970 * @param sqlTypeInfo the SQL type to add
2971 */
2972 public void addSqlTypeInfo( SqlTypeInfo sqlTypeInfo ) {
2973 sqlTypeInfos.add(sqlTypeInfo);
2974 }
2975
2976 /**
2977 * Deletes SqlTypeInfo
2978 *
2979 * @param sqlTypeInfo the SQL type to delete
2980 */
2981 public void deleteSqlTypeInfo( SqlTypeInfo sqlTypeInfo ) {
2982 sqlTypeInfos.remove(sqlTypeInfo);
2983 }
2984
2985 /**
2986 * Finds SQL type by its name.
2987 *
2988 * @param typeName a table type name; must match the type name as it is stored in the database;
2989 * @return table type or null if not found
2990 */
2991 public SqlTypeInfo findSqlTypeInfoByTypeName( String typeName ) {
2992 for (SqlTypeInfo sti : sqlTypeInfos) {
2993 // if name equals then return
2994 if (sti.getName().equals(typeName)) {
2995 return sti;
2996 }
2997 }
2998 // return nothing
2999 return null;
3000 }
3001
3002 // ===============================================================
3003 // --------------------------JDBC 2.0-----------------------------
3004 // ===============================================================
3005
3006 /**
3007 * Retrieves database supported result set types.
3008 *
3009 * @return database supported result set types.
3010 * @see java.sql.Connection
3011 * @since 1.2 (JDBC 2.0)
3012 */
3013 public Set<ResultSetType> getSupportedResultSetTypes() {
3014 return supportedResultSetTypes;
3015 }
3016
3017 /**
3018 * Adds supported ResultSetType
3019 *
3020 * @param resultSetType the ResultSetType
3021 */
3022 public void addSupportedResultSetType( ResultSetType resultSetType ) {
3023 supportedResultSetTypes.add(resultSetType);
3024 }
3025
3026 /**
3027 * Deletes supported ResultSetType
3028 *
3029 * @param resultSetType the ResultSetType
3030 */
3031 public void deleteSupportedResultSetType( ResultSetType resultSetType ) {
3032 supportedResultSetTypes.remove(resultSetType);
3033 }
3034
3035 /**
3036 * Retrieves database supported concurrencies for the given result set type.
3037 *
3038 * @return database supported concurrencies for the given result set type.
3039 * @see java.sql.Connection
3040 * @since 1.2 (JDBC 2.0)
3041 */
3042 public Set<ResultSetConcurrencyType> getSupportedForwardOnlyResultSetConcurrencies() {
3043 return supportedForwardOnlyResultSetConcurrencies;
3044 }
3045
3046 /**
3047 * Adds ResultSetConcurrencyType
3048 *
3049 * @param resultSetConcurrencyType the ResultSetConcurrencyType
3050 */
3051 public void addSupportedForwardOnlyResultSetConcurrency( ResultSetConcurrencyType resultSetConcurrencyType ) {
3052 supportedForwardOnlyResultSetConcurrencies.add(resultSetConcurrencyType);
3053 }
3054
3055 /**
3056 * Deletes ResultSetConcurrencyType
3057 *
3058 * @param resultSetConcurrencyType the ResultSetConcurrencyType
3059 */
3060 public void deleteSupportedForwardOnlyResultSetConcurrency( ResultSetConcurrencyType resultSetConcurrencyType ) {
3061 supportedForwardOnlyResultSetConcurrencies.remove(resultSetConcurrencyType);
3062 }
3063
3064 /**
3065 * Retrieves database supported concurrencies for the given result set type.
3066 *
3067 * @return database supported concurrencies for the given result set type.
3068 * @see java.sql.Connection
3069 * @since 1.2 (JDBC 2.0)
3070 */
3071 public Set<ResultSetConcurrencyType> getSupportedScrollInsensitiveResultSetConcurrencies() {
3072 return supportedScrollInsensitiveResultSetConcurrencies;
3073 }
3074
3075 /**
3076 * Adds ResultSetConcurrencyType
3077 *
3078 * @param resultSetConcurrencyType the ResultSetConcurrencyType
3079 */
3080 public void addSupportedScrollInsensitiveResultSetConcurrency( ResultSetConcurrencyType resultSetConcurrencyType ) {
3081 supportedScrollInsensitiveResultSetConcurrencies.add(resultSetConcurrencyType);
3082 }
3083
3084 /**
3085 * Delete ResultSetConcurrencyType
3086 *
3087 * @param resultSetConcurrencyType the ResultSetConcurrencyType
3088 */
3089 public void deleteSupportedScrollInsensitiveResultSetConcurrency( ResultSetConcurrencyType resultSetConcurrencyType ) {
3090 supportedScrollInsensitiveResultSetConcurrencies.remove(resultSetConcurrencyType);
3091 }
3092
3093 /**
3094 * Retrieves database supported concurrencies for the given result set type.
3095 *
3096 * @return database supported concurrencies for the given result set type.
3097 * @see java.sql.Connection
3098 * @since 1.2 (JDBC 2.0)
3099 */
3100 public Set<ResultSetConcurrencyType> getSupportedScrollSensitiveResultSetConcurrencies() {
3101 return supportedScrollSensitiveResultSetConcurrencies;
3102 }
3103
3104 /**
3105 * Adds resultSetConcurrencyType
3106 *
3107 * @param resultSetConcurrencyType the ResultSetConcurrencyType
3108 */
3109 public void addSupportedScrollSensitiveResultSetConcurrency( ResultSetConcurrencyType resultSetConcurrencyType ) {
3110 supportedScrollSensitiveResultSetConcurrencies.add(resultSetConcurrencyType);
3111 }
3112
3113 /**
3114 * deletes resultSetConcurrencyType
3115 *
3116 * @param resultSetConcurrencyType the ResultSetConcurrencyType
3117 */
3118 public void deleteSupportedScrollSensitiveResultSetConcurrency( ResultSetConcurrencyType resultSetConcurrencyType ) {
3119 supportedScrollSensitiveResultSetConcurrencies.remove(resultSetConcurrencyType);
3120 }
3121
3122 /**
3123 * Retrieves whether for the given type of <code>ResultSet</code> object, the result set's own updates are visible.
3124 *
3125 * @return <code>true</code> if updates are visible for the given result set type; <code>false</code> otherwise
3126 * @since 1.2 (JDBC 2.0)
3127 */
3128 public Boolean isForwardOnlyResultSetOwnUpdatesAreVisible() {
3129 return forwardOnlyResultSetOwnUpdatesAreVisible;
3130 }
3131
3132 /**
3133 * Sets whether for the given type of <code>ResultSet</code> object, the result set's own updates are visible.
3134 *
3135 * @param forwardOnlyResultSetOwnUpdatesAreVisible <code>true</code> if updates are visible for the given result set type;
3136 * <code>false</code> otherwise
3137 * @since 1.2 (JDBC 2.0)
3138 */
3139 public void setForwardOnlyResultSetOwnUpdatesAreVisible( Boolean forwardOnlyResultSetOwnUpdatesAreVisible ) {
3140 this.forwardOnlyResultSetOwnUpdatesAreVisible = forwardOnlyResultSetOwnUpdatesAreVisible;
3141 }
3142
3143 /**
3144 * Retrieves whether for the given type of <code>ResultSet</code> object, the result set's own updates are visible.
3145 *
3146 * @return <code>true</code> if updates are visible for the given result set type; <code>false</code> otherwise
3147 * @since 1.2 (JDBC 2.0)
3148 */
3149 public Boolean isScrollInsensitiveResultSetOwnUpdatesAreVisible() {
3150 return scrollInsensitiveResultSetOwnUpdatesAreVisible;
3151 }
3152
3153 /**
3154 * Sets whether for the given type of <code>ResultSet</code> object, the result set's own updates are visible.
3155 *
3156 * @param scrollInsensitiveResultSetOwnUpdatesAreVisible <code>true</code> if updates are visible for the given result set
3157 * type; <code>false</code> otherwise
3158 * @since 1.2 (JDBC 2.0)
3159 */
3160 public void setScrollInsensitiveResultSetOwnUpdatesAreVisible( Boolean scrollInsensitiveResultSetOwnUpdatesAreVisible ) {
3161 this.scrollInsensitiveResultSetOwnUpdatesAreVisible = scrollInsensitiveResultSetOwnUpdatesAreVisible;
3162 }
3163
3164 /**
3165 * Retrieves whether for the given type of <code>ResultSet</code> object, the result set's own updates are visible.
3166 *
3167 * @return <code>true</code> if updates are visible for the given result set type; <code>false</code> otherwise
3168 * @since 1.2 (JDBC 2.0)
3169 */
3170 public Boolean isScrollSensitiveResultSetOwnUpdatesAreVisible() {
3171 return scrollSensitiveResultSetOwnUpdatesAreVisible;
3172 }
3173
3174 /**
3175 * Sets whether for the given type of <code>ResultSet</code> object, the result set's own updates are visible.
3176 *
3177 * @param scrollSensitiveResultSetOwnUpdatesAreVisible <code>true</code> if updates are visible for the given result set type;
3178 * <code>false</code> otherwise
3179 * @since 1.2 (JDBC 2.0)
3180 */
3181 public void setScrollSensitiveResultSetOwnUpdatesAreVisible( Boolean scrollSensitiveResultSetOwnUpdatesAreVisible ) {
3182 this.scrollSensitiveResultSetOwnUpdatesAreVisible = scrollSensitiveResultSetOwnUpdatesAreVisible;
3183 }
3184
3185 /**
3186 * Retrieves whether a result set's own deletes are visible.
3187 *
3188 * @return <code>true</code> if deletes are visible for the given result set type; <code>false</code> otherwise
3189 * @since 1.2 (JDBC 2.0)
3190 */
3191 public Boolean isForwardOnlyResultSetOwnDeletesAreVisible() {
3192 return forwardOnlyResultSetOwnDeletesAreVisible;
3193 }
3194
3195 /**
3196 * Sets whether a result set's own deletes are visible.
3197 *
3198 * @param forwardOnlyResultSetOwnDeletesAreVisible <code>true</code> if deletes are visible for the given result set type;
3199 * <code>false</code> otherwise
3200 * @since 1.2 (JDBC 2.0)
3201 */
3202 public void setForwardOnlyResultSetOwnDeletesAreVisible( Boolean forwardOnlyResultSetOwnDeletesAreVisible ) {
3203 this.forwardOnlyResultSetOwnDeletesAreVisible = forwardOnlyResultSetOwnDeletesAreVisible;
3204 }
3205
3206 /**
3207 * Retrieves whether a result set's own deletes are visible.
3208 *
3209 * @return <code>true</code> if deletes are visible for the given result set type; <code>false</code> otherwise
3210 * @since 1.2 (JDBC 2.0)
3211 */
3212 public Boolean isScrollInsensitiveResultSetOwnDeletesAreVisible() {
3213 return scrollInsensitiveResultSetOwnDeletesAreVisible;
3214 }
3215
3216 /**
3217 * Sets whether a result set's own deletes are visible.
3218 *
3219 * @param scrollInsensitiveResultSetOwnDeletesAreVisible <code>true</code> if deletes are visible for the given result set
3220 * type; <code>false</code> otherwise
3221 * @since 1.2 (JDBC 2.0)
3222 */
3223 public void setScrollInsensitiveResultSetOwnDeletesAreVisible( Boolean scrollInsensitiveResultSetOwnDeletesAreVisible ) {
3224 this.scrollInsensitiveResultSetOwnDeletesAreVisible = scrollInsensitiveResultSetOwnDeletesAreVisible;
3225 }
3226
3227 /**
3228 * Retrieves whether a result set's own deletes are visible.
3229 *
3230 * @return <code>true</code> if deletes are visible for the given result set type; <code>false</code> otherwise
3231 * @since 1.2 (JDBC 2.0)
3232 */
3233 public Boolean isScrollSensitiveResultSetOwnDeletesAreVisible() {
3234 return scrollSensitiveResultSetOwnDeletesAreVisible;
3235 }
3236
3237 /**
3238 * Sets whether a result set's own deletes are visible.
3239 *
3240 * @param scrollSensitiveResultSetOwnDeletesAreVisible <code>true</code> if deletes are visible for the given result set type;
3241 * <code>false</code> otherwise
3242 * @since 1.2 (JDBC 2.0)
3243 */
3244 public void setScrollSensitiveResultSetOwnDeletesAreVisible( Boolean scrollSensitiveResultSetOwnDeletesAreVisible ) {
3245 this.scrollSensitiveResultSetOwnDeletesAreVisible = scrollSensitiveResultSetOwnDeletesAreVisible;
3246 }
3247
3248 /**
3249 * Retrieves whether a result set's own inserts are visible.
3250 *
3251 * @return <code>true</code> if inserts are visible for the given result set type; <code>false</code> otherwise
3252 * @since 1.2 (JDBC 2.0)
3253 */
3254 public Boolean isForwardOnlyResultSetOwnInsertsAreVisible() {
3255 return forwardOnlyResultSetOwnInsertsAreVisible;
3256 }
3257
3258 /**
3259 * Sets whether a result set's own inserts are visible.
3260 *
3261 * @param forwardOnlyResultSetOwnInsertsAreVisible <code>true</code> if inserts are visible for the given result set type;
3262 * <code>false</code> otherwise
3263 * @since 1.2 (JDBC 2.0)
3264 */
3265 public void setForwardOnlyResultSetOwnInsertsAreVisible( Boolean forwardOnlyResultSetOwnInsertsAreVisible ) {
3266 this.forwardOnlyResultSetOwnInsertsAreVisible = forwardOnlyResultSetOwnInsertsAreVisible;
3267 }
3268
3269 /**
3270 * Retrieves whether a result set's own inserts are visible.
3271 *
3272 * @return <code>true</code> if inserts are visible for the given result set type; <code>false</code> otherwise
3273 * @since 1.2 (JDBC 2.0)
3274 */
3275 public Boolean isScrollInsensitiveResultSetOwnInsertsAreVisible() {
3276 return scrollInsensitiveResultSetOwnInsertsAreVisible;
3277 }
3278
3279 /**
3280 * Sets whether a result set's own inserts are visible.
3281 *
3282 * @param scrollInsensitiveResultSetOwnInsertsAreVisible <code>true</code> if inserts are visible for the given result set
3283 * type; <code>false</code> otherwise
3284 * @since 1.2 (JDBC 2.0)
3285 */
3286 public void setScrollInsensitiveResultSetOwnInsertsAreVisible( Boolean scrollInsensitiveResultSetOwnInsertsAreVisible ) {
3287 this.scrollInsensitiveResultSetOwnInsertsAreVisible = scrollInsensitiveResultSetOwnInsertsAreVisible;
3288 }
3289
3290 /**
3291 * Retrieves whether a result set's own inserts are visible.
3292 *
3293 * @return <code>true</code> if inserts are visible for the given result set type; <code>false</code> otherwise
3294 * @since 1.2 (JDBC 2.0)
3295 */
3296 public Boolean isScrollSensitiveResultSetOwnInsertsAreVisible() {
3297 return scrollSensitiveResultSetOwnInsertsAreVisible;
3298 }
3299
3300 /**
3301 * Sets whether a result set's own inserts are visible.
3302 *
3303 * @param scrollSensitiveResultSetOwnInsertsAreVisible <code>true</code> if inserts are visible for the given result set type;
3304 * <code>false</code> otherwise
3305 * @since 1.2 (JDBC 2.0)
3306 */
3307 public void setScrollSensitiveResultSetOwnInsertsAreVisible( Boolean scrollSensitiveResultSetOwnInsertsAreVisible ) {
3308 this.scrollSensitiveResultSetOwnInsertsAreVisible = scrollSensitiveResultSetOwnInsertsAreVisible;
3309 }
3310
3311 /**
3312 * Retrieves whether updates made by others are visible.
3313 *
3314 * @return <code>true</code> if updates made by others are visible for the given result set type; <code>false</code> otherwise
3315 * @since 1.2 (JDBC 2.0)
3316 */
3317 public Boolean isForwardOnlyResultSetOthersUpdatesAreVisible() {
3318 return forwardOnlyResultSetOthersUpdatesAreVisible;
3319 }
3320
3321 /**
3322 * Sets whether updates made by others are visible.
3323 *
3324 * @param forwardOnlyResultSetOthersUpdatesAreVisible <code>true</code> if updates made by others are visible for the given
3325 * result set type; <code>false</code> otherwise
3326 * @since 1.2 (JDBC 2.0)
3327 */
3328 public void setForwardOnlyResultSetOthersUpdatesAreVisible( Boolean forwardOnlyResultSetOthersUpdatesAreVisible ) {
3329 this.forwardOnlyResultSetOthersUpdatesAreVisible = forwardOnlyResultSetOthersUpdatesAreVisible;
3330 }
3331
3332 /**
3333 * Retrieves whether updates made by others are visible.
3334 *
3335 * @return <code>true</code> if updates made by others are visible for the given result set type; <code>false</code> otherwise
3336 * @since 1.2 (JDBC 2.0)
3337 */
3338 public Boolean isScrollInsensitiveResultSetOthersUpdatesAreVisible() {
3339 return scrollInsensitiveResultSetOthersUpdatesAreVisible;
3340 }
3341
3342 /**
3343 * Sets whether updates made by others are visible.
3344 *
3345 * @param scrollInsensitiveResultSetOthersUpdatesAreVisible <code>true</code> if updates made by others are visible for the
3346 * given result set type; <code>false</code> otherwise
3347 * @since 1.2 (JDBC 2.0)
3348 */
3349 public void setScrollInsensitiveResultSetOthersUpdatesAreVisible( Boolean scrollInsensitiveResultSetOthersUpdatesAreVisible ) {
3350 this.scrollInsensitiveResultSetOthersUpdatesAreVisible = scrollInsensitiveResultSetOthersUpdatesAreVisible;
3351 }
3352
3353 /**
3354 * Retrieves whether updates made by others are visible.
3355 *
3356 * @return <code>true</code> if updates made by others are visible for the given result set type; <code>false</code> otherwise
3357 * @since 1.2 (JDBC 2.0)
3358 */
3359 public Boolean isScrollSensitiveResultSetOthersUpdatesAreVisible() {
3360 return scrollSensitiveResultSetOthersUpdatesAreVisible;
3361 }
3362
3363 /**
3364 * Sets whether updates made by others are visible.
3365 *
3366 * @param scrollSensitiveResultSetOthersUpdatesAreVisible <code>true</code> if updates made by others are visible for the
3367 * given result set type; <code>false</code> otherwise
3368 * @since 1.2 (JDBC 2.0)
3369 */
3370 public void setScrollSensitiveResultSetOthersUpdatesAreVisible( Boolean scrollSensitiveResultSetOthersUpdatesAreVisible ) {
3371 this.scrollSensitiveResultSetOthersUpdatesAreVisible = scrollSensitiveResultSetOthersUpdatesAreVisible;
3372 }
3373
3374 /**
3375 * Retrieves whether deletes made by others are visible.
3376 *
3377 * @return <code>true</code> if deletes made by others are visible for the given result set type; <code>false</code> otherwise
3378 * @since 1.2 (JDBC 2.0)
3379 */
3380 public Boolean isForwardOnlyResultSetOthersDeletesAreVisible() {
3381 return forwardOnlyResultSetOthersDeletesAreVisible;
3382 }
3383
3384 /**
3385 * Sets whether deletes made by others are visible.
3386 *
3387 * @param forwardOnlyResultSetOthersDeletesAreVisible <code>true</code> if deletes made by others are visible for the given
3388 * result set type; <code>false</code> otherwise
3389 * @since 1.2 (JDBC 2.0)
3390 */
3391 public void setForwardOnlyResultSetOthersDeletesAreVisible( Boolean forwardOnlyResultSetOthersDeletesAreVisible ) {
3392 this.forwardOnlyResultSetOthersDeletesAreVisible = forwardOnlyResultSetOthersDeletesAreVisible;
3393 }
3394
3395 /**
3396 * Retrieves whether deletes made by others are visible.
3397 *
3398 * @return <code>true</code> if deletes made by others are visible for the given result set type; <code>false</code> otherwise
3399 * @since 1.2 (JDBC 2.0)
3400 */
3401 public Boolean isScrollInsensitiveResultSetOthersDeletesAreVisible() {
3402 return scrollInsensitiveResultSetOthersDeletesAreVisible;
3403 }
3404
3405 /**
3406 * Sets whether deletes made by others are visible.
3407 *
3408 * @param scrollInsensitiveResultSetOthersDeletesAreVisible <code>true</code> if deletes made by others are visible for the
3409 * given result set type; <code>false</code> otherwise
3410 * @since 1.2 (JDBC 2.0)
3411 */
3412 public void setScrollInsensitiveResultSetOthersDeletesAreVisible( Boolean scrollInsensitiveResultSetOthersDeletesAreVisible ) {
3413 this.scrollInsensitiveResultSetOthersDeletesAreVisible = scrollInsensitiveResultSetOthersDeletesAreVisible;
3414 }
3415
3416 /**
3417 * Retrieves whether deletes made by others are visible.
3418 *
3419 * @return <code>true</code> if deletes made by others are visible for the given result set type; <code>false</code> otherwise
3420 * @since 1.2 (JDBC 2.0)
3421 */
3422 public Boolean isScrollSensitiveResultSetOthersDeletesAreVisible() {
3423 return scrollSensitiveResultSetOthersDeletesAreVisible;
3424 }
3425
3426 /**
3427 * Sets whether deletes made by others are visible.
3428 *
3429 * @param scrollSensitiveResultSetOthersDeletesAreVisible <code>true</code> if deletes made by others are visible for the
3430 * given result set type; <code>false</code> otherwise
3431 * @since 1.2 (JDBC 2.0)
3432 */
3433 public void setScrollSensitiveResultSetOthersDeletesAreVisible( Boolean scrollSensitiveResultSetOthersDeletesAreVisible ) {
3434 this.scrollSensitiveResultSetOthersDeletesAreVisible = scrollSensitiveResultSetOthersDeletesAreVisible;
3435 }
3436
3437 /**
3438 * Retrieves whether inserts made by others are visible.
3439 *
3440 * @return <code>true</code> if inserts made by others are visible for the given result set type; <code>false</code> otherwise
3441 * @since 1.2 (JDBC 2.0)
3442 */
3443 public Boolean isForwardOnlyResultSetOthersInsertsAreVisible() {
3444 return forwardOnlyResultSetOthersInsertsAreVisible;
3445 }
3446
3447 /**
3448 * Sets whether inserts made by others are visible.
3449 *
3450 * @param forwardOnlyResultSetOthersInsertsAreVisible <code>true</code> if inserts made by others are visible for the given
3451 * result set type; <code>false</code> otherwise
3452 * @since 1.2 (JDBC 2.0)
3453 */
3454 public void setForwardOnlyResultSetOthersInsertsAreVisible( Boolean forwardOnlyResultSetOthersInsertsAreVisible ) {
3455 this.forwardOnlyResultSetOthersInsertsAreVisible = forwardOnlyResultSetOthersInsertsAreVisible;
3456 }
3457
3458 /**
3459 * Retrieves whether inserts made by others are visible.
3460 *
3461 * @return <code>true</code> if inserts made by others are visible for the given result set type; <code>false</code> otherwise
3462 * @since 1.2 (JDBC 2.0)
3463 */
3464 public Boolean isScrollInsensitiveResultSetOthersInsertsAreVisible() {
3465 return scrollInsensitiveResultSetOthersInsertsAreVisible;
3466 }
3467
3468 /**
3469 * Sets whether inserts made by others are visible.
3470 *
3471 * @param scrollInsensitiveResultSetOthersInsertsAreVisible <code>true</code> if inserts made by others are visible for the
3472 * given result set type; <code>false</code> otherwise
3473 * @since 1.2 (JDBC 2.0)
3474 */
3475 public void setScrollInsensitiveResultSetOthersInsertsAreVisible( Boolean scrollInsensitiveResultSetOthersInsertsAreVisible ) {
3476 this.scrollInsensitiveResultSetOthersInsertsAreVisible = scrollInsensitiveResultSetOthersInsertsAreVisible;
3477 }
3478
3479 /**
3480 * Retrieves whether inserts made by others are visible.
3481 *
3482 * @return <code>true</code> if inserts made by others are visible for the given result set type; <code>false</code> otherwise
3483 * @since 1.2 (JDBC 2.0)
3484 */
3485 public Boolean isScrollSensitiveResultSetOthersInsertsAreVisible() {
3486 return scrollSensitiveResultSetOthersInsertsAreVisible;
3487 }
3488
3489 /**
3490 * Sets whether inserts made by others are visible.
3491 *
3492 * @param scrollSensitiveResultSetOthersInsertsAreVisible <code>true</code> if inserts made by others are visible for the
3493 * given result set type; <code>false</code> otherwise
3494 * @since 1.2 (JDBC 2.0)
3495 */
3496 public void setScrollSensitiveResultSetOthersInsertsAreVisible( Boolean scrollSensitiveResultSetOthersInsertsAreVisible ) {
3497 this.scrollSensitiveResultSetOthersInsertsAreVisible = scrollSensitiveResultSetOthersInsertsAreVisible;
3498 }
3499
3500 /**
3501 * Retrieves whether or not a visible row update can be detected by calling the method <code>ResultSet.rowUpdated</code>.
3502 *
3503 * @return <code>true</code> if changes are detected by the result set type; <code>false</code> otherwise
3504 * @since 1.2 (JDBC 2.0)
3505 */
3506 public Boolean isForwardOnlyResultSetUpdatesAreDetected() {
3507 return forwardOnlyResultSetUpdatesAreDetected;
3508 }
3509
3510 /**
3511 * Sets whether or not a visible row update can be detected by calling the method <code>ResultSet.rowUpdated</code>.
3512 *
3513 * @param forwardOnlyResultSetUpdatesAreDetected <code>true</code> if changes are detected by the result set type;
3514 * <code>false</code> otherwise
3515 * @since 1.2 (JDBC 2.0)
3516 */
3517 public void setForwardOnlyResultSetUpdatesAreDetected( Boolean forwardOnlyResultSetUpdatesAreDetected ) {
3518 this.forwardOnlyResultSetUpdatesAreDetected = forwardOnlyResultSetUpdatesAreDetected;
3519 }
3520
3521 /**
3522 * Retrieves whether or not a visible row update can be detected by calling the method <code>ResultSet.rowUpdated</code>.
3523 *
3524 * @return <code>true</code> if changes are detected by the result set type; <code>false</code> otherwise
3525 * @since 1.2 (JDBC 2.0)
3526 */
3527 public Boolean isScrollInsensitiveResultSetUpdatesAreDetected() {
3528 return scrollInsensitiveResultSetUpdatesAreDetected;
3529 }
3530
3531 /**
3532 * Sets whether or not a visible row update can be detected by calling the method <code>ResultSet.rowUpdated</code>.
3533 *
3534 * @param scrollInsensitiveResultSetUpdatesAreDetected <code>true</code> if changes are detected by the result set type;
3535 * <code>false</code> otherwise
3536 * @since 1.2 (JDBC 2.0)
3537 */
3538 public void setScrollInsensitiveResultSetUpdatesAreDetected( Boolean scrollInsensitiveResultSetUpdatesAreDetected ) {
3539 this.scrollInsensitiveResultSetUpdatesAreDetected = scrollInsensitiveResultSetUpdatesAreDetected;
3540 }
3541
3542 /**
3543 * Retrieves whether or not a visible row update can be detected by calling the method <code>ResultSet.rowUpdated</code>.
3544 *
3545 * @return <code>true</code> if changes are detected by the result set type; <code>false</code> otherwise
3546 * @since 1.2 (JDBC 2.0)
3547 */
3548 public Boolean isScrollSensitiveResultSetUpdatesAreDetected() {
3549 return scrollSensitiveResultSetUpdatesAreDetected;
3550 }
3551
3552 /**
3553 * Sets whether or not a visible row update can be detected by calling the method <code>ResultSet.rowUpdated</code>.
3554 *
3555 * @param scrollSensitiveResultSetUpdatesAreDetected <code>true</code> if changes are detected by the result set type;
3556 * <code>false</code> otherwise
3557 * @since 1.2 (JDBC 2.0)
3558 */
3559 public void setScrollSensitiveResultSetUpdatesAreDetected( Boolean scrollSensitiveResultSetUpdatesAreDetected ) {
3560 this.scrollSensitiveResultSetUpdatesAreDetected = scrollSensitiveResultSetUpdatesAreDetected;
3561 }
3562
3563 /**
3564 * Retrieves whether or not a visible row delete can be detected by calling the method <code>ResultSet.rowDeleted</code>. If
3565 * the method <code>deletesAreDetected</code> returns <code>false</code>, it means that deleted rows are removed from the
3566 * result set.
3567 *
3568 * @return <code>true</code> if deletes are detected by the given result set type; <code>false</code> otherwise
3569 * @since 1.2 (JDBC 2.0)
3570 */
3571 public Boolean isForwardOnlyResultSetDeletesAreDetected() {
3572 return forwardOnlyResultSetDeletesAreDetected;
3573 }
3574
3575 /**
3576 * Sets whether or not a visible row delete can be detected by calling the method <code>ResultSet.rowDeleted</code>. If the
3577 * method <code>deletesAreDetected</code> returns <code>false</code>, it means that deleted rows are removed from the result
3578 * set.
3579 *
3580 * @param forwardOnlyResultSetDeletesAreDetected <code>true</code> if deletes are detected by the given result set type;
3581 * <code>false</code> otherwise
3582 * @since 1.2 (JDBC 2.0)
3583 */
3584 public void setForwardOnlyResultSetDeletesAreDetected( Boolean forwardOnlyResultSetDeletesAreDetected ) {
3585 this.forwardOnlyResultSetDeletesAreDetected = forwardOnlyResultSetDeletesAreDetected;
3586 }
3587
3588 /**
3589 * Retrieves whether or not a visible row delete can be detected by calling the method <code>ResultSet.rowDeleted</code>. If
3590 * the method <code>deletesAreDetected</code> returns <code>false</code>, it means that deleted rows are removed from the
3591 * result set.
3592 *
3593 * @return <code>true</code> if deletes are detected by the given result set type; <code>false</code> otherwise
3594 * @since 1.2 (JDBC 2.0)
3595 */
3596 public Boolean isScrollInsensitiveResultSetDeletesAreDetected() {
3597 return scrollInsensitiveResultSetDeletesAreDetected;
3598 }
3599
3600 /**
3601 * Sets whether or not a visible row delete can be detected by calling the method <code>ResultSet.rowDeleted</code>. If the
3602 * method <code>deletesAreDetected</code> returns <code>false</code>, it means that deleted rows are removed from the result
3603 * set.
3604 *
3605 * @param scrollInsensitiveResultSetDeletesAreDetected <code>true</code> if deletes are detected by the given result set type;
3606 * <code>false</code> otherwise
3607 * @since 1.2 (JDBC 2.0)
3608 */
3609 public void setScrollInsensitiveResultSetDeletesAreDetected( Boolean scrollInsensitiveResultSetDeletesAreDetected ) {
3610 this.scrollInsensitiveResultSetDeletesAreDetected = scrollInsensitiveResultSetDeletesAreDetected;
3611 }
3612
3613 /**
3614 * Retrieves whether or not a visible row delete can be detected by calling the method <code>ResultSet.rowDeleted</code>. If
3615 * the method <code>deletesAreDetected</code> returns <code>false</code>, it means that deleted rows are removed from the
3616 * result set.
3617 *
3618 * @return <code>true</code> if deletes are detected by the given result set type; <code>false</code> otherwise
3619 * @since 1.2 (JDBC 2.0)
3620 */
3621 public Boolean isScrollSensitiveResultSetDeletesAreDetected() {
3622 return scrollSensitiveResultSetDeletesAreDetected;
3623 }
3624
3625 /**
3626 * Sets whether or not a visible row delete can be detected by calling the method <code>ResultSet.rowDeleted</code>. If the
3627 * method <code>deletesAreDetected</code> returns <code>false</code>, it means that deleted rows are removed from the result
3628 * set.
3629 *
3630 * @param scrollSensitiveResultSetDeletesAreDetected <code>true</code> if deletes are detected by the given result set type;
3631 * <code>false</code> otherwise
3632 * @since 1.2 (JDBC 2.0)
3633 */
3634 public void setScrollSensitiveResultSetDeletesAreDetected( Boolean scrollSensitiveResultSetDeletesAreDetected ) {
3635 this.scrollSensitiveResultSetDeletesAreDetected = scrollSensitiveResultSetDeletesAreDetected;
3636 }
3637
3638 /**
3639 * Retrieves whether or not a visible row insert can be detected by calling the method <code>ResultSet.rowInserted</code>.
3640 *
3641 * @return <code>true</code> if changes are detected by the specified result set type; <code>false</code> otherwise
3642 * @since 1.2 (JDBC 2.0)
3643 */
3644 public Boolean isForwardOnlyResultInsertsAreDetected() {
3645 return forwardOnlyResultInsertsAreDetected;
3646 }
3647
3648 /**
3649 * Sets whether or not a visible row insert can be detected by calling the method <code>ResultSet.rowInserted</code>.
3650 *
3651 * @param forwardOnlyResultInsertsAreDetected <code>true</code> if changes are detected by the specified result set type;
3652 * <code>false</code> otherwise
3653 * @since 1.2 (JDBC 2.0)
3654 */
3655 public void setForwardOnlyResultInsertsAreDetected( Boolean forwardOnlyResultInsertsAreDetected ) {
3656 this.forwardOnlyResultInsertsAreDetected = forwardOnlyResultInsertsAreDetected;
3657 }
3658
3659 /**
3660 * Retrieves whether or not a visible row insert can be detected by calling the method <code>ResultSet.rowInserted</code>.
3661 *
3662 * @return <code>true</code> if changes are detected by the specified result set type; <code>false</code> otherwise
3663 * @since 1.2 (JDBC 2.0)
3664 */
3665 public Boolean isScrollInsensitiveResultInsertsAreDetected() {
3666 return scrollInsensitiveResultInsertsAreDetected;
3667 }
3668
3669 /**
3670 * Sets whether or not a visible row insert can be detected by calling the method <code>ResultSet.rowInserted</code>.
3671 *
3672 * @param scrollInsensitiveResultInsertsAreDetected <code>true</code> if changes are detected by the specified result set
3673 * type; <code>false</code> otherwise
3674 * @since 1.2 (JDBC 2.0)
3675 */
3676 public void setScrollInsensitiveResultInsertsAreDetected( Boolean scrollInsensitiveResultInsertsAreDetected ) {
3677 this.scrollInsensitiveResultInsertsAreDetected = scrollInsensitiveResultInsertsAreDetected;
3678 }
3679
3680 /**
3681 * Retrieves whether or not a visible row insert can be detected by calling the method <code>ResultSet.rowInserted</code>.
3682 *
3683 * @return <code>true</code> if changes are detected by the specified result set type; <code>false</code> otherwise
3684 * @since 1.2 (JDBC 2.0)
3685 */
3686 public Boolean isScrollSensitiveResultInsertsAreDetected() {
3687 return scrollSensitiveResultInsertsAreDetected;
3688 }
3689
3690 /**
3691 * Sets whether or not a visible row insert can be detected by calling the method <code>ResultSet.rowInserted</code>.
3692 *
3693 * @param scrollSensitiveResultInsertsAreDetected <code>true</code> if changes are detected by the specified result set type;
3694 * <code>false</code> otherwise
3695 * @since 1.2 (JDBC 2.0)
3696 */
3697 public void setScrollSensitiveResultInsertsAreDetected( Boolean scrollSensitiveResultInsertsAreDetected ) {
3698 this.scrollSensitiveResultInsertsAreDetected = scrollSensitiveResultInsertsAreDetected;
3699 }
3700
3701 /**
3702 * Retrieves whether this database supports batch updates.
3703 *
3704 * @return <code>true</code> if this database supports batch upcates; <code>false</code> otherwise
3705 * @since 1.2 (JDBC 2.0)
3706 */
3707 public Boolean isSupportsBatchUpdates() {
3708 return supportsBatchUpdates;
3709 }
3710
3711 /**
3712 * Sets whether this database supports batch updates.
3713 *
3714 * @param supportsBatchUpdates <code>true</code> if this database supports batch upcates; <code>false</code> otherwise
3715 * @since 1.2 (JDBC 2.0)
3716 */
3717 public void setSupportsBatchUpdates( Boolean supportsBatchUpdates ) {
3718 this.supportsBatchUpdates = supportsBatchUpdates;
3719 }
3720
3721 /**
3722 * Retrieves a description of the UDT available in the given catalog.
3723 *
3724 * @return a set of UDT available
3725 */
3726 public Set<UserDefinedType> getUserDefinedTypes() {
3727 return userDefinedTypes;
3728 }
3729
3730 /**
3731 * Adds UDT
3732 *
3733 * @param udt the UDT to add
3734 */
3735 public void addUserDefinedType( UserDefinedType udt ) {
3736 userDefinedTypes.add(udt);
3737 }
3738
3739 /**
3740 * Deletes UDT
3741 *
3742 * @param udt the UDT to delete
3743 */
3744 public void deleteUserDefinedType( UserDefinedType udt ) {
3745 userDefinedTypes.remove(udt);
3746 }
3747
3748 /**
3749 * Finds UDT by its name.
3750 *
3751 * @param catalog a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a
3752 * catalog; <code>null</code> means that the catalog name should not be used to narrow the search
3753 * @param schema a schema name; must match the schema name as it is stored in the database; "" retrieves those without a
3754 * schema; <code>null</code> means that the schema name should not be used to narrow the search
3755 * @param tableName a table name; must match the table name as it is stored in the database
3756 * @return table or null if not found
3757 */
3758 public UserDefinedType findUserDefinedTypeByName( String catalog,
3759 String schema,
3760 String tableName ) {
3761 for (UserDefinedType udt : userDefinedTypes) {
3762 if (udt.getName().equals(tableName)) {
3763 boolean catalogNameEquals = (udt.getCatalog() != null) ? udt.getCatalog().getName().equals(catalog) : catalog == null;
3764 boolean schemaNameEquals = (udt.getSchema() != null) ? udt.getSchema().getName().equals(schema) : schema == null;
3765 if (catalogNameEquals && schemaNameEquals) {
3766 return udt;
3767 }
3768 }
3769 }
3770 // return nothing
3771 return null;
3772 }
3773
3774 // ===============================================================
3775 // ------------------- JDBC 3.0 ---------------------------------
3776 // ===============================================================
3777
3778 /**
3779 * Retrieves whether this database supports savepoints.
3780 *
3781 * @return <code>true</code> if savepoints are supported; <code>false</code> otherwise
3782 * @since 1.4 (JDBC 3.0)
3783 */
3784 public Boolean isSupportsSavepoints() {
3785 return supportsSavepoints;
3786 }
3787
3788 /**
3789 * Sets whether this database supports savepoints.
3790 *
3791 * @param supportsSavepoints <code>true</code> if savepoints are supported; <code>false</code> otherwise
3792 * @since 1.4 (JDBC 3.0)
3793 */
3794 public void setSupportsSavepoints( Boolean supportsSavepoints ) {
3795 this.supportsSavepoints = supportsSavepoints;
3796 }
3797
3798 /**
3799 * Retrieves whether this database supports named parameters to callable statements.
3800 *
3801 * @return <code>true</code> if named parameters are supported; <code>false</code> otherwise
3802 * @since 1.4 (JDBC 3.0)
3803 */
3804 public Boolean isSupportsNamedParameters() {
3805 return supportsNamedParameters;
3806 }
3807
3808 /**
3809 * Sets whether this database supports named parameters to callable statements.
3810 *
3811 * @param supportsNamedParameters <code>true</code> if named parameters are supported; <code>false</code> otherwise
3812 * @since 1.4 (JDBC 3.0)
3813 */
3814 public void setSupportsNamedParameters( Boolean supportsNamedParameters ) {
3815 this.supportsNamedParameters = supportsNamedParameters;
3816 }
3817
3818 /**
3819 * Retrieves whether it is possible to have multiple <code>ResultSet</code> objects returned from a
3820 * <code>CallableStatement</code> object simultaneously.
3821 *
3822 * @return <code>true</code> if a <code>CallableStatement</code> object can return multiple <code>ResultSet</code> objects
3823 * simultaneously; <code>false</code> otherwise
3824 * @since 1.4 (JDBC 3.0)
3825 */
3826 public Boolean isSupportsMultipleOpenResults() {
3827 return supportsMultipleOpenResults;
3828 }
3829
3830 /**
3831 * Sets whether it is possible to have multiple <code>ResultSet</code> objects returned from a <code>CallableStatement</code>
3832 * object simultaneously.
3833 *
3834 * @param supportsMultipleOpenResults <code>true</code> if a <code>CallableStatement</code> object can return multiple
3835 * <code>ResultSet</code> objects simultaneously; <code>false</code> otherwise
3836 * @since 1.4 (JDBC 3.0)
3837 */
3838 public void setSupportsMultipleOpenResults( Boolean supportsMultipleOpenResults ) {
3839 this.supportsMultipleOpenResults = supportsMultipleOpenResults;
3840 }
3841
3842 /**
3843 * Retrieves whether auto-generated keys can be retrieved after a statement has been executed.
3844 *
3845 * @return <code>true</code> if auto-generated keys can be retrieved after a statement has executed; <code>false</code>
3846 * otherwise
3847 * @since 1.4 (JDBC 3.0)
3848 */
3849 public Boolean isSupportsGetGeneratedKeys() {
3850 return supportsGetGeneratedKeys;
3851 }
3852
3853 /**
3854 * Sets whether auto-generated keys can be retrieved after a statement has been executed.
3855 *
3856 * @param supportsGetGeneratedKeys <code>true</code> if auto-generated keys can be retrieved after a statement has executed;
3857 * <code>false</code> otherwise
3858 * @since 1.4 (JDBC 3.0)
3859 */
3860 public void setSupportsGetGeneratedKeys( Boolean supportsGetGeneratedKeys ) {
3861 this.supportsGetGeneratedKeys = supportsGetGeneratedKeys;
3862 }
3863
3864 /**
3865 * Retrieves whether this database supports the given result set holdability.
3866 *
3867 * @return <code>true</code> if so; <code>false</code> otherwise
3868 * @see java.sql.Connection
3869 * @since 1.4 (JDBC 3.0)
3870 */
3871 public Boolean isSupportsResultSetHoldCurrorsOverCommitHoldability() {
3872 return supportsResultSetHoldCurrorsOverCommitHoldability;
3873 }
3874
3875 /**
3876 * Sets whether this database supports the given result set holdability.
3877 *
3878 * @param supportsResultSetHoldCurrorsOverCommitHoldability <code>true</code> if so; <code>false</code> otherwise
3879 * @see java.sql.Connection
3880 * @since 1.4 (JDBC 3.0)
3881 */
3882 public void setSupportsResultSetHoldCurrorsOverCommitHoldability( Boolean supportsResultSetHoldCurrorsOverCommitHoldability ) {
3883 this.supportsResultSetHoldCurrorsOverCommitHoldability = supportsResultSetHoldCurrorsOverCommitHoldability;
3884 }
3885
3886 /**
3887 * Retrieves whether this database supports the given result set holdability.
3888 *
3889 * @return <code>true</code> if so; <code>false</code> otherwise
3890 * @see java.sql.Connection
3891 * @since 1.4 (JDBC 3.0)
3892 */
3893 public Boolean isSupportsResultSetCloseCurrorsAtCommitHoldability() {
3894 return supportsResultSetCloseCurrorsAtCommitHoldability;
3895 }
3896
3897 /**
3898 * Sets whether this database supports the given result set holdability.
3899 *
3900 * @param supportsResultSetCloseCurrorsAtCommitHoldability <code>true</code> if so; <code>false</code> otherwise
3901 * @see java.sql.Connection
3902 * @since 1.4 (JDBC 3.0)
3903 */
3904 public void setSupportsResultSetCloseCurrorsAtCommitHoldability( Boolean supportsResultSetCloseCurrorsAtCommitHoldability ) {
3905 this.supportsResultSetCloseCurrorsAtCommitHoldability = supportsResultSetCloseCurrorsAtCommitHoldability;
3906 }
3907
3908 /**
3909 * Retrieves the default holdability of this <code>ResultSet</code> object.
3910 *
3911 * @return the default holdability; either <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or
3912 * <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>
3913 *
3914 * @since 1.4
3915 */
3916 public ResultSetHoldabilityType getResultSetHoldabilityType() {
3917 return resultSetHoldabilityType;
3918 }
3919
3920 /**
3921 * Sets the default holdability of this <code>ResultSet</code> object.
3922 *
3923 * @param resultSetHoldabilityType the ResultSetHoldabilityType
3924 * the default holdability; either <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or
3925 * <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>
3926 *
3927 * @since 1.4
3928 */
3929 public void setResultSetHoldabilityType( ResultSetHoldabilityType resultSetHoldabilityType ) {
3930 this.resultSetHoldabilityType = resultSetHoldabilityType;
3931 }
3932
3933 /**
3934 * Retrieves the major version number of the underlying database.
3935 *
3936 * @return the underlying database's major version
3937 * @since 1.4 (JDBC 3.0)
3938 */
3939 public Integer getDatabaseMajorVersion() {
3940 return databaseMajorVersion;
3941 }
3942
3943 /**
3944 * Sets the major version number of the underlying database.
3945 *
3946 * @param databaseMajorVersion the underlying database's major version
3947 * @since 1.4 (JDBC 3.0)
3948 */
3949 public void setDatabaseMajorVersion( Integer databaseMajorVersion ) {
3950 this.databaseMajorVersion = databaseMajorVersion;
3951 }
3952
3953 /**
3954 * Retrieves the minor version number of the underlying database.
3955 *
3956 * @return underlying database's minor version
3957 * @since 1.4 (JDBC 3.0)
3958 */
3959 public Integer getDatabaseMinorVersion() {
3960 return databaseMinorVersion;
3961 }
3962
3963 /**
3964 * Sets the minor version number of the underlying database.
3965 *
3966 * @param databaseMinorVersion underlying database's minor version
3967 * @since 1.4 (JDBC 3.0)
3968 */
3969 public void setDatabaseMinorVersion( Integer databaseMinorVersion ) {
3970 this.databaseMinorVersion = databaseMinorVersion;
3971 }
3972
3973 /**
3974 * Retrieves the major JDBC version number for this driver.
3975 *
3976 * @return JDBC version major number
3977 * @since 1.4 (JDBC 3.0)
3978 */
3979 public Integer getJDBCMajorVersion() {
3980 return jdbcMajorVersion;
3981 }
3982
3983 /**
3984 * Sets the major JDBC version number for this driver.
3985 *
3986 * @param jdbcMajorVersion JDBC version major number
3987 * @since 1.4 (JDBC 3.0)
3988 */
3989 public void setJDBCMajorVersion( Integer jdbcMajorVersion ) {
3990 this.jdbcMajorVersion = jdbcMajorVersion;
3991 }
3992
3993 /**
3994 * Retrieves the minor JDBC version number for this driver.
3995 *
3996 * @return JDBC version minor number
3997 * @since 1.4 (JDBC 3.0)
3998 */
3999 public Integer getJDBCMinorVersion() {
4000 return jdbcMinorVersion;
4001 }
4002
4003 /**
4004 * Sets the minor JDBC version number for this driver.
4005 *
4006 * @param jdbcMinorVersion JDBC version minor number
4007 * @since 1.4 (JDBC 3.0)
4008 */
4009 public void setJDBCMinorVersion( Integer jdbcMinorVersion ) {
4010 this.jdbcMinorVersion = jdbcMinorVersion;
4011 }
4012
4013 /**
4014 * Indicates whether the SQLSTATE returned by <code>SQLException.getSQLState</code> is X/Open (now known as Open Group) SQL
4015 * CLI or SQL99.
4016 *
4017 * @return the type of SQLSTATE; one of: sqlStateXOpen or sqlStateSQL99
4018 * @since 1.4 (JDBC 3.0)
4019 */
4020 public SQLStateType getSQLStateType() {
4021 return sqlStateType;
4022 }
4023
4024 /**
4025 * Indicates whether the SQLSTATE returned by <code>SQLException.getSQLState</code> is X/Open (now known as Open Group) SQL
4026 * CLI or SQL99.
4027 *
4028 * @param sqlStateType the type of SQLSTATE; one of: sqlStateXOpen or sqlStateSQL99
4029 * @since 1.4 (JDBC 3.0)
4030 */
4031 public void setSQLStateType( SQLStateType sqlStateType ) {
4032 this.sqlStateType = sqlStateType;
4033 }
4034
4035 /**
4036 * Indicates whether updates made to a LOB are made on a copy or directly to the LOB.
4037 *
4038 * @return <code>true</code> if updates are made to a copy of the LOB; <code>false</code> if updates are made directly to the
4039 * LOB
4040 * @since 1.4 (JDBC 3.0)
4041 */
4042 public Boolean isLocatorsUpdateCopy() {
4043 return locatorsUpdateCopy;
4044 }
4045
4046 /**
4047 * Indicates whether updates made to a LOB are made on a copy or directly to the LOB.
4048 *
4049 * @param locatorsUpdateCopy <code>true</code> if updates are made to a copy of the LOB; <code>false</code> if updates are
4050 * made directly to the LOB
4051 * @since 1.4 (JDBC 3.0)
4052 */
4053 public void setLocatorsUpdateCopy( Boolean locatorsUpdateCopy ) {
4054 this.locatorsUpdateCopy = locatorsUpdateCopy;
4055 }
4056
4057 /**
4058 * Retrieves whether this database supports statement pooling.
4059 *
4060 * @return <code>true</code> if so; <code>false</code> otherwise
4061 * @since 1.4 (JDBC 3.0)
4062 */
4063 public Boolean isSupportsStatementPooling() {
4064 return supportsStatementPooling;
4065 }
4066
4067 /**
4068 * Sets whether this database supports statement pooling.
4069 *
4070 * @param supportsStatementPooling <code>true</code> if so; <code>false</code> otherwise
4071 * @since 1.4 (JDBC 3.0)
4072 */
4073 public void setSupportsStatementPooling( Boolean supportsStatementPooling ) {
4074 this.supportsStatementPooling = supportsStatementPooling;
4075 }
4076
4077 }