Source Code Cross Referenced for ConnectionPropertiesImpl.java in  » Database-JDBC-Connection-Pool » mysql-connector-java-5.1.3 » com » mysql » jdbc » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database JDBC Connection Pool » mysql connector java 5.1.3 » com.mysql.jdbc 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        /*
0002:         Copyright (C) 2002-2007 MySQL AB
0003:
0004:         This program is free software; you can redistribute it and/or modify
0005:         it under the terms of version 2 of the GNU General Public License as 
0006:         published by the Free Software Foundation.
0007:
0008:         There are special exceptions to the terms and conditions of the GPL 
0009:         as it is applied to this software. View the full text of the 
0010:         exception in file EXCEPTIONS-CONNECTOR-J in the directory of this 
0011:         software distribution.
0012:
0013:         This program is distributed in the hope that it will be useful,
0014:         but WITHOUT ANY WARRANTY; without even the implied warranty of
0015:         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0016:         GNU General Public License for more details.
0017:
0018:         You should have received a copy of the GNU General Public License
0019:         along with this program; if not, write to the Free Software
0020:         Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
0021:
0022:         */
0023:
0024:        package com.mysql.jdbc;
0025:
0026:        import com.mysql.jdbc.log.Log;
0027:        import com.mysql.jdbc.log.StandardLogger;
0028:
0029:        import java.io.Serializable;
0030:        import java.io.UnsupportedEncodingException;
0031:
0032:        import java.sql.DriverPropertyInfo;
0033:        import java.sql.SQLException;
0034:
0035:        import java.util.ArrayList;
0036:        import java.util.HashMap;
0037:        import java.util.Iterator;
0038:        import java.util.Map;
0039:        import java.util.Properties;
0040:        import java.util.TreeMap;
0041:
0042:        import javax.naming.RefAddr;
0043:        import javax.naming.Reference;
0044:        import javax.naming.StringRefAddr;
0045:
0046:        /**
0047:         * Represents configurable properties for Connections and DataSources. Can also
0048:         * expose properties as JDBC DriverPropertyInfo if required as well.
0049:         * 
0050:         * @author Mark Matthews
0051:         * @version $Id: ConnectionProperties.java,v 1.1.2.2 2005/05/17 14:58:56
0052:         *          mmatthews Exp $
0053:         */
0054:        public class ConnectionPropertiesImpl implements  Serializable,
0055:                ConnectionProperties {
0056:
0057:            private static final long serialVersionUID = 4257801713007640580L;
0058:
0059:            class BooleanConnectionProperty extends ConnectionProperty
0060:                    implements  Serializable {
0061:
0062:                private static final long serialVersionUID = 2540132501709159404L;
0063:
0064:                /**
0065:                 * DOCUMENT ME!
0066:                 * 
0067:                 * @param propertyNameToSet
0068:                 * @param defaultValueToSet
0069:                 * @param descriptionToSet
0070:                 *            DOCUMENT ME!
0071:                 * @param sinceVersionToSet
0072:                 *            DOCUMENT ME!
0073:                 */
0074:                BooleanConnectionProperty(String propertyNameToSet,
0075:                        boolean defaultValueToSet, String descriptionToSet,
0076:                        String sinceVersionToSet, String category,
0077:                        int orderInCategory) {
0078:                    super (propertyNameToSet,
0079:                            Boolean.valueOf(defaultValueToSet), null, 0, 0,
0080:                            descriptionToSet, sinceVersionToSet, category,
0081:                            orderInCategory);
0082:                }
0083:
0084:                /**
0085:                 * @see com.mysql.jdbc.ConnectionPropertiesImpl.ConnectionProperty#getAllowableValues()
0086:                 */
0087:                String[] getAllowableValues() {
0088:                    return new String[] { "true", "false", "yes", "no" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
0089:                }
0090:
0091:                boolean getValueAsBoolean() {
0092:                    return ((Boolean) this .valueAsObject).booleanValue();
0093:                }
0094:
0095:                /**
0096:                 * @see com.mysql.jdbc.ConnectionPropertiesImpl.ConnectionProperty#hasValueConstraints()
0097:                 */
0098:                boolean hasValueConstraints() {
0099:                    return true;
0100:                }
0101:
0102:                /**
0103:                 * @see com.mysql.jdbc.ConnectionPropertiesImpl.ConnectionProperty#initializeFrom(java.util.Properties)
0104:                 */
0105:                void initializeFrom(String extractedValue) throws SQLException {
0106:                    if (extractedValue != null) {
0107:                        validateStringValues(extractedValue);
0108:
0109:                        this .valueAsObject = Boolean.valueOf(extractedValue
0110:                                .equalsIgnoreCase("TRUE") //$NON-NLS-1$
0111:                                || extractedValue.equalsIgnoreCase("YES")); //$NON-NLS-1$
0112:                    } else {
0113:                        this .valueAsObject = this .defaultValue;
0114:                    }
0115:                }
0116:
0117:                /**
0118:                 * @see com.mysql.jdbc.ConnectionPropertiesImpl.ConnectionProperty#isRangeBased()
0119:                 */
0120:                boolean isRangeBased() {
0121:                    return false;
0122:                }
0123:
0124:                void setValue(boolean valueFlag) {
0125:                    this .valueAsObject = Boolean.valueOf(valueFlag);
0126:                }
0127:            }
0128:
0129:            abstract class ConnectionProperty implements  Serializable {
0130:                String[] allowableValues;
0131:
0132:                String categoryName;
0133:
0134:                Object defaultValue;
0135:
0136:                int lowerBound;
0137:
0138:                int order;
0139:
0140:                String propertyName;
0141:
0142:                String sinceVersion;
0143:
0144:                int upperBound;
0145:
0146:                Object valueAsObject;
0147:
0148:                boolean required;
0149:
0150:                String description;
0151:
0152:                public ConnectionProperty() {
0153:                }
0154:
0155:                ConnectionProperty(String propertyNameToSet,
0156:                        Object defaultValueToSet,
0157:                        String[] allowableValuesToSet, int lowerBoundToSet,
0158:                        int upperBoundToSet, String descriptionToSet,
0159:                        String sinceVersionToSet, String category,
0160:                        int orderInCategory) {
0161:
0162:                    this .description = descriptionToSet;
0163:                    this .propertyName = propertyNameToSet;
0164:                    this .defaultValue = defaultValueToSet;
0165:                    this .valueAsObject = defaultValueToSet;
0166:                    this .allowableValues = allowableValuesToSet;
0167:                    this .lowerBound = lowerBoundToSet;
0168:                    this .upperBound = upperBoundToSet;
0169:                    this .required = false;
0170:                    this .sinceVersion = sinceVersionToSet;
0171:                    this .categoryName = category;
0172:                    this .order = orderInCategory;
0173:                }
0174:
0175:                String[] getAllowableValues() {
0176:                    return this .allowableValues;
0177:                }
0178:
0179:                /**
0180:                 * @return Returns the categoryName.
0181:                 */
0182:                String getCategoryName() {
0183:                    return this .categoryName;
0184:                }
0185:
0186:                Object getDefaultValue() {
0187:                    return this .defaultValue;
0188:                }
0189:
0190:                int getLowerBound() {
0191:                    return this .lowerBound;
0192:                }
0193:
0194:                /**
0195:                 * @return Returns the order.
0196:                 */
0197:                int getOrder() {
0198:                    return this .order;
0199:                }
0200:
0201:                String getPropertyName() {
0202:                    return this .propertyName;
0203:                }
0204:
0205:                int getUpperBound() {
0206:                    return this .upperBound;
0207:                }
0208:
0209:                Object getValueAsObject() {
0210:                    return this .valueAsObject;
0211:                }
0212:
0213:                abstract boolean hasValueConstraints();
0214:
0215:                void initializeFrom(Properties extractFrom) throws SQLException {
0216:                    String extractedValue = extractFrom
0217:                            .getProperty(getPropertyName());
0218:                    extractFrom.remove(getPropertyName());
0219:                    initializeFrom(extractedValue);
0220:                }
0221:
0222:                void initializeFrom(Reference ref) throws SQLException {
0223:                    RefAddr refAddr = ref.get(getPropertyName());
0224:
0225:                    if (refAddr != null) {
0226:                        String refContentAsString = (String) refAddr
0227:                                .getContent();
0228:
0229:                        initializeFrom(refContentAsString);
0230:                    }
0231:                }
0232:
0233:                abstract void initializeFrom(String extractedValue)
0234:                        throws SQLException;
0235:
0236:                abstract boolean isRangeBased();
0237:
0238:                /**
0239:                 * @param categoryName
0240:                 *            The categoryName to set.
0241:                 */
0242:                void setCategoryName(String categoryName) {
0243:                    this .categoryName = categoryName;
0244:                }
0245:
0246:                /**
0247:                 * @param order
0248:                 *            The order to set.
0249:                 */
0250:                void setOrder(int order) {
0251:                    this .order = order;
0252:                }
0253:
0254:                void setValueAsObject(Object obj) {
0255:                    this .valueAsObject = obj;
0256:                }
0257:
0258:                void storeTo(Reference ref) {
0259:                    if (getValueAsObject() != null) {
0260:                        ref.add(new StringRefAddr(getPropertyName(),
0261:                                getValueAsObject().toString()));
0262:                    }
0263:                }
0264:
0265:                DriverPropertyInfo getAsDriverPropertyInfo() {
0266:                    DriverPropertyInfo dpi = new DriverPropertyInfo(
0267:                            this .propertyName, null);
0268:                    dpi.choices = getAllowableValues();
0269:                    dpi.value = (this .valueAsObject != null) ? this .valueAsObject
0270:                            .toString()
0271:                            : null;
0272:                    dpi.required = this .required;
0273:                    dpi.description = this .description;
0274:
0275:                    return dpi;
0276:                }
0277:
0278:                void validateStringValues(String valueToValidate)
0279:                        throws SQLException {
0280:                    String[] validateAgainst = getAllowableValues();
0281:
0282:                    if (valueToValidate == null) {
0283:                        return;
0284:                    }
0285:
0286:                    if ((validateAgainst == null)
0287:                            || (validateAgainst.length == 0)) {
0288:                        return;
0289:                    }
0290:
0291:                    for (int i = 0; i < validateAgainst.length; i++) {
0292:                        if ((validateAgainst[i] != null)
0293:                                && validateAgainst[i]
0294:                                        .equalsIgnoreCase(valueToValidate)) {
0295:                            return;
0296:                        }
0297:                    }
0298:
0299:                    StringBuffer errorMessageBuf = new StringBuffer();
0300:
0301:                    errorMessageBuf.append("The connection property '"); //$NON-NLS-1$
0302:                    errorMessageBuf.append(getPropertyName());
0303:                    errorMessageBuf
0304:                            .append("' only accepts values of the form: "); //$NON-NLS-1$
0305:
0306:                    if (validateAgainst.length != 0) {
0307:                        errorMessageBuf.append("'"); //$NON-NLS-1$
0308:                        errorMessageBuf.append(validateAgainst[0]);
0309:                        errorMessageBuf.append("'"); //$NON-NLS-1$
0310:
0311:                        for (int i = 1; i < (validateAgainst.length - 1); i++) {
0312:                            errorMessageBuf.append(", "); //$NON-NLS-1$
0313:                            errorMessageBuf.append("'"); //$NON-NLS-1$
0314:                            errorMessageBuf.append(validateAgainst[i]);
0315:                            errorMessageBuf.append(Messages.getString("'")); //$NON-NLS-1$
0316:                        }
0317:
0318:                        errorMessageBuf.append(" or '"); //$NON-NLS-1$
0319:                        errorMessageBuf
0320:                                .append(validateAgainst[validateAgainst.length - 1]);
0321:                        errorMessageBuf.append("'"); //$NON-NLS-1$
0322:                    }
0323:
0324:                    errorMessageBuf.append(". The value '"); //$NON-NLS-1$
0325:                    errorMessageBuf.append(valueToValidate);
0326:                    errorMessageBuf.append("' is not in this set."); //$NON-NLS-1$
0327:
0328:                    throw SQLError.createSQLException(errorMessageBuf
0329:                            .toString(), SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
0330:                }
0331:            }
0332:
0333:            class IntegerConnectionProperty extends ConnectionProperty
0334:                    implements  Serializable {
0335:
0336:                private static final long serialVersionUID = -3004305481796850832L;
0337:
0338:                public IntegerConnectionProperty(String propertyNameToSet,
0339:                        Object defaultValueToSet,
0340:                        String[] allowableValuesToSet, int lowerBoundToSet,
0341:                        int upperBoundToSet, String descriptionToSet,
0342:                        String sinceVersionToSet, String category,
0343:                        int orderInCategory) {
0344:                    super (propertyNameToSet, defaultValueToSet,
0345:                            allowableValuesToSet, lowerBoundToSet,
0346:                            upperBoundToSet, descriptionToSet,
0347:                            sinceVersionToSet, category, orderInCategory);
0348:                }
0349:
0350:                int multiplier = 1;
0351:
0352:                IntegerConnectionProperty(String propertyNameToSet,
0353:                        int defaultValueToSet, int lowerBoundToSet,
0354:                        int upperBoundToSet, String descriptionToSet,
0355:                        String sinceVersionToSet, String category,
0356:                        int orderInCategory) {
0357:                    super (propertyNameToSet, new Integer(defaultValueToSet),
0358:                            null, lowerBoundToSet, upperBoundToSet,
0359:                            descriptionToSet, sinceVersionToSet, category,
0360:                            orderInCategory);
0361:                }
0362:
0363:                /**
0364:                 * DOCUMENT ME!
0365:                 * 
0366:                 * @param propertyNameToSet
0367:                 * @param defaultValueToSet
0368:                 * @param descriptionToSet
0369:                 * @param sinceVersionToSet
0370:                 *            DOCUMENT ME!
0371:                 */
0372:
0373:                IntegerConnectionProperty(String propertyNameToSet,
0374:                        int defaultValueToSet, String descriptionToSet,
0375:                        String sinceVersionToSet, String category,
0376:                        int orderInCategory) {
0377:                    this (propertyNameToSet, defaultValueToSet, 0, 0,
0378:                            descriptionToSet, sinceVersionToSet, category,
0379:                            orderInCategory);
0380:                }
0381:
0382:                /**
0383:                 * @see com.mysql.jdbc.ConnectionProperties.ConnectionProperty#getAllowableValues()
0384:                 */
0385:                String[] getAllowableValues() {
0386:                    return null;
0387:                }
0388:
0389:                /**
0390:                 * @see com.mysql.jdbc.ConnectionProperties.ConnectionProperty#getLowerBound()
0391:                 */
0392:                int getLowerBound() {
0393:                    return this .lowerBound;
0394:                }
0395:
0396:                /**
0397:                 * @see com.mysql.jdbc.ConnectionProperties.ConnectionProperty#getUpperBound()
0398:                 */
0399:                int getUpperBound() {
0400:                    return this .upperBound;
0401:                }
0402:
0403:                int getValueAsInt() {
0404:                    return ((Integer) this .valueAsObject).intValue();
0405:                }
0406:
0407:                /**
0408:                 * @see com.mysql.jdbc.ConnectionProperties.ConnectionProperty#hasValueConstraints()
0409:                 */
0410:                boolean hasValueConstraints() {
0411:                    return false;
0412:                }
0413:
0414:                /**
0415:                 * @see com.mysql.jdbc.ConnectionProperties.ConnectionProperty#initializeFrom(java.lang.String)
0416:                 */
0417:                void initializeFrom(String extractedValue) throws SQLException {
0418:                    if (extractedValue != null) {
0419:                        try {
0420:                            // Parse decimals, too
0421:                            int intValue = Double.valueOf(extractedValue)
0422:                                    .intValue();
0423:
0424:                            /*
0425:                             * if (isRangeBased()) { if ((intValue < getLowerBound()) ||
0426:                             * (intValue > getUpperBound())) { throw new
0427:                             * SQLException("The connection property '" +
0428:                             * getPropertyName() + "' only accepts integer values in the
0429:                             * range of " + getLowerBound() + " - " + getUpperBound() + ",
0430:                             * the value '" + extractedValue + "' exceeds this range.",
0431:                             * SQLError.SQL_STATE_ILLEGAL_ARGUMENT); } }
0432:                             */
0433:                            this .valueAsObject = new Integer(intValue
0434:                                    * multiplier);
0435:                        } catch (NumberFormatException nfe) {
0436:                            throw SQLError
0437:                                    .createSQLException(
0438:                                            "The connection property '" //$NON-NLS-1$
0439:                                                    + getPropertyName()
0440:                                                    + "' only accepts integer values. The value '" //$NON-NLS-1$
0441:                                                    + extractedValue
0442:                                                    + "' can not be converted to an integer.", //$NON-NLS-1$
0443:                                            SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
0444:                        }
0445:                    } else {
0446:                        this .valueAsObject = this .defaultValue;
0447:                    }
0448:                }
0449:
0450:                /**
0451:                 * @see com.mysql.jdbc.ConnectionProperties.ConnectionProperty#isRangeBased()
0452:                 */
0453:                boolean isRangeBased() {
0454:                    return getUpperBound() != getLowerBound();
0455:                }
0456:
0457:                void setValue(int valueFlag) {
0458:                    this .valueAsObject = new Integer(valueFlag);
0459:                }
0460:            }
0461:
0462:            public class LongConnectionProperty extends
0463:                    IntegerConnectionProperty {
0464:
0465:                private static final long serialVersionUID = 6068572984340480895L;
0466:
0467:                LongConnectionProperty(String propertyNameToSet,
0468:                        long defaultValueToSet, long lowerBoundToSet,
0469:                        long upperBoundToSet, String descriptionToSet,
0470:                        String sinceVersionToSet, String category,
0471:                        int orderInCategory) {
0472:                    super (propertyNameToSet, new Long(defaultValueToSet), null,
0473:                            (int) lowerBoundToSet, (int) upperBoundToSet,
0474:                            descriptionToSet, sinceVersionToSet, category,
0475:                            orderInCategory);
0476:                }
0477:
0478:                LongConnectionProperty(String propertyNameToSet,
0479:                        long defaultValueToSet, String descriptionToSet,
0480:                        String sinceVersionToSet, String category,
0481:                        int orderInCategory) {
0482:                    this (propertyNameToSet, defaultValueToSet, 0, 0,
0483:                            descriptionToSet, sinceVersionToSet, category,
0484:                            orderInCategory);
0485:                }
0486:
0487:                void setValue(long value) {
0488:                    this .valueAsObject = new Long(value);
0489:                }
0490:
0491:                long getValueAsLong() {
0492:                    return ((Long) this .valueAsObject).longValue();
0493:                }
0494:
0495:                void initializeFrom(String extractedValue) throws SQLException {
0496:                    if (extractedValue != null) {
0497:                        try {
0498:                            // Parse decimals, too
0499:                            long longValue = Double.valueOf(extractedValue)
0500:                                    .longValue();
0501:
0502:                            this .valueAsObject = new Long(longValue);
0503:                        } catch (NumberFormatException nfe) {
0504:                            throw SQLError
0505:                                    .createSQLException(
0506:                                            "The connection property '" //$NON-NLS-1$
0507:                                                    + getPropertyName()
0508:                                                    + "' only accepts long integer values. The value '" //$NON-NLS-1$
0509:                                                    + extractedValue
0510:                                                    + "' can not be converted to a long integer.", //$NON-NLS-1$
0511:                                            SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
0512:                        }
0513:                    } else {
0514:                        this .valueAsObject = this .defaultValue;
0515:                    }
0516:                }
0517:            }
0518:
0519:            class MemorySizeConnectionProperty extends
0520:                    IntegerConnectionProperty implements  Serializable {
0521:
0522:                private static final long serialVersionUID = 7351065128998572656L;
0523:
0524:                private String valueAsString;
0525:
0526:                MemorySizeConnectionProperty(String propertyNameToSet,
0527:                        int defaultValueToSet, int lowerBoundToSet,
0528:                        int upperBoundToSet, String descriptionToSet,
0529:                        String sinceVersionToSet, String category,
0530:                        int orderInCategory) {
0531:                    super (propertyNameToSet, defaultValueToSet,
0532:                            lowerBoundToSet, upperBoundToSet, descriptionToSet,
0533:                            sinceVersionToSet, category, orderInCategory);
0534:                    // TODO Auto-generated constructor stub
0535:                }
0536:
0537:                void initializeFrom(String extractedValue) throws SQLException {
0538:                    valueAsString = extractedValue;
0539:
0540:                    if (extractedValue != null) {
0541:                        if (extractedValue.endsWith("k") //$NON-NLS-1$
0542:                                || extractedValue.endsWith("K") //$NON-NLS-1$
0543:                                || extractedValue.endsWith("kb") //$NON-NLS-1$
0544:                                || extractedValue.endsWith("Kb") //$NON-NLS-1$
0545:                                || extractedValue.endsWith("kB")) { //$NON-NLS-1$
0546:                            multiplier = 1024;
0547:                            int indexOfK = StringUtils.indexOfIgnoreCase(
0548:                                    extractedValue, "k"); //$NON-NLS-1$
0549:                            extractedValue = extractedValue.substring(0,
0550:                                    indexOfK);
0551:                        } else if (extractedValue.endsWith("m") //$NON-NLS-1$
0552:                                || extractedValue.endsWith("M") //$NON-NLS-1$
0553:                                || extractedValue.endsWith("G") //$NON-NLS-1$
0554:                                || extractedValue.endsWith("mb") //$NON-NLS-1$
0555:                                || extractedValue.endsWith("Mb") //$NON-NLS-1$
0556:                                || extractedValue.endsWith("mB")) { //$NON-NLS-1$
0557:                            multiplier = 1024 * 1024;
0558:                            int indexOfM = StringUtils.indexOfIgnoreCase(
0559:                                    extractedValue, "m"); //$NON-NLS-1$
0560:                            extractedValue = extractedValue.substring(0,
0561:                                    indexOfM);
0562:                        } else if (extractedValue.endsWith("g") //$NON-NLS-1$
0563:                                || extractedValue.endsWith("G") //$NON-NLS-1$
0564:                                || extractedValue.endsWith("gb") //$NON-NLS-1$
0565:                                || extractedValue.endsWith("Gb") //$NON-NLS-1$
0566:                                || extractedValue.endsWith("gB")) { //$NON-NLS-1$
0567:                            multiplier = 1024 * 1024 * 1024;
0568:                            int indexOfG = StringUtils.indexOfIgnoreCase(
0569:                                    extractedValue, "g"); //$NON-NLS-1$
0570:                            extractedValue = extractedValue.substring(0,
0571:                                    indexOfG);
0572:                        }
0573:                    }
0574:
0575:                    super .initializeFrom(extractedValue);
0576:                }
0577:
0578:                void setValue(String value) throws SQLException {
0579:                    initializeFrom(value);
0580:                }
0581:
0582:                String getValueAsString() {
0583:                    return valueAsString;
0584:                }
0585:            }
0586:
0587:            class StringConnectionProperty extends ConnectionProperty implements 
0588:                    Serializable {
0589:
0590:                private static final long serialVersionUID = 5432127962785948272L;
0591:
0592:                StringConnectionProperty(String propertyNameToSet,
0593:                        String defaultValueToSet, String descriptionToSet,
0594:                        String sinceVersionToSet, String category,
0595:                        int orderInCategory) {
0596:                    this (propertyNameToSet, defaultValueToSet, null,
0597:                            descriptionToSet, sinceVersionToSet, category,
0598:                            orderInCategory);
0599:                }
0600:
0601:                /**
0602:                 * DOCUMENT ME!
0603:                 * 
0604:                 * @param propertyNameToSet
0605:                 * @param defaultValueToSet
0606:                 * @param allowableValuesToSet
0607:                 * @param descriptionToSet
0608:                 * @param sinceVersionToSet
0609:                 *            DOCUMENT ME!
0610:                 */
0611:                StringConnectionProperty(String propertyNameToSet,
0612:                        String defaultValueToSet,
0613:                        String[] allowableValuesToSet, String descriptionToSet,
0614:                        String sinceVersionToSet, String category,
0615:                        int orderInCategory) {
0616:                    super (propertyNameToSet, defaultValueToSet,
0617:                            allowableValuesToSet, 0, 0, descriptionToSet,
0618:                            sinceVersionToSet, category, orderInCategory);
0619:                }
0620:
0621:                String getValueAsString() {
0622:                    return (String) this .valueAsObject;
0623:                }
0624:
0625:                /**
0626:                 * @see com.mysql.jdbc.ConnectionPropertiesImpl.ConnectionProperty#hasValueConstraints()
0627:                 */
0628:                boolean hasValueConstraints() {
0629:                    return (this .allowableValues != null)
0630:                            && (this .allowableValues.length > 0);
0631:                }
0632:
0633:                /**
0634:                 * @see com.mysql.jdbc.ConnectionPropertiesImpl.ConnectionProperty#initializeFrom(java.util.Properties)
0635:                 */
0636:                void initializeFrom(String extractedValue) throws SQLException {
0637:                    if (extractedValue != null) {
0638:                        validateStringValues(extractedValue);
0639:
0640:                        this .valueAsObject = extractedValue;
0641:                    } else {
0642:                        this .valueAsObject = this .defaultValue;
0643:                    }
0644:                }
0645:
0646:                /**
0647:                 * @see com.mysql.jdbc.ConnectionPropertiesImpl.ConnectionProperty#isRangeBased()
0648:                 */
0649:                boolean isRangeBased() {
0650:                    return false;
0651:                }
0652:
0653:                void setValue(String valueFlag) {
0654:                    this .valueAsObject = valueFlag;
0655:                }
0656:            }
0657:
0658:            private static final String CONNECTION_AND_AUTH_CATEGORY = Messages
0659:                    .getString("ConnectionProperties.categoryConnectionAuthentication"); //$NON-NLS-1$
0660:
0661:            private static final String NETWORK_CATEGORY = Messages
0662:                    .getString("ConnectionProperties.categoryNetworking"); //$NON-NLS-1$
0663:
0664:            private static final String DEBUGING_PROFILING_CATEGORY = Messages
0665:                    .getString("ConnectionProperties.categoryDebuggingProfiling"); //$NON-NLS-1$
0666:
0667:            private static final String HA_CATEGORY = Messages
0668:                    .getString("ConnectionProperties.categorryHA"); //$NON-NLS-1$
0669:
0670:            private static final String MISC_CATEGORY = Messages
0671:                    .getString("ConnectionProperties.categoryMisc"); //$NON-NLS-1$
0672:
0673:            private static final String PERFORMANCE_CATEGORY = Messages
0674:                    .getString("ConnectionProperties.categoryPerformance"); //$NON-NLS-1$
0675:
0676:            private static final String SECURITY_CATEGORY = Messages
0677:                    .getString("ConnectionProperties.categorySecurity"); //$NON-NLS-1$
0678:
0679:            private static final String[] PROPERTY_CATEGORIES = new String[] {
0680:                    CONNECTION_AND_AUTH_CATEGORY, NETWORK_CATEGORY,
0681:                    HA_CATEGORY, SECURITY_CATEGORY, PERFORMANCE_CATEGORY,
0682:                    DEBUGING_PROFILING_CATEGORY, MISC_CATEGORY };
0683:
0684:            private static final ArrayList PROPERTY_LIST = new ArrayList();
0685:
0686:            //
0687:            // Yes, this looks goofy, but we're trying to avoid intern()ing here
0688:            //
0689:            private static final String STANDARD_LOGGER_NAME = StandardLogger.class
0690:                    .getName();
0691:
0692:            protected static final String ZERO_DATETIME_BEHAVIOR_CONVERT_TO_NULL = "convertToNull"; //$NON-NLS-1$
0693:
0694:            protected static final String ZERO_DATETIME_BEHAVIOR_EXCEPTION = "exception"; //$NON-NLS-1$
0695:
0696:            protected static final String ZERO_DATETIME_BEHAVIOR_ROUND = "round"; //$NON-NLS-1$
0697:
0698:            static {
0699:                try {
0700:                    java.lang.reflect.Field[] declaredFields = ConnectionPropertiesImpl.class
0701:                            .getDeclaredFields();
0702:
0703:                    for (int i = 0; i < declaredFields.length; i++) {
0704:                        if (ConnectionPropertiesImpl.ConnectionProperty.class
0705:                                .isAssignableFrom(declaredFields[i].getType())) {
0706:                            PROPERTY_LIST.add(declaredFields[i]);
0707:                        }
0708:                    }
0709:                } catch (Exception ex) {
0710:                    throw new RuntimeException(ex.toString());
0711:                }
0712:            }
0713:
0714:            /**
0715:             * Exposes all ConnectionPropertyInfo instances as DriverPropertyInfo
0716:             * 
0717:             * @param info
0718:             *            the properties to load into these ConnectionPropertyInfo
0719:             *            instances
0720:             * @param slotsToReserve
0721:             *            the number of DPI slots to reserve for 'standard' DPI
0722:             *            properties (user, host, password, etc)
0723:             * @return a list of all ConnectionPropertyInfo instances, as
0724:             *         DriverPropertyInfo
0725:             * @throws SQLException
0726:             *             if an error occurs
0727:             */
0728:            protected static DriverPropertyInfo[] exposeAsDriverPropertyInfo(
0729:                    Properties info, int slotsToReserve) throws SQLException {
0730:                return (new ConnectionPropertiesImpl() {
0731:                }).exposeAsDriverPropertyInfoInternal(info, slotsToReserve);
0732:            }
0733:
0734:            private BooleanConnectionProperty allowLoadLocalInfile = new BooleanConnectionProperty(
0735:                    "allowLoadLocalInfile", //$NON-NLS-1$
0736:                    true, Messages
0737:                            .getString("ConnectionProperties.loadDataLocal"), //$NON-NLS-1$
0738:                    "3.0.3", SECURITY_CATEGORY, Integer.MAX_VALUE); //$NON-NLS-1$
0739:
0740:            private BooleanConnectionProperty allowMultiQueries = new BooleanConnectionProperty(
0741:                    "allowMultiQueries", //$NON-NLS-1$
0742:                    false,
0743:                    Messages
0744:                            .getString("ConnectionProperties.allowMultiQueries"), //$NON-NLS-1$
0745:                    "3.1.1", SECURITY_CATEGORY, 1); //$NON-NLS-1$
0746:
0747:            private BooleanConnectionProperty allowNanAndInf = new BooleanConnectionProperty(
0748:                    "allowNanAndInf", //$NON-NLS-1$
0749:                    false, Messages
0750:                            .getString("ConnectionProperties.allowNANandINF"), //$NON-NLS-1$
0751:                    "3.1.5", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
0752:
0753:            private BooleanConnectionProperty allowUrlInLocalInfile = new BooleanConnectionProperty(
0754:                    "allowUrlInLocalInfile", //$NON-NLS-1$
0755:                    false,
0756:                    Messages
0757:                            .getString("ConnectionProperties.allowUrlInLoadLocal"), //$NON-NLS-1$
0758:                    "3.1.4", SECURITY_CATEGORY, Integer.MAX_VALUE); //$NON-NLS-1$
0759:
0760:            private BooleanConnectionProperty alwaysSendSetIsolation = new BooleanConnectionProperty(
0761:                    "alwaysSendSetIsolation", //$NON-NLS-1$
0762:                    true,
0763:                    Messages
0764:                            .getString("ConnectionProperties.alwaysSendSetIsolation"), //$NON-NLS-1$
0765:                    "3.1.7", PERFORMANCE_CATEGORY, Integer.MAX_VALUE); //$NON-NLS-1$
0766:
0767:            private BooleanConnectionProperty autoClosePStmtStreams = new BooleanConnectionProperty(
0768:                    "autoClosePStmtStreams", //$NON-NLS-1$
0769:                    false,
0770:                    Messages
0771:                            .getString("ConnectionProperties.autoClosePstmtStreams"), //$NON-NLS-1$
0772:                    "3.1.12", //$NON-NLS-1$
0773:                    MISC_CATEGORY, Integer.MIN_VALUE);
0774:
0775:            private BooleanConnectionProperty autoDeserialize = new BooleanConnectionProperty(
0776:                    "autoDeserialize", //$NON-NLS-1$
0777:                    false, Messages
0778:                            .getString("ConnectionProperties.autoDeserialize"), //$NON-NLS-1$
0779:                    "3.1.5", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
0780:
0781:            private BooleanConnectionProperty autoGenerateTestcaseScript = new BooleanConnectionProperty(
0782:                    "autoGenerateTestcaseScript", false, //$NON-NLS-1$
0783:                    Messages
0784:                            .getString("ConnectionProperties.autoGenerateTestcaseScript"), "3.1.9", //$NON-NLS-1$ //$NON-NLS-2$
0785:                    DEBUGING_PROFILING_CATEGORY, Integer.MIN_VALUE);
0786:
0787:            private boolean autoGenerateTestcaseScriptAsBoolean = false;
0788:
0789:            private BooleanConnectionProperty autoReconnect = new BooleanConnectionProperty(
0790:                    "autoReconnect", //$NON-NLS-1$
0791:                    false, Messages
0792:                            .getString("ConnectionProperties.autoReconnect"), //$NON-NLS-1$
0793:                    "1.1", HA_CATEGORY, 0); //$NON-NLS-1$
0794:
0795:            private BooleanConnectionProperty autoReconnectForPools = new BooleanConnectionProperty(
0796:                    "autoReconnectForPools", //$NON-NLS-1$
0797:                    false,
0798:                    Messages
0799:                            .getString("ConnectionProperties.autoReconnectForPools"), //$NON-NLS-1$
0800:                    "3.1.3", HA_CATEGORY, 1); //$NON-NLS-1$
0801:
0802:            private boolean autoReconnectForPoolsAsBoolean = false;
0803:
0804:            private MemorySizeConnectionProperty blobSendChunkSize = new MemorySizeConnectionProperty(
0805:                    "blobSendChunkSize", //$NON-NLS-1$
0806:                    1024 * 1024,
0807:                    1,
0808:                    Integer.MAX_VALUE,
0809:                    Messages
0810:                            .getString("ConnectionProperties.blobSendChunkSize"), //$NON-NLS-1$
0811:                    "3.1.9", PERFORMANCE_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
0812:
0813:            private BooleanConnectionProperty blobsAreStrings = new BooleanConnectionProperty(
0814:                    "blobsAreStrings",
0815:                    false,
0816:                    "Should the driver always treat BLOBs as Strings - specifically to work around dubious metadata "
0817:                            + "returned by the server for GROUP BY clauses?",
0818:                    "5.0.8", MISC_CATEGORY, Integer.MIN_VALUE);
0819:
0820:            private BooleanConnectionProperty functionsNeverReturnBlobs = new BooleanConnectionProperty(
0821:                    "functionsNeverReturnBlobs",
0822:                    false,
0823:                    "Should the driver always treat data from functions returning BLOBs as Strings - specifically to work around dubious metadata "
0824:                            + "returned by the server for GROUP BY clauses?",
0825:                    "5.0.8", MISC_CATEGORY, Integer.MIN_VALUE);
0826:
0827:            private BooleanConnectionProperty cacheCallableStatements = new BooleanConnectionProperty(
0828:                    "cacheCallableStmts", false, //$NON-NLS-1$
0829:                    Messages
0830:                            .getString("ConnectionProperties.cacheCallableStatements"), //$NON-NLS-1$
0831:                    "3.1.2", PERFORMANCE_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
0832:
0833:            private BooleanConnectionProperty cachePreparedStatements = new BooleanConnectionProperty(
0834:                    "cachePrepStmts", //$NON-NLS-1$
0835:                    false, Messages
0836:                            .getString("ConnectionProperties.cachePrepStmts"), //$NON-NLS-1$
0837:                    "3.0.10", PERFORMANCE_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
0838:
0839:            private BooleanConnectionProperty cacheResultSetMetadata = new BooleanConnectionProperty(
0840:                    "cacheResultSetMetadata", //$NON-NLS-1$
0841:                    false, Messages
0842:                            .getString("ConnectionProperties.cacheRSMetadata"), //$NON-NLS-1$
0843:                    "3.1.1", PERFORMANCE_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
0844:
0845:            private boolean cacheResultSetMetaDataAsBoolean;
0846:
0847:            private BooleanConnectionProperty cacheServerConfiguration = new BooleanConnectionProperty(
0848:                    "cacheServerConfiguration", //$NON-NLS-1$
0849:                    false,
0850:                    Messages
0851:                            .getString("ConnectionProperties.cacheServerConfiguration"), //$NON-NLS-1$
0852:                    "3.1.5", PERFORMANCE_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
0853:
0854:            private IntegerConnectionProperty callableStatementCacheSize = new IntegerConnectionProperty(
0855:                    "callableStmtCacheSize", //$NON-NLS-1$
0856:                    100,
0857:                    0,
0858:                    Integer.MAX_VALUE,
0859:                    Messages
0860:                            .getString("ConnectionProperties.callableStmtCacheSize"), //$NON-NLS-1$
0861:                    "3.1.2", PERFORMANCE_CATEGORY, 5); //$NON-NLS-1$
0862:
0863:            private BooleanConnectionProperty capitalizeTypeNames = new BooleanConnectionProperty(
0864:                    "capitalizeTypeNames", //$NON-NLS-1$
0865:                    false,
0866:                    Messages
0867:                            .getString("ConnectionProperties.capitalizeTypeNames"), //$NON-NLS-1$
0868:                    "2.0.7", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
0869:
0870:            private StringConnectionProperty characterEncoding = new StringConnectionProperty(
0871:                    "characterEncoding", //$NON-NLS-1$
0872:                    null,
0873:                    Messages
0874:                            .getString("ConnectionProperties.characterEncoding"), //$NON-NLS-1$
0875:                    "1.1g", MISC_CATEGORY, 5); //$NON-NLS-1$
0876:
0877:            private String characterEncodingAsString = null;
0878:
0879:            private StringConnectionProperty characterSetResults = new StringConnectionProperty(
0880:                    "characterSetResults", null, //$NON-NLS-1$
0881:                    Messages
0882:                            .getString("ConnectionProperties.characterSetResults"), "3.0.13", //$NON-NLS-1$ //$NON-NLS-2$
0883:                    MISC_CATEGORY, 6);
0884:
0885:            private StringConnectionProperty clientInfoProvider = new StringConnectionProperty(
0886:                    "clientInfoProvider", "com.mysql.jdbc.JDBC4CommentClientInfoProvider", //$NON-NLS-1$ //$NON-NLS-2$
0887:                    Messages
0888:                            .getString("ConnectionProperties.clientInfoProvider"), //$NON-NLS-1$
0889:                    "5.1.0", //$NON-NLS-1$
0890:                    DEBUGING_PROFILING_CATEGORY, Integer.MIN_VALUE);
0891:
0892:            private BooleanConnectionProperty clobberStreamingResults = new BooleanConnectionProperty(
0893:                    "clobberStreamingResults", //$NON-NLS-1$
0894:                    false,
0895:                    Messages
0896:                            .getString("ConnectionProperties.clobberStreamingResults"), //$NON-NLS-1$
0897:                    "3.0.9", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
0898:
0899:            private StringConnectionProperty clobCharacterEncoding = new StringConnectionProperty(
0900:                    "clobCharacterEncoding", //$NON-NLS-1$
0901:                    null,
0902:                    Messages
0903:                            .getString("ConnectionProperties.clobCharacterEncoding"), //$NON-NLS-1$
0904:                    "5.0.0", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
0905:
0906:            private StringConnectionProperty connectionCollation = new StringConnectionProperty(
0907:                    "connectionCollation", //$NON-NLS-1$
0908:                    null,
0909:                    Messages
0910:                            .getString("ConnectionProperties.connectionCollation"), //$NON-NLS-1$
0911:                    "3.0.13", MISC_CATEGORY, 7); //$NON-NLS-1$
0912:
0913:            private IntegerConnectionProperty connectTimeout = new IntegerConnectionProperty(
0914:                    "connectTimeout", 0, 0, Integer.MAX_VALUE, //$NON-NLS-1$
0915:                    Messages.getString("ConnectionProperties.connectTimeout"), //$NON-NLS-1$
0916:                    "3.0.1", CONNECTION_AND_AUTH_CATEGORY, 9); //$NON-NLS-1$
0917:
0918:            private BooleanConnectionProperty continueBatchOnError = new BooleanConnectionProperty(
0919:                    "continueBatchOnError", //$NON-NLS-1$
0920:                    true,
0921:                    Messages
0922:                            .getString("ConnectionProperties.continueBatchOnError"), //$NON-NLS-1$
0923:                    "3.0.3", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
0924:
0925:            private BooleanConnectionProperty createDatabaseIfNotExist = new BooleanConnectionProperty(
0926:                    "createDatabaseIfNotExist", //$NON-NLS-1$
0927:                    false,
0928:                    Messages
0929:                            .getString("ConnectionProperties.createDatabaseIfNotExist"), //$NON-NLS-1$
0930:                    "3.1.9", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
0931:
0932:            private IntegerConnectionProperty defaultFetchSize = new IntegerConnectionProperty(
0933:                    "defaultFetchSize", 0, Messages.getString("ConnectionProperties.defaultFetchSize"), "3.1.9", PERFORMANCE_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
0934:
0935:            private BooleanConnectionProperty detectServerPreparedStmts = new BooleanConnectionProperty(
0936:                    "useServerPrepStmts", //$NON-NLS-1$
0937:                    false,
0938:                    Messages
0939:                            .getString("ConnectionProperties.useServerPrepStmts"), //$NON-NLS-1$
0940:                    "3.1.0", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
0941:
0942:            private BooleanConnectionProperty dontTrackOpenResources = new BooleanConnectionProperty(
0943:                    "dontTrackOpenResources", //$NON-NLS-1$
0944:                    false,
0945:                    Messages
0946:                            .getString("ConnectionProperties.dontTrackOpenResources"), "3.1.7", PERFORMANCE_CATEGORY, //$NON-NLS-1$ //$NON-NLS-2$
0947:                    Integer.MIN_VALUE);
0948:
0949:            private BooleanConnectionProperty dumpQueriesOnException = new BooleanConnectionProperty(
0950:                    "dumpQueriesOnException", //$NON-NLS-1$
0951:                    false,
0952:                    Messages
0953:                            .getString("ConnectionProperties.dumpQueriesOnException"), //$NON-NLS-1$
0954:                    "3.1.3", DEBUGING_PROFILING_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
0955:
0956:            private BooleanConnectionProperty dynamicCalendars = new BooleanConnectionProperty(
0957:                    "dynamicCalendars", //$NON-NLS-1$
0958:                    false,
0959:                    Messages.getString("ConnectionProperties.dynamicCalendars"), //$NON-NLS-1$
0960:                    "3.1.5", PERFORMANCE_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
0961:
0962:            private BooleanConnectionProperty elideSetAutoCommits = new BooleanConnectionProperty(
0963:                    "elideSetAutoCommits", //$NON-NLS-1$
0964:                    false,
0965:                    Messages
0966:                            .getString("ConnectionProperties.eliseSetAutoCommit"), //$NON-NLS-1$
0967:                    "3.1.3", PERFORMANCE_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
0968:
0969:            private BooleanConnectionProperty emptyStringsConvertToZero = new BooleanConnectionProperty(
0970:                    "emptyStringsConvertToZero", true, //$NON-NLS-1$
0971:                    Messages
0972:                            .getString("ConnectionProperties.emptyStringsConvertToZero"), "3.1.8", //$NON-NLS-1$ //$NON-NLS-2$
0973:                    MISC_CATEGORY, Integer.MIN_VALUE);
0974:
0975:            private BooleanConnectionProperty emulateLocators = new BooleanConnectionProperty(
0976:                    "emulateLocators", false, Messages.getString("ConnectionProperties.emulateLocators"), "3.1.0", MISC_CATEGORY, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
0977:                    Integer.MIN_VALUE);
0978:
0979:            private BooleanConnectionProperty emulateUnsupportedPstmts = new BooleanConnectionProperty(
0980:                    "emulateUnsupportedPstmts", //$NON-NLS-1$
0981:                    true,
0982:                    Messages
0983:                            .getString("ConnectionProperties.emulateUnsupportedPstmts"), //$NON-NLS-1$
0984:                    "3.1.7", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
0985:
0986:            private BooleanConnectionProperty enablePacketDebug = new BooleanConnectionProperty(
0987:                    "enablePacketDebug", //$NON-NLS-1$
0988:                    false,
0989:                    Messages
0990:                            .getString("ConnectionProperties.enablePacketDebug"), //$NON-NLS-1$
0991:                    "3.1.3", DEBUGING_PROFILING_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
0992:
0993:            private BooleanConnectionProperty enableQueryTimeouts = new BooleanConnectionProperty(
0994:                    "enableQueryTimeouts", //$NON-NLS-1$
0995:                    true,
0996:                    Messages
0997:                            .getString("ConnectionProperties.enableQueryTimeouts"), //$NON-NLS-1$
0998:                    "5.0.6", //$NON-NLS-1$
0999:                    PERFORMANCE_CATEGORY, Integer.MIN_VALUE);
1000:
1001:            private BooleanConnectionProperty explainSlowQueries = new BooleanConnectionProperty(
1002:                    "explainSlowQueries", //$NON-NLS-1$
1003:                    false,
1004:                    Messages
1005:                            .getString("ConnectionProperties.explainSlowQueries"), //$NON-NLS-1$
1006:                    "3.1.2", DEBUGING_PROFILING_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1007:
1008:            /** When failed-over, set connection to read-only? */
1009:            private BooleanConnectionProperty failOverReadOnly = new BooleanConnectionProperty(
1010:                    "failOverReadOnly", //$NON-NLS-1$
1011:                    true,
1012:                    Messages.getString("ConnectionProperties.failoverReadOnly"), //$NON-NLS-1$
1013:                    "3.0.12", HA_CATEGORY, 2); //$NON-NLS-1$
1014:
1015:            private BooleanConnectionProperty gatherPerformanceMetrics = new BooleanConnectionProperty(
1016:                    "gatherPerfMetrics", //$NON-NLS-1$
1017:                    false,
1018:                    Messages
1019:                            .getString("ConnectionProperties.gatherPerfMetrics"), //$NON-NLS-1$
1020:                    "3.1.2", DEBUGING_PROFILING_CATEGORY, 1); //$NON-NLS-1$
1021:
1022:            private BooleanConnectionProperty generateSimpleParameterMetadata = new BooleanConnectionProperty(
1023:                    "generateSimpleParameterMetadata", false, Messages.getString("ConnectionProperties.generateSimpleParameterMetadata"), "5.0.5", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1024:
1025:            private boolean highAvailabilityAsBoolean = false;
1026:
1027:            private BooleanConnectionProperty holdResultsOpenOverStatementClose = new BooleanConnectionProperty(
1028:                    "holdResultsOpenOverStatementClose", //$NON-NLS-1$
1029:                    false,
1030:                    Messages
1031:                            .getString("ConnectionProperties.holdRSOpenOverStmtClose"), //$NON-NLS-1$
1032:                    "3.1.7", PERFORMANCE_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1033:
1034:            private BooleanConnectionProperty includeInnodbStatusInDeadlockExceptions = new BooleanConnectionProperty(
1035:                    "includeInnodbStatusInDeadlockExceptions",
1036:                    false,
1037:                    "Include the output of \"SHOW ENGINE INNODB STATUS\" in exception messages when deadlock exceptions are detected?",
1038:                    "5.0.7", DEBUGING_PROFILING_CATEGORY, Integer.MIN_VALUE);
1039:
1040:            private BooleanConnectionProperty ignoreNonTxTables = new BooleanConnectionProperty(
1041:                    "ignoreNonTxTables", //$NON-NLS-1$
1042:                    false,
1043:                    Messages
1044:                            .getString("ConnectionProperties.ignoreNonTxTables"), //$NON-NLS-1$
1045:                    "3.0.9", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1046:
1047:            private IntegerConnectionProperty initialTimeout = new IntegerConnectionProperty(
1048:                    "initialTimeout", 2, 1, Integer.MAX_VALUE, //$NON-NLS-1$
1049:                    Messages.getString("ConnectionProperties.initialTimeout"), //$NON-NLS-1$
1050:                    "1.1", HA_CATEGORY, 5); //$NON-NLS-1$
1051:
1052:            private BooleanConnectionProperty isInteractiveClient = new BooleanConnectionProperty(
1053:                    "interactiveClient", //$NON-NLS-1$
1054:                    false,
1055:                    Messages
1056:                            .getString("ConnectionProperties.interactiveClient"), //$NON-NLS-1$
1057:                    "3.1.0", CONNECTION_AND_AUTH_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1058:
1059:            private BooleanConnectionProperty jdbcCompliantTruncation = new BooleanConnectionProperty(
1060:                    "jdbcCompliantTruncation", //$NON-NLS-1$
1061:                    true,
1062:                    Messages
1063:                            .getString("ConnectionProperties.jdbcCompliantTruncation"), "3.1.2", MISC_CATEGORY, //$NON-NLS-1$ //$NON-NLS-2$
1064:                    Integer.MIN_VALUE);
1065:
1066:            private boolean jdbcCompliantTruncationForReads = this .jdbcCompliantTruncation
1067:                    .getValueAsBoolean();
1068:
1069:            protected MemorySizeConnectionProperty largeRowSizeThreshold = new MemorySizeConnectionProperty(
1070:                    "largeRowSizeThreshold",
1071:                    2048,
1072:                    0,
1073:                    Integer.MAX_VALUE,
1074:                    Messages
1075:                            .getString("ConnectionProperties.largeRowSizeThreshold"),
1076:                    "5.1.1", PERFORMANCE_CATEGORY, Integer.MIN_VALUE);
1077:
1078:            private StringConnectionProperty loadBalanceStrategy = new StringConnectionProperty(
1079:                    "loadBalanceStrategy", //$NON-NLS-1$
1080:                    "random", //$NON-NLS-1$
1081:                    new String[] { "random", "bestResponseTime" }, //$NON-NLS-1$ //$NON-NLS-2$
1082:                    Messages
1083:                            .getString("ConnectionProperties.loadBalanceStrategy"), //$NON-NLS-1$
1084:                    "5.0.6", PERFORMANCE_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1085:
1086:            private StringConnectionProperty localSocketAddress = new StringConnectionProperty(
1087:                    "localSocketAddress", //$NON-NLS-1$
1088:                    null,
1089:                    Messages
1090:                            .getString("ConnectionProperties.localSocketAddress"), //$NON-NLS-1$
1091:                    "5.0.5", CONNECTION_AND_AUTH_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1092:
1093:            private MemorySizeConnectionProperty locatorFetchBufferSize = new MemorySizeConnectionProperty(
1094:                    "locatorFetchBufferSize", //$NON-NLS-1$
1095:                    1024 * 1024,
1096:                    0,
1097:                    Integer.MAX_VALUE,
1098:                    Messages
1099:                            .getString("ConnectionProperties.locatorFetchBufferSize"), //$NON-NLS-1$
1100:                    "3.2.1", PERFORMANCE_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1101:
1102:            private StringConnectionProperty loggerClassName = new StringConnectionProperty(
1103:                    "logger", STANDARD_LOGGER_NAME, //$NON-NLS-1$
1104:                    Messages
1105:                            .getString(
1106:                                    "ConnectionProperties.logger", new Object[] { Log.class.getName(), STANDARD_LOGGER_NAME }), //$NON-NLS-1$
1107:                    "3.1.1", DEBUGING_PROFILING_CATEGORY, //$NON-NLS-1$ //$NON-NLS-2$
1108:                    0);
1109:
1110:            private BooleanConnectionProperty logSlowQueries = new BooleanConnectionProperty(
1111:                    "logSlowQueries", //$NON-NLS-1$
1112:                    false, Messages
1113:                            .getString("ConnectionProperties.logSlowQueries"), //$NON-NLS-1$
1114:                    "3.1.2", DEBUGING_PROFILING_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1115:
1116:            private BooleanConnectionProperty logXaCommands = new BooleanConnectionProperty(
1117:                    "logXaCommands", //$NON-NLS-1$
1118:                    false, Messages
1119:                            .getString("ConnectionProperties.logXaCommands"), //$NON-NLS-1$
1120:                    "5.0.5", DEBUGING_PROFILING_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1121:
1122:            private BooleanConnectionProperty maintainTimeStats = new BooleanConnectionProperty(
1123:                    "maintainTimeStats", //$NON-NLS-1$
1124:                    true,
1125:                    Messages
1126:                            .getString("ConnectionProperties.maintainTimeStats"), "3.1.9", PERFORMANCE_CATEGORY, //$NON-NLS-1$ //$NON-NLS-2$
1127:                    Integer.MAX_VALUE);
1128:
1129:            private boolean maintainTimeStatsAsBoolean = true;
1130:
1131:            private IntegerConnectionProperty maxQuerySizeToLog = new IntegerConnectionProperty(
1132:                    "maxQuerySizeToLog", //$NON-NLS-1$
1133:                    2048,
1134:                    0,
1135:                    Integer.MAX_VALUE,
1136:                    Messages
1137:                            .getString("ConnectionProperties.maxQuerySizeToLog"), //$NON-NLS-1$
1138:                    "3.1.3", DEBUGING_PROFILING_CATEGORY, 4); //$NON-NLS-1$
1139:
1140:            private IntegerConnectionProperty maxReconnects = new IntegerConnectionProperty(
1141:                    "maxReconnects", //$NON-NLS-1$
1142:                    3, 1, Integer.MAX_VALUE, Messages
1143:                            .getString("ConnectionProperties.maxReconnects"), //$NON-NLS-1$
1144:                    "1.1", HA_CATEGORY, 4); //$NON-NLS-1$
1145:
1146:            private IntegerConnectionProperty maxRows = new IntegerConnectionProperty(
1147:                    "maxRows", -1, -1, Integer.MAX_VALUE, //$NON-NLS-1$
1148:                    Messages.getString("ConnectionProperties.maxRows"), //$NON-NLS-1$
1149:                    Messages.getString("ConnectionProperties.allVersions"), MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1150:
1151:            private int maxRowsAsInt = -1;
1152:
1153:            private IntegerConnectionProperty metadataCacheSize = new IntegerConnectionProperty(
1154:                    "metadataCacheSize", //$NON-NLS-1$
1155:                    50,
1156:                    1,
1157:                    Integer.MAX_VALUE,
1158:                    Messages
1159:                            .getString("ConnectionProperties.metadataCacheSize"), //$NON-NLS-1$
1160:                    "3.1.1", PERFORMANCE_CATEGORY, 5); //$NON-NLS-1$
1161:
1162:            private IntegerConnectionProperty netTimeoutForStreamingResults = new IntegerConnectionProperty(
1163:                    "netTimeoutForStreamingResults", 600, //$NON-NLS-1$
1164:                    0,
1165:                    Integer.MAX_VALUE,
1166:                    Messages
1167:                            .getString("ConnectionProperties.netTimeoutForStreamingResults"), //$NON-NLS-1$
1168:                    "5.1.0", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1169:
1170:            private BooleanConnectionProperty noAccessToProcedureBodies = new BooleanConnectionProperty(
1171:                    "noAccessToProcedureBodies",
1172:                    false,
1173:                    "When determining procedure parameter types for CallableStatements, and the connected user "
1174:                            + " can't access procedure bodies through \"SHOW CREATE PROCEDURE\" or select on mysql.proc "
1175:                            + " should the driver instead create basic metadata (all parameters reported as IN VARCHARs,"
1176:                            + " but allowing registerOutParameter() to be called on them anyway) instead "
1177:                            + " of throwing an exception?", "5.0.3",
1178:                    MISC_CATEGORY, Integer.MIN_VALUE);
1179:
1180:            private BooleanConnectionProperty noDatetimeStringSync = new BooleanConnectionProperty(
1181:                    "noDatetimeStringSync", //$NON-NLS-1$
1182:                    false,
1183:                    Messages
1184:                            .getString("ConnectionProperties.noDatetimeStringSync"), //$NON-NLS-1$
1185:                    "3.1.7", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1186:
1187:            private BooleanConnectionProperty noTimezoneConversionForTimeType = new BooleanConnectionProperty(
1188:                    "noTimezoneConversionForTimeType", //$NON-NLS-1$
1189:                    false,
1190:                    Messages
1191:                            .getString("ConnectionProperties.noTzConversionForTimeType"), //$NON-NLS-1$
1192:                    "5.0.0", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1193:
1194:            private BooleanConnectionProperty nullCatalogMeansCurrent = new BooleanConnectionProperty(
1195:                    "nullCatalogMeansCurrent", //$NON-NLS-1$
1196:                    true,
1197:                    Messages
1198:                            .getString("ConnectionProperties.nullCatalogMeansCurrent"), //$NON-NLS-1$
1199:                    "3.1.8", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1200:
1201:            private BooleanConnectionProperty nullNamePatternMatchesAll = new BooleanConnectionProperty(
1202:                    "nullNamePatternMatchesAll", //$NON-NLS-1$
1203:                    true,
1204:                    Messages
1205:                            .getString("ConnectionProperties.nullNamePatternMatchesAll"), //$NON-NLS-1$
1206:                    "3.1.8", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1207:
1208:            private IntegerConnectionProperty packetDebugBufferSize = new IntegerConnectionProperty(
1209:                    "packetDebugBufferSize", //$NON-NLS-1$
1210:                    20,
1211:                    0,
1212:                    Integer.MAX_VALUE,
1213:                    Messages
1214:                            .getString("ConnectionProperties.packetDebugBufferSize"), //$NON-NLS-1$
1215:                    "3.1.3", DEBUGING_PROFILING_CATEGORY, 7); //$NON-NLS-1$
1216:
1217:            private BooleanConnectionProperty padCharsWithSpace = new BooleanConnectionProperty(
1218:                    "padCharsWithSpace", //$NON-NLS-1$
1219:                    false,
1220:                    Messages
1221:                            .getString("ConnectionProperties.padCharsWithSpace"), //$NON-NLS-1$
1222:                    "5.0.6", //$NON-NLS-1$
1223:                    MISC_CATEGORY, Integer.MIN_VALUE);
1224:
1225:            private BooleanConnectionProperty paranoid = new BooleanConnectionProperty(
1226:                    "paranoid", //$NON-NLS-1$
1227:                    false, Messages.getString("ConnectionProperties.paranoid"), //$NON-NLS-1$
1228:                    "3.0.1", SECURITY_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1229:
1230:            private BooleanConnectionProperty pedantic = new BooleanConnectionProperty(
1231:                    "pedantic", false, Messages.getString("ConnectionProperties.pedantic"), "3.0.0", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
1232:                    MISC_CATEGORY, Integer.MIN_VALUE);
1233:
1234:            private BooleanConnectionProperty pinGlobalTxToPhysicalConnection = new BooleanConnectionProperty(
1235:                    "pinGlobalTxToPhysicalConnection", false, Messages.getString("ConnectionProperties.pinGlobalTxToPhysicalConnection"), //$NON-NLS-1$
1236:                    "5.0.1", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1237:
1238:            private BooleanConnectionProperty populateInsertRowWithDefaultValues = new BooleanConnectionProperty(
1239:                    "populateInsertRowWithDefaultValues", false, //$NON-NLS-1$
1240:                    Messages
1241:                            .getString("ConnectionProperties.populateInsertRowWithDefaultValues"), //$NON-NLS-1$
1242:                    "5.0.5", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1243:
1244:            private IntegerConnectionProperty preparedStatementCacheSize = new IntegerConnectionProperty(
1245:                    "prepStmtCacheSize", 25, 0, Integer.MAX_VALUE, //$NON-NLS-1$
1246:                    Messages
1247:                            .getString("ConnectionProperties.prepStmtCacheSize"), //$NON-NLS-1$
1248:                    "3.0.10", PERFORMANCE_CATEGORY, 10); //$NON-NLS-1$
1249:
1250:            private IntegerConnectionProperty preparedStatementCacheSqlLimit = new IntegerConnectionProperty(
1251:                    "prepStmtCacheSqlLimit", //$NON-NLS-1$
1252:                    256,
1253:                    1,
1254:                    Integer.MAX_VALUE,
1255:                    Messages
1256:                            .getString("ConnectionProperties.prepStmtCacheSqlLimit"), //$NON-NLS-1$
1257:                    "3.0.10", PERFORMANCE_CATEGORY, 11); //$NON-NLS-1$
1258:
1259:            private BooleanConnectionProperty processEscapeCodesForPrepStmts = new BooleanConnectionProperty(
1260:                    "processEscapeCodesForPrepStmts", //$NON-NLS-1$
1261:                    true,
1262:                    Messages
1263:                            .getString("ConnectionProperties.processEscapeCodesForPrepStmts"), //$NON-NLS-1$
1264:                    "3.1.12", //$NON-NLS-1$
1265:                    MISC_CATEGORY, Integer.MIN_VALUE);
1266:
1267:            private StringConnectionProperty profileSql = new StringConnectionProperty(
1268:                    "profileSql", //$NON-NLS-1$
1269:                    null,
1270:                    Messages
1271:                            .getString("ConnectionProperties.profileSqlDeprecated"), //$NON-NLS-1$
1272:                    "2.0.14", DEBUGING_PROFILING_CATEGORY, 3); //$NON-NLS-1$
1273:
1274:            private BooleanConnectionProperty profileSQL = new BooleanConnectionProperty(
1275:                    "profileSQL", //$NON-NLS-1$
1276:                    false, Messages
1277:                            .getString("ConnectionProperties.profileSQL"), //$NON-NLS-1$
1278:                    "3.1.0", DEBUGING_PROFILING_CATEGORY, 1); //$NON-NLS-1$
1279:
1280:            private boolean profileSQLAsBoolean = false;
1281:
1282:            private StringConnectionProperty propertiesTransform = new StringConnectionProperty(
1283:                    NonRegisteringDriver.PROPERTIES_TRANSFORM_KEY,
1284:                    null,
1285:                    Messages
1286:                            .getString("ConnectionProperties.connectionPropertiesTransform"), //$NON-NLS-1$
1287:                    "3.1.4", CONNECTION_AND_AUTH_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1288:
1289:            private IntegerConnectionProperty queriesBeforeRetryMaster = new IntegerConnectionProperty(
1290:                    "queriesBeforeRetryMaster", //$NON-NLS-1$
1291:                    50,
1292:                    1,
1293:                    Integer.MAX_VALUE,
1294:                    Messages
1295:                            .getString("ConnectionProperties.queriesBeforeRetryMaster"), //$NON-NLS-1$
1296:                    "3.0.2", HA_CATEGORY, 7); //$NON-NLS-1$
1297:
1298:            private BooleanConnectionProperty reconnectAtTxEnd = new BooleanConnectionProperty(
1299:                    "reconnectAtTxEnd", false, //$NON-NLS-1$
1300:                    Messages.getString("ConnectionProperties.reconnectAtTxEnd"), "3.0.10", //$NON-NLS-1$ //$NON-NLS-2$
1301:                    HA_CATEGORY, 4);
1302:
1303:            private boolean reconnectTxAtEndAsBoolean = false;
1304:
1305:            private BooleanConnectionProperty relaxAutoCommit = new BooleanConnectionProperty(
1306:                    "relaxAutoCommit", //$NON-NLS-1$
1307:                    false, Messages
1308:                            .getString("ConnectionProperties.relaxAutoCommit"), //$NON-NLS-1$
1309:                    "2.0.13", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1310:
1311:            private IntegerConnectionProperty reportMetricsIntervalMillis = new IntegerConnectionProperty(
1312:                    "reportMetricsIntervalMillis", //$NON-NLS-1$
1313:                    30000,
1314:                    0,
1315:                    Integer.MAX_VALUE,
1316:                    Messages
1317:                            .getString("ConnectionProperties.reportMetricsIntervalMillis"), //$NON-NLS-1$
1318:                    "3.1.2", DEBUGING_PROFILING_CATEGORY, 3); //$NON-NLS-1$
1319:
1320:            private BooleanConnectionProperty requireSSL = new BooleanConnectionProperty(
1321:                    "requireSSL", false, //$NON-NLS-1$
1322:                    Messages.getString("ConnectionProperties.requireSSL"), //$NON-NLS-1$
1323:                    "3.1.0", SECURITY_CATEGORY, 3); //$NON-NLS-1$
1324:
1325:            private StringConnectionProperty resourceId = new StringConnectionProperty(
1326:                    "resourceId", //$NON-NLS-1$
1327:                    null,
1328:                    Messages.getString("ConnectionProperties.resourceId"), //$NON-NLS-1$
1329:                    "5.0.1", //$NON-NLS-1$
1330:                    HA_CATEGORY, Integer.MIN_VALUE);
1331:
1332:            private IntegerConnectionProperty resultSetSizeThreshold = new IntegerConnectionProperty(
1333:                    "resultSetSizeThreshold", 100, //$NON-NLS-1$
1334:                    Messages
1335:                            .getString("ConnectionProperties.resultSetSizeThreshold"), "5.0.5", DEBUGING_PROFILING_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$ //$NON-NLS-2$
1336:
1337:            private BooleanConnectionProperty retainStatementAfterResultSetClose = new BooleanConnectionProperty(
1338:                    "retainStatementAfterResultSetClose", //$NON-NLS-1$
1339:                    false,
1340:                    Messages
1341:                            .getString("ConnectionProperties.retainStatementAfterResultSetClose"), //$NON-NLS-1$
1342:                    "3.1.11", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1343:
1344:            private BooleanConnectionProperty rewriteBatchedStatements = new BooleanConnectionProperty(
1345:                    "rewriteBatchedStatements", //$NON-NLS-1$
1346:                    false,
1347:                    Messages
1348:                            .getString("ConnectionProperties.rewriteBatchedStatements"), //$NON-NLS-1$
1349:                    "3.1.13", PERFORMANCE_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1350:
1351:            private BooleanConnectionProperty rollbackOnPooledClose = new BooleanConnectionProperty(
1352:                    "rollbackOnPooledClose", //$NON-NLS-1$
1353:                    true,
1354:                    Messages
1355:                            .getString("ConnectionProperties.rollbackOnPooledClose"), //$NON-NLS-1$
1356:                    "3.0.15", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1357:
1358:            private BooleanConnectionProperty roundRobinLoadBalance = new BooleanConnectionProperty(
1359:                    "roundRobinLoadBalance", //$NON-NLS-1$
1360:                    false,
1361:                    Messages
1362:                            .getString("ConnectionProperties.roundRobinLoadBalance"), //$NON-NLS-1$
1363:                    "3.1.2", HA_CATEGORY, 5); //$NON-NLS-1$
1364:
1365:            private BooleanConnectionProperty runningCTS13 = new BooleanConnectionProperty(
1366:                    "runningCTS13", //$NON-NLS-1$
1367:                    false, Messages
1368:                            .getString("ConnectionProperties.runningCTS13"), //$NON-NLS-1$
1369:                    "3.1.7", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1370:
1371:            private IntegerConnectionProperty secondsBeforeRetryMaster = new IntegerConnectionProperty(
1372:                    "secondsBeforeRetryMaster", //$NON-NLS-1$
1373:                    30,
1374:                    1,
1375:                    Integer.MAX_VALUE,
1376:                    Messages
1377:                            .getString("ConnectionProperties.secondsBeforeRetryMaster"), //$NON-NLS-1$
1378:                    "3.0.2", HA_CATEGORY, 8); //$NON-NLS-1$
1379:
1380:            private StringConnectionProperty serverTimezone = new StringConnectionProperty(
1381:                    "serverTimezone", //$NON-NLS-1$
1382:                    null, Messages
1383:                            .getString("ConnectionProperties.serverTimezone"), //$NON-NLS-1$
1384:                    "3.0.2", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1385:
1386:            private StringConnectionProperty sessionVariables = new StringConnectionProperty(
1387:                    "sessionVariables", null, //$NON-NLS-1$
1388:                    Messages.getString("ConnectionProperties.sessionVariables"), "3.1.8", //$NON-NLS-1$ //$NON-NLS-2$
1389:                    MISC_CATEGORY, Integer.MAX_VALUE);
1390:
1391:            private IntegerConnectionProperty slowQueryThresholdMillis = new IntegerConnectionProperty(
1392:                    "slowQueryThresholdMillis", //$NON-NLS-1$
1393:                    2000,
1394:                    0,
1395:                    Integer.MAX_VALUE,
1396:                    Messages
1397:                            .getString("ConnectionProperties.slowQueryThresholdMillis"), //$NON-NLS-1$
1398:                    "3.1.2", DEBUGING_PROFILING_CATEGORY, 9); //$NON-NLS-1$
1399:
1400:            private LongConnectionProperty slowQueryThresholdNanos = new LongConnectionProperty(
1401:                    "slowQueryThresholdNanos", //$NON-NLS-1$
1402:                    0,
1403:                    Messages
1404:                            .getString("ConnectionProperties.slowQueryThresholdNanos"), //$NON-NLS-1$
1405:                    "5.0.7", //$NON-NLS-1$
1406:                    DEBUGING_PROFILING_CATEGORY, 10);
1407:
1408:            private StringConnectionProperty socketFactoryClassName = new StringConnectionProperty(
1409:                    "socketFactory", //$NON-NLS-1$
1410:                    StandardSocketFactory.class.getName(), Messages
1411:                            .getString("ConnectionProperties.socketFactory"), //$NON-NLS-1$
1412:                    "3.0.3", CONNECTION_AND_AUTH_CATEGORY, 4); //$NON-NLS-1$
1413:
1414:            private IntegerConnectionProperty socketTimeout = new IntegerConnectionProperty(
1415:                    "socketTimeout", //$NON-NLS-1$
1416:                    0, 0, Integer.MAX_VALUE, Messages
1417:                            .getString("ConnectionProperties.socketTimeout"), //$NON-NLS-1$
1418:                    "3.0.1", CONNECTION_AND_AUTH_CATEGORY, 10); //$NON-NLS-1$
1419:
1420:            private StringConnectionProperty statementInterceptors = new StringConnectionProperty(
1421:                    "statementInterceptors", //$NON-NLS-1$
1422:                    null,
1423:                    Messages
1424:                            .getString("ConnectionProperties.statementInterceptors"), "5.1.1", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$ //$NON-NLS-2$
1425:
1426:            private BooleanConnectionProperty strictFloatingPoint = new BooleanConnectionProperty(
1427:                    "strictFloatingPoint", false, //$NON-NLS-1$
1428:                    Messages
1429:                            .getString("ConnectionProperties.strictFloatingPoint"), "3.0.0", //$NON-NLS-1$ //$NON-NLS-2$
1430:                    MISC_CATEGORY, Integer.MIN_VALUE);
1431:
1432:            private BooleanConnectionProperty strictUpdates = new BooleanConnectionProperty(
1433:                    "strictUpdates", //$NON-NLS-1$
1434:                    true, Messages
1435:                            .getString("ConnectionProperties.strictUpdates"), //$NON-NLS-1$
1436:                    "3.0.4", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1437:
1438:            private BooleanConnectionProperty overrideSupportsIntegrityEnhancementFacility = new BooleanConnectionProperty(
1439:                    "overrideSupportsIntegrityEnhancementFacility", //$NON-NLS-1$
1440:                    false,
1441:                    Messages
1442:                            .getString("ConnectionProperties.overrideSupportsIEF"), //$NON-NLS-1$
1443:                    "3.1.12", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1444:
1445:            private BooleanConnectionProperty tcpNoDelay = new BooleanConnectionProperty(
1446:                    StandardSocketFactory.TCP_NO_DELAY_PROPERTY_NAME,
1447:                    Boolean.valueOf(
1448:                            StandardSocketFactory.TCP_NO_DELAY_DEFAULT_VALUE)
1449:                            .booleanValue(), Messages
1450:                            .getString("ConnectionProperties.tcpNoDelay"), //$NON-NLS-1$
1451:                    "5.0.7", NETWORK_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1452:
1453:            private BooleanConnectionProperty tcpKeepAlive = new BooleanConnectionProperty(
1454:                    StandardSocketFactory.TCP_KEEP_ALIVE_PROPERTY_NAME,
1455:                    Boolean.valueOf(
1456:                            StandardSocketFactory.TCP_KEEP_ALIVE_DEFAULT_VALUE)
1457:                            .booleanValue(), Messages
1458:                            .getString("ConnectionProperties.tcpKeepAlive"), //$NON-NLS-1$
1459:                    "5.0.7", NETWORK_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1460:
1461:            private IntegerConnectionProperty tcpRcvBuf = new IntegerConnectionProperty(
1462:                    StandardSocketFactory.TCP_RCV_BUF_PROPERTY_NAME,
1463:                    Integer
1464:                            .parseInt(StandardSocketFactory.TCP_RCV_BUF_DEFAULT_VALUE),
1465:                    0, Integer.MAX_VALUE, Messages
1466:                            .getString("ConnectionProperties.tcpSoRcvBuf"), //$NON-NLS-1$
1467:                    "5.0.7", NETWORK_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1468:
1469:            private IntegerConnectionProperty tcpSndBuf = new IntegerConnectionProperty(
1470:                    StandardSocketFactory.TCP_SND_BUF_PROPERTY_NAME,
1471:                    Integer
1472:                            .parseInt(StandardSocketFactory.TCP_SND_BUF_DEFAULT_VALUE),
1473:                    0, Integer.MAX_VALUE, Messages
1474:                            .getString("ConnectionProperties.tcpSoSndBuf"), //$NON-NLS-1$
1475:                    "5.0.7", NETWORK_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1476:
1477:            private IntegerConnectionProperty tcpTrafficClass = new IntegerConnectionProperty(
1478:                    StandardSocketFactory.TCP_TRAFFIC_CLASS_PROPERTY_NAME,
1479:                    Integer
1480:                            .parseInt(StandardSocketFactory.TCP_TRAFFIC_CLASS_DEFAULT_VALUE),
1481:                    0, 255, Messages
1482:                            .getString("ConnectionProperties.tcpTrafficClass"), //$NON-NLS-1$
1483:                    "5.0.7", NETWORK_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1484:
1485:            private BooleanConnectionProperty tinyInt1isBit = new BooleanConnectionProperty(
1486:                    "tinyInt1isBit", //$NON-NLS-1$
1487:                    true, Messages
1488:                            .getString("ConnectionProperties.tinyInt1isBit"), //$NON-NLS-1$
1489:                    "3.0.16", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1490:
1491:            private BooleanConnectionProperty traceProtocol = new BooleanConnectionProperty(
1492:                    "traceProtocol", false, //$NON-NLS-1$
1493:                    Messages.getString("ConnectionProperties.traceProtocol"), "3.1.2", //$NON-NLS-1$ //$NON-NLS-2$
1494:                    DEBUGING_PROFILING_CATEGORY, Integer.MIN_VALUE);
1495:
1496:            private BooleanConnectionProperty treatUtilDateAsTimestamp = new BooleanConnectionProperty(
1497:                    "treatUtilDateAsTimestamp", true, //$NON-NLS-1$
1498:                    Messages
1499:                            .getString("ConnectionProperties.treatUtilDateAsTimestamp"), //$NON-NLS-1$
1500:                    "5.0.5", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1501:
1502:            private BooleanConnectionProperty transformedBitIsBoolean = new BooleanConnectionProperty(
1503:                    "transformedBitIsBoolean", //$NON-NLS-1$
1504:                    false,
1505:                    Messages
1506:                            .getString("ConnectionProperties.transformedBitIsBoolean"), //$NON-NLS-1$
1507:                    "3.1.9", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1508:
1509:            private BooleanConnectionProperty useBlobToStoreUTF8OutsideBMP = new BooleanConnectionProperty(
1510:                    "useBlobToStoreUTF8OutsideBMP",
1511:                    false,
1512:                    Messages
1513:                            .getString("ConnectionProperties.useBlobToStoreUTF8OutsideBMP"), //$NON-NLS-1$
1514:                    "5.1.3", MISC_CATEGORY, 128);
1515:
1516:            private StringConnectionProperty utf8OutsideBmpExcludedColumnNamePattern = new StringConnectionProperty(
1517:                    "utf8OutsideBmpExcludedColumnNamePattern",
1518:                    null,
1519:                    Messages
1520:                            .getString("ConnectionProperties.utf8OutsideBmpExcludedColumnNamePattern"), //$NON-NLS-1$
1521:                    "5.1.3", MISC_CATEGORY, 129);
1522:
1523:            private StringConnectionProperty utf8OutsideBmpIncludedColumnNamePattern = new StringConnectionProperty(
1524:                    "utf8OutsideBmpIncludedColumnNamePattern",
1525:                    null,
1526:                    Messages
1527:                            .getString("ConnectionProperties.utf8OutsideBmpIncludedColumnNamePattern"), //$NON-NLS-1$
1528:                    "5.1.3", MISC_CATEGORY, 129);
1529:
1530:            private BooleanConnectionProperty useCompression = new BooleanConnectionProperty(
1531:                    "useCompression", //$NON-NLS-1$
1532:                    false, Messages
1533:                            .getString("ConnectionProperties.useCompression"), //$NON-NLS-1$
1534:                    "3.0.17", CONNECTION_AND_AUTH_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1535:
1536:            private StringConnectionProperty useConfigs = new StringConnectionProperty(
1537:                    "useConfigs", //$NON-NLS-1$
1538:                    null,
1539:                    Messages.getString("ConnectionProperties.useConfigs"), //$NON-NLS-1$
1540:                    "3.1.5", CONNECTION_AND_AUTH_CATEGORY, Integer.MAX_VALUE); //$NON-NLS-1$
1541:
1542:            private BooleanConnectionProperty useCursorFetch = new BooleanConnectionProperty(
1543:                    "useCursorFetch", //$NON-NLS-1$
1544:                    false, Messages
1545:                            .getString("ConnectionProperties.useCursorFetch"), //$NON-NLS-1$
1546:                    "5.0.0", PERFORMANCE_CATEGORY, Integer.MAX_VALUE); //$NON-NLS-1$
1547:
1548:            private BooleanConnectionProperty useDynamicCharsetInfo = new BooleanConnectionProperty(
1549:                    "useDynamicCharsetInfo", //$NON-NLS-1$
1550:                    true,
1551:                    Messages
1552:                            .getString("ConnectionProperties.useDynamicCharsetInfo") //$NON-NLS-1$
1553:                    , "5.0.6", PERFORMANCE_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1554:
1555:            private BooleanConnectionProperty useDirectRowUnpack = new BooleanConnectionProperty(
1556:                    "useDirectRowUnpack",
1557:                    true,
1558:                    "Use newer result set row unpacking code that skips a copy from network buffers "
1559:                            + " to a MySQL packet instance and instead reads directly into the result set row data buffers.",
1560:                    "5.1.1", PERFORMANCE_CATEGORY, Integer.MIN_VALUE);
1561:
1562:            private BooleanConnectionProperty useFastIntParsing = new BooleanConnectionProperty(
1563:                    "useFastIntParsing", //$NON-NLS-1$
1564:                    true,
1565:                    Messages
1566:                            .getString("ConnectionProperties.useFastIntParsing"), //$NON-NLS-1$
1567:                    "3.1.4", PERFORMANCE_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1568:
1569:            private BooleanConnectionProperty useFastDateParsing = new BooleanConnectionProperty(
1570:                    "useFastDateParsing", //$NON-NLS-1$
1571:                    true,
1572:                    Messages
1573:                            .getString("ConnectionProperties.useFastDateParsing"), //$NON-NLS-1$
1574:                    "5.0.5", PERFORMANCE_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1575:
1576:            private BooleanConnectionProperty useHostsInPrivileges = new BooleanConnectionProperty(
1577:                    "useHostsInPrivileges", //$NON-NLS-1$
1578:                    true,
1579:                    Messages
1580:                            .getString("ConnectionProperties.useHostsInPrivileges"), //$NON-NLS-1$
1581:                    "3.0.2", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1582:            private BooleanConnectionProperty useInformationSchema = new BooleanConnectionProperty(
1583:                    "useInformationSchema", //$NON-NLS-1$
1584:                    false,
1585:                    Messages
1586:                            .getString("ConnectionProperties.useInformationSchema"), //$NON-NLS-1$
1587:                    "5.0.0", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1588:            private BooleanConnectionProperty useJDBCCompliantTimezoneShift = new BooleanConnectionProperty(
1589:                    "useJDBCCompliantTimezoneShift", //$NON-NLS-1$
1590:                    false,
1591:                    Messages
1592:                            .getString("ConnectionProperties.useJDBCCompliantTimezoneShift"), //$NON-NLS-1$
1593:                    "5.0.0", //$NON-NLS-1$
1594:                    MISC_CATEGORY, Integer.MIN_VALUE);
1595:
1596:            private BooleanConnectionProperty useLocalSessionState = new BooleanConnectionProperty(
1597:                    "useLocalSessionState", //$NON-NLS-1$
1598:                    false,
1599:                    Messages
1600:                            .getString("ConnectionProperties.useLocalSessionState"), //$NON-NLS-1$
1601:                    "3.1.7", PERFORMANCE_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1602:
1603:            private BooleanConnectionProperty useNanosForElapsedTime = new BooleanConnectionProperty(
1604:                    "useNanosForElapsedTime", //$NON-NLS-1$
1605:                    false,
1606:                    Messages
1607:                            .getString("ConnectionProperties.useNanosForElapsedTime"), //$NON-NLS-1$
1608:                    "5.0.7", //$NON-NLS-1$
1609:                    DEBUGING_PROFILING_CATEGORY, Integer.MIN_VALUE);
1610:
1611:            private BooleanConnectionProperty useOldAliasMetadataBehavior = new BooleanConnectionProperty(
1612:                    "useOldAliasMetadataBehavior", //$NON-NLS-1$
1613:                    false,
1614:                    Messages
1615:                            .getString("ConnectionProperties.useOldAliasMetadataBehavior"), //$NON-NLS-1$
1616:                    "5.0.4", //$NON-NLS-1$
1617:                    MISC_CATEGORY, Integer.MIN_VALUE);
1618:
1619:            private BooleanConnectionProperty useOldUTF8Behavior = new BooleanConnectionProperty(
1620:                    "useOldUTF8Behavior", //$NON-NLS-1$
1621:                    false,
1622:                    Messages
1623:                            .getString("ConnectionProperties.useOldUtf8Behavior"), //$NON-NLS-1$
1624:                    "3.1.6", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1625:
1626:            private boolean useOldUTF8BehaviorAsBoolean = false;
1627:
1628:            private BooleanConnectionProperty useOnlyServerErrorMessages = new BooleanConnectionProperty(
1629:                    "useOnlyServerErrorMessages", //$NON-NLS-1$
1630:                    true,
1631:                    Messages
1632:                            .getString("ConnectionProperties.useOnlyServerErrorMessages"), //$NON-NLS-1$
1633:                    "3.0.15", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1634:
1635:            private BooleanConnectionProperty useReadAheadInput = new BooleanConnectionProperty(
1636:                    "useReadAheadInput", //$NON-NLS-1$
1637:                    true,
1638:                    Messages
1639:                            .getString("ConnectionProperties.useReadAheadInput"), //$NON-NLS-1$
1640:                    "3.1.5", PERFORMANCE_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1641:
1642:            private BooleanConnectionProperty useSqlStateCodes = new BooleanConnectionProperty(
1643:                    "useSqlStateCodes", //$NON-NLS-1$
1644:                    true,
1645:                    Messages.getString("ConnectionProperties.useSqlStateCodes"), //$NON-NLS-1$
1646:                    "3.1.3", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1647:
1648:            private BooleanConnectionProperty useSSL = new BooleanConnectionProperty(
1649:                    "useSSL", //$NON-NLS-1$
1650:                    false, Messages.getString("ConnectionProperties.useSSL"), //$NON-NLS-1$
1651:                    "3.0.2", SECURITY_CATEGORY, 2); //$NON-NLS-1$
1652:
1653:            private BooleanConnectionProperty useSSPSCompatibleTimezoneShift = new BooleanConnectionProperty(
1654:                    "useSSPSCompatibleTimezoneShift", //$NON-NLS-1$
1655:                    false,
1656:                    Messages
1657:                            .getString("ConnectionProperties.useSSPSCompatibleTimezoneShift"), //$NON-NLS-1$
1658:                    "5.0.5", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1659:
1660:            private BooleanConnectionProperty useStreamLengthsInPrepStmts = new BooleanConnectionProperty(
1661:                    "useStreamLengthsInPrepStmts", //$NON-NLS-1$
1662:                    true,
1663:                    Messages
1664:                            .getString("ConnectionProperties.useStreamLengthsInPrepStmts"), //$NON-NLS-1$
1665:                    "3.0.2", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1666:
1667:            private BooleanConnectionProperty useTimezone = new BooleanConnectionProperty(
1668:                    "useTimezone", //$NON-NLS-1$
1669:                    false, Messages
1670:                            .getString("ConnectionProperties.useTimezone"), //$NON-NLS-1$
1671:                    "3.0.2", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1672:
1673:            private BooleanConnectionProperty useUltraDevWorkAround = new BooleanConnectionProperty(
1674:                    "ultraDevHack", //$NON-NLS-1$
1675:                    false, Messages
1676:                            .getString("ConnectionProperties.ultraDevHack"), //$NON-NLS-1$
1677:                    "2.0.3", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1678:
1679:            private BooleanConnectionProperty useUnbufferedInput = new BooleanConnectionProperty(
1680:                    "useUnbufferedInput", true, //$NON-NLS-1$
1681:                    Messages
1682:                            .getString("ConnectionProperties.useUnbufferedInput"), //$NON-NLS-1$
1683:                    "3.0.11", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1684:
1685:            private BooleanConnectionProperty useUnicode = new BooleanConnectionProperty(
1686:                    "useUnicode", //$NON-NLS-1$
1687:                    true,
1688:                    Messages.getString("ConnectionProperties.useUnicode"), //$NON-NLS-1$
1689:                    "1.1g", MISC_CATEGORY, 0); //$NON-NLS-1$
1690:
1691:            // Cache these values, they are 'hot'
1692:            private boolean useUnicodeAsBoolean = true;
1693:
1694:            private BooleanConnectionProperty useUsageAdvisor = new BooleanConnectionProperty(
1695:                    "useUsageAdvisor", //$NON-NLS-1$
1696:                    false, Messages
1697:                            .getString("ConnectionProperties.useUsageAdvisor"), //$NON-NLS-1$
1698:                    "3.1.1", DEBUGING_PROFILING_CATEGORY, 10); //$NON-NLS-1$
1699:
1700:            private boolean useUsageAdvisorAsBoolean = false;
1701:
1702:            private BooleanConnectionProperty yearIsDateType = new BooleanConnectionProperty(
1703:                    "yearIsDateType", //$NON-NLS-1$
1704:                    true, Messages
1705:                            .getString("ConnectionProperties.yearIsDateType"), //$NON-NLS-1$
1706:                    "3.1.9", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$
1707:
1708:            private StringConnectionProperty zeroDateTimeBehavior = new StringConnectionProperty(
1709:                    "zeroDateTimeBehavior", //$NON-NLS-1$
1710:                    ZERO_DATETIME_BEHAVIOR_EXCEPTION,
1711:                    new String[] { ZERO_DATETIME_BEHAVIOR_EXCEPTION,
1712:                            ZERO_DATETIME_BEHAVIOR_ROUND,
1713:                            ZERO_DATETIME_BEHAVIOR_CONVERT_TO_NULL },
1714:                    Messages
1715:                            .getString(
1716:                                    "ConnectionProperties.zeroDateTimeBehavior", new Object[] { ZERO_DATETIME_BEHAVIOR_EXCEPTION, ZERO_DATETIME_BEHAVIOR_ROUND, ZERO_DATETIME_BEHAVIOR_CONVERT_TO_NULL }), //$NON-NLS-1$
1717:                    "3.1.4", //$NON-NLS-1$ //$NON-NLS-2$
1718:                    MISC_CATEGORY, Integer.MIN_VALUE);
1719:
1720:            private BooleanConnectionProperty useJvmCharsetConverters = new BooleanConnectionProperty(
1721:                    "useJvmCharsetConverters", //$NON-NLS-1$
1722:                    false,
1723:                    Messages
1724:                            .getString("ConnectionProperties.useJvmCharsetConverters"), "5.0.1", PERFORMANCE_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$ //$NON-NLS-2$
1725:
1726:            private BooleanConnectionProperty useGmtMillisForDatetimes = new BooleanConnectionProperty(
1727:                    "useGmtMillisForDatetimes", false, Messages.getString("ConnectionProperties.useGmtMillisForDatetimes"), "3.1.12", MISC_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
1728:
1729:            private BooleanConnectionProperty dumpMetadataOnColumnNotFound = new BooleanConnectionProperty(
1730:                    "dumpMetadataOnColumnNotFound", false, Messages.getString("ConnectionProperties.dumpMetadataOnColumnNotFound"), "3.1.13", DEBUGING_PROFILING_CATEGORY, Integer.MIN_VALUE); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
1731:
1732:            // SSL Options
1733:
1734:            private StringConnectionProperty clientCertificateKeyStoreUrl = new StringConnectionProperty(
1735:                    "clientCertificateKeyStoreUrl", null, //$NON-NLS-1$
1736:                    Messages
1737:                            .getString("ConnectionProperties.clientCertificateKeyStoreUrl"), "5.1.0", //$NON-NLS-1$ //$NON-NLS-2$
1738:                    SECURITY_CATEGORY, Integer.MAX_VALUE);
1739:
1740:            private StringConnectionProperty trustCertificateKeyStoreUrl = new StringConnectionProperty(
1741:                    "trustCertificateKeyStoreUrl", null, //$NON-NLS-1$
1742:                    Messages
1743:                            .getString("ConnectionProperties.trustCertificateKeyStoreUrl"), "5.1.0", //$NON-NLS-1$ //$NON-NLS-2$
1744:                    SECURITY_CATEGORY, Integer.MAX_VALUE);
1745:
1746:            private StringConnectionProperty clientCertificateKeyStoreType = new StringConnectionProperty(
1747:                    "clientCertificateKeyStoreType", null, //$NON-NLS-1$
1748:                    Messages
1749:                            .getString("ConnectionProperties.clientCertificateKeyStoreType"), "5.1.0", //$NON-NLS-1$ //$NON-NLS-2$
1750:                    SECURITY_CATEGORY, Integer.MAX_VALUE);
1751:
1752:            private StringConnectionProperty clientCertificateKeyStorePassword = new StringConnectionProperty(
1753:                    "clientCertificateKeyStorePassword", null, //$NON-NLS-1$
1754:                    Messages
1755:                            .getString("ConnectionProperties.clientCertificateKeyStorePassword"), "5.1.0", //$NON-NLS-1$ //$NON-NLS-2$
1756:                    SECURITY_CATEGORY, Integer.MAX_VALUE);
1757:
1758:            private StringConnectionProperty trustCertificateKeyStoreType = new StringConnectionProperty(
1759:                    "trustCertificateKeyStoreType", null, //$NON-NLS-1$
1760:                    Messages
1761:                            .getString("ConnectionProperties.trustCertificateKeyStoreType"), "5.1.0", //$NON-NLS-1$ //$NON-NLS-2$
1762:                    SECURITY_CATEGORY, Integer.MAX_VALUE);
1763:
1764:            private StringConnectionProperty trustCertificateKeyStorePassword = new StringConnectionProperty(
1765:                    "trustCertificateKeyStorePassword", null, //$NON-NLS-1$
1766:                    Messages
1767:                            .getString("ConnectionProperties.trustCertificateKeyStorePassword"), "5.1.0", //$NON-NLS-1$ //$NON-NLS-2$
1768:                    SECURITY_CATEGORY, Integer.MAX_VALUE);
1769:
1770:            protected DriverPropertyInfo[] exposeAsDriverPropertyInfoInternal(
1771:                    Properties info, int slotsToReserve) throws SQLException {
1772:                initializeProperties(info);
1773:
1774:                int numProperties = PROPERTY_LIST.size();
1775:
1776:                int listSize = numProperties + slotsToReserve;
1777:
1778:                DriverPropertyInfo[] driverProperties = new DriverPropertyInfo[listSize];
1779:
1780:                for (int i = slotsToReserve; i < listSize; i++) {
1781:                    java.lang.reflect.Field propertyField = (java.lang.reflect.Field) PROPERTY_LIST
1782:                            .get(i - slotsToReserve);
1783:
1784:                    try {
1785:                        ConnectionProperty propToExpose = (ConnectionProperty) propertyField
1786:                                .get(this );
1787:
1788:                        if (info != null) {
1789:                            propToExpose.initializeFrom(info);
1790:                        }
1791:
1792:                        driverProperties[i] = propToExpose
1793:                                .getAsDriverPropertyInfo();
1794:                    } catch (IllegalAccessException iae) {
1795:                        throw SQLError
1796:                                .createSQLException(
1797:                                        Messages
1798:                                                .getString("ConnectionProperties.InternalPropertiesFailure"), //$NON-NLS-1$
1799:                                        SQLError.SQL_STATE_GENERAL_ERROR);
1800:                    }
1801:                }
1802:
1803:                return driverProperties;
1804:            }
1805:
1806:            protected Properties exposeAsProperties(Properties info)
1807:                    throws SQLException {
1808:                if (info == null) {
1809:                    info = new Properties();
1810:                }
1811:
1812:                int numPropertiesToSet = PROPERTY_LIST.size();
1813:
1814:                for (int i = 0; i < numPropertiesToSet; i++) {
1815:                    java.lang.reflect.Field propertyField = (java.lang.reflect.Field) PROPERTY_LIST
1816:                            .get(i);
1817:
1818:                    try {
1819:                        ConnectionProperty propToGet = (ConnectionProperty) propertyField
1820:                                .get(this );
1821:
1822:                        Object propValue = propToGet.getValueAsObject();
1823:
1824:                        if (propValue != null) {
1825:                            info.setProperty(propToGet.getPropertyName(),
1826:                                    propValue.toString());
1827:                        }
1828:                    } catch (IllegalAccessException iae) {
1829:                        throw SQLError.createSQLException(
1830:                                "Internal properties failure", //$NON-NLS-1$
1831:                                SQLError.SQL_STATE_GENERAL_ERROR);
1832:                    }
1833:                }
1834:
1835:                return info;
1836:            }
1837:
1838:            /* (non-Javadoc)
1839:             * @see com.mysql.jdbc.IConnectionProperties#exposeAsXml()
1840:             */
1841:            public String exposeAsXml() throws SQLException {
1842:                StringBuffer xmlBuf = new StringBuffer();
1843:                xmlBuf.append("<ConnectionProperties>"); //$NON-NLS-1$
1844:
1845:                int numPropertiesToSet = PROPERTY_LIST.size();
1846:
1847:                int numCategories = PROPERTY_CATEGORIES.length;
1848:
1849:                Map propertyListByCategory = new HashMap();
1850:
1851:                for (int i = 0; i < numCategories; i++) {
1852:                    propertyListByCategory.put(PROPERTY_CATEGORIES[i],
1853:                            new Map[] { new TreeMap(), new TreeMap() });
1854:                }
1855:
1856:                //
1857:                // The following properties are not exposed as 'normal' properties, but
1858:                // they are
1859:                // settable nonetheless, so we need to have them documented, make sure
1860:                // that they sort 'first' as #1 and #2 in the category
1861:                //
1862:                StringConnectionProperty userProp = new StringConnectionProperty(
1863:                        NonRegisteringDriver.USER_PROPERTY_KEY,
1864:                        null,
1865:                        Messages.getString("ConnectionProperties.Username"), Messages.getString("ConnectionProperties.allVersions"), CONNECTION_AND_AUTH_CATEGORY, //$NON-NLS-1$ //$NON-NLS-2$
1866:                        Integer.MIN_VALUE + 1);
1867:                StringConnectionProperty passwordProp = new StringConnectionProperty(
1868:                        NonRegisteringDriver.PASSWORD_PROPERTY_KEY,
1869:                        null,
1870:                        Messages.getString("ConnectionProperties.Password"), Messages.getString("ConnectionProperties.allVersions"), //$NON-NLS-1$ //$NON-NLS-2$
1871:                        CONNECTION_AND_AUTH_CATEGORY, Integer.MIN_VALUE + 2);
1872:
1873:                Map[] connectionSortMaps = (Map[]) propertyListByCategory
1874:                        .get(CONNECTION_AND_AUTH_CATEGORY);
1875:                TreeMap userMap = new TreeMap();
1876:                userMap.put(userProp.getPropertyName(), userProp);
1877:
1878:                connectionSortMaps[0].put(new Integer(userProp.getOrder()),
1879:                        userMap);
1880:
1881:                TreeMap passwordMap = new TreeMap();
1882:                passwordMap.put(passwordProp.getPropertyName(), passwordProp);
1883:
1884:                connectionSortMaps[0].put(new Integer(passwordProp.getOrder()),
1885:                        passwordMap);
1886:
1887:                try {
1888:                    for (int i = 0; i < numPropertiesToSet; i++) {
1889:                        java.lang.reflect.Field propertyField = (java.lang.reflect.Field) PROPERTY_LIST
1890:                                .get(i);
1891:                        ConnectionProperty propToGet = (ConnectionProperty) propertyField
1892:                                .get(this );
1893:                        Map[] sortMaps = (Map[]) propertyListByCategory
1894:                                .get(propToGet.getCategoryName());
1895:                        int orderInCategory = propToGet.getOrder();
1896:
1897:                        if (orderInCategory == Integer.MIN_VALUE) {
1898:                            sortMaps[1].put(propToGet.getPropertyName(),
1899:                                    propToGet);
1900:                        } else {
1901:                            Integer order = new Integer(orderInCategory);
1902:
1903:                            Map orderMap = (Map) sortMaps[0].get(order);
1904:
1905:                            if (orderMap == null) {
1906:                                orderMap = new TreeMap();
1907:                                sortMaps[0].put(order, orderMap);
1908:                            }
1909:
1910:                            orderMap
1911:                                    .put(propToGet.getPropertyName(), propToGet);
1912:                        }
1913:                    }
1914:
1915:                    for (int j = 0; j < numCategories; j++) {
1916:                        Map[] sortMaps = (Map[]) propertyListByCategory
1917:                                .get(PROPERTY_CATEGORIES[j]);
1918:                        Iterator orderedIter = sortMaps[0].values().iterator();
1919:                        Iterator alphaIter = sortMaps[1].values().iterator();
1920:
1921:                        xmlBuf.append("\n <PropertyCategory name=\""); //$NON-NLS-1$
1922:                        xmlBuf.append(PROPERTY_CATEGORIES[j]);
1923:                        xmlBuf.append("\">"); //$NON-NLS-1$
1924:
1925:                        while (orderedIter.hasNext()) {
1926:                            Iterator orderedAlphaIter = ((Map) orderedIter
1927:                                    .next()).values().iterator();
1928:
1929:                            while (orderedAlphaIter.hasNext()) {
1930:                                ConnectionProperty propToGet = (ConnectionProperty) orderedAlphaIter
1931:                                        .next();
1932:
1933:                                xmlBuf.append("\n  <Property name=\""); //$NON-NLS-1$
1934:                                xmlBuf.append(propToGet.getPropertyName());
1935:                                xmlBuf.append("\" required=\""); //$NON-NLS-1$
1936:                                xmlBuf
1937:                                        .append(propToGet.required ? "Yes" : "No"); //$NON-NLS-1$ //$NON-NLS-2$
1938:
1939:                                xmlBuf.append("\" default=\""); //$NON-NLS-1$
1940:
1941:                                if (propToGet.getDefaultValue() != null) {
1942:                                    xmlBuf.append(propToGet.getDefaultValue());
1943:                                }
1944:
1945:                                xmlBuf.append("\" sortOrder=\""); //$NON-NLS-1$
1946:                                xmlBuf.append(propToGet.getOrder());
1947:                                xmlBuf.append("\" since=\""); //$NON-NLS-1$
1948:                                xmlBuf.append(propToGet.sinceVersion);
1949:                                xmlBuf.append("\">\n"); //$NON-NLS-1$
1950:                                xmlBuf.append("    "); //$NON-NLS-1$
1951:                                xmlBuf.append(propToGet.description);
1952:                                xmlBuf.append("\n  </Property>"); //$NON-NLS-1$
1953:                            }
1954:                        }
1955:
1956:                        while (alphaIter.hasNext()) {
1957:                            ConnectionProperty propToGet = (ConnectionProperty) alphaIter
1958:                                    .next();
1959:
1960:                            xmlBuf.append("\n  <Property name=\""); //$NON-NLS-1$
1961:                            xmlBuf.append(propToGet.getPropertyName());
1962:                            xmlBuf.append("\" required=\""); //$NON-NLS-1$
1963:                            xmlBuf.append(propToGet.required ? "Yes" : "No"); //$NON-NLS-1$ //$NON-NLS-2$
1964:
1965:                            xmlBuf.append("\" default=\""); //$NON-NLS-1$
1966:
1967:                            if (propToGet.getDefaultValue() != null) {
1968:                                xmlBuf.append(propToGet.getDefaultValue());
1969:                            }
1970:
1971:                            xmlBuf.append("\" sortOrder=\"alpha\" since=\""); //$NON-NLS-1$
1972:                            xmlBuf.append(propToGet.sinceVersion);
1973:                            xmlBuf.append("\">\n"); //$NON-NLS-1$
1974:                            xmlBuf.append("    "); //$NON-NLS-1$
1975:                            xmlBuf.append(propToGet.description);
1976:                            xmlBuf.append("\n  </Property>"); //$NON-NLS-1$
1977:                        }
1978:
1979:                        xmlBuf.append("\n </PropertyCategory>"); //$NON-NLS-1$
1980:                    }
1981:                } catch (IllegalAccessException iae) {
1982:                    throw SQLError.createSQLException(
1983:                            "Internal properties failure", //$NON-NLS-1$
1984:                            SQLError.SQL_STATE_GENERAL_ERROR);
1985:                }
1986:
1987:                xmlBuf.append("\n</ConnectionProperties>"); //$NON-NLS-1$
1988:
1989:                return xmlBuf.toString();
1990:            }
1991:
1992:            /* (non-Javadoc)
1993:             * @see com.mysql.jdbc.IConnectionProperties#getAllowLoadLocalInfile()
1994:             */
1995:            public boolean getAllowLoadLocalInfile() {
1996:                return this .allowLoadLocalInfile.getValueAsBoolean();
1997:            }
1998:
1999:            /* (non-Javadoc)
2000:             * @see com.mysql.jdbc.IConnectionProperties#getAllowMultiQueries()
2001:             */
2002:            public boolean getAllowMultiQueries() {
2003:                return this .allowMultiQueries.getValueAsBoolean();
2004:            }
2005:
2006:            /* (non-Javadoc)
2007:             * @see com.mysql.jdbc.IConnectionProperties#getAllowNanAndInf()
2008:             */
2009:            public boolean getAllowNanAndInf() {
2010:                return allowNanAndInf.getValueAsBoolean();
2011:            }
2012:
2013:            /* (non-Javadoc)
2014:             * @see com.mysql.jdbc.IConnectionProperties#getAllowUrlInLocalInfile()
2015:             */
2016:            public boolean getAllowUrlInLocalInfile() {
2017:                return this .allowUrlInLocalInfile.getValueAsBoolean();
2018:            }
2019:
2020:            /* (non-Javadoc)
2021:             * @see com.mysql.jdbc.IConnectionProperties#getAlwaysSendSetIsolation()
2022:             */
2023:            public boolean getAlwaysSendSetIsolation() {
2024:                return this .alwaysSendSetIsolation.getValueAsBoolean();
2025:            }
2026:
2027:            /* (non-Javadoc)
2028:             * @see com.mysql.jdbc.IConnectionProperties#getAutoDeserialize()
2029:             */
2030:            public boolean getAutoDeserialize() {
2031:                return autoDeserialize.getValueAsBoolean();
2032:            }
2033:
2034:            /* (non-Javadoc)
2035:             * @see com.mysql.jdbc.IConnectionProperties#getAutoGenerateTestcaseScript()
2036:             */
2037:            public boolean getAutoGenerateTestcaseScript() {
2038:                return this .autoGenerateTestcaseScriptAsBoolean;
2039:            }
2040:
2041:            /* (non-Javadoc)
2042:             * @see com.mysql.jdbc.IConnectionProperties#getAutoReconnectForPools()
2043:             */
2044:            public boolean getAutoReconnectForPools() {
2045:                return this .autoReconnectForPoolsAsBoolean;
2046:            }
2047:
2048:            /* (non-Javadoc)
2049:             * @see com.mysql.jdbc.IConnectionProperties#getBlobSendChunkSize()
2050:             */
2051:            public int getBlobSendChunkSize() {
2052:                return blobSendChunkSize.getValueAsInt();
2053:            }
2054:
2055:            /* (non-Javadoc)
2056:             * @see com.mysql.jdbc.IConnectionProperties#getCacheCallableStatements()
2057:             */
2058:            public boolean getCacheCallableStatements() {
2059:                return this .cacheCallableStatements.getValueAsBoolean();
2060:            }
2061:
2062:            /* (non-Javadoc)
2063:             * @see com.mysql.jdbc.IConnectionProperties#getCachePreparedStatements()
2064:             */
2065:            public boolean getCachePreparedStatements() {
2066:                return ((Boolean) this .cachePreparedStatements
2067:                        .getValueAsObject()).booleanValue();
2068:            }
2069:
2070:            /* (non-Javadoc)
2071:             * @see com.mysql.jdbc.IConnectionProperties#getCacheResultSetMetadata()
2072:             */
2073:            public boolean getCacheResultSetMetadata() {
2074:                return this .cacheResultSetMetaDataAsBoolean;
2075:            }
2076:
2077:            /* (non-Javadoc)
2078:             * @see com.mysql.jdbc.IConnectionProperties#getCacheServerConfiguration()
2079:             */
2080:            public boolean getCacheServerConfiguration() {
2081:                return cacheServerConfiguration.getValueAsBoolean();
2082:            }
2083:
2084:            /* (non-Javadoc)
2085:             * @see com.mysql.jdbc.IConnectionProperties#getCallableStatementCacheSize()
2086:             */
2087:            public int getCallableStatementCacheSize() {
2088:                return this .callableStatementCacheSize.getValueAsInt();
2089:            }
2090:
2091:            /* (non-Javadoc)
2092:             * @see com.mysql.jdbc.IConnectionProperties#getCapitalizeTypeNames()
2093:             */
2094:            public boolean getCapitalizeTypeNames() {
2095:                return this .capitalizeTypeNames.getValueAsBoolean();
2096:            }
2097:
2098:            /* (non-Javadoc)
2099:             * @see com.mysql.jdbc.IConnectionProperties#getCharacterSetResults()
2100:             */
2101:            public String getCharacterSetResults() {
2102:                return this .characterSetResults.getValueAsString();
2103:            }
2104:
2105:            /* (non-Javadoc)
2106:             * @see com.mysql.jdbc.IConnectionProperties#getClobberStreamingResults()
2107:             */
2108:            public boolean getClobberStreamingResults() {
2109:                return this .clobberStreamingResults.getValueAsBoolean();
2110:            }
2111:
2112:            /* (non-Javadoc)
2113:             * @see com.mysql.jdbc.IConnectionProperties#getClobCharacterEncoding()
2114:             */
2115:            public String getClobCharacterEncoding() {
2116:                return this .clobCharacterEncoding.getValueAsString();
2117:            }
2118:
2119:            /* (non-Javadoc)
2120:             * @see com.mysql.jdbc.IConnectionProperties#getConnectionCollation()
2121:             */
2122:            public String getConnectionCollation() {
2123:                return this .connectionCollation.getValueAsString();
2124:            }
2125:
2126:            /* (non-Javadoc)
2127:             * @see com.mysql.jdbc.IConnectionProperties#getConnectTimeout()
2128:             */
2129:            public int getConnectTimeout() {
2130:                return this .connectTimeout.getValueAsInt();
2131:            }
2132:
2133:            /* (non-Javadoc)
2134:             * @see com.mysql.jdbc.IConnectionProperties#getContinueBatchOnError()
2135:             */
2136:            public boolean getContinueBatchOnError() {
2137:                return this .continueBatchOnError.getValueAsBoolean();
2138:            }
2139:
2140:            /* (non-Javadoc)
2141:             * @see com.mysql.jdbc.IConnectionProperties#getCreateDatabaseIfNotExist()
2142:             */
2143:            public boolean getCreateDatabaseIfNotExist() {
2144:                return this .createDatabaseIfNotExist.getValueAsBoolean();
2145:            }
2146:
2147:            /* (non-Javadoc)
2148:             * @see com.mysql.jdbc.IConnectionProperties#getDefaultFetchSize()
2149:             */
2150:            public int getDefaultFetchSize() {
2151:                return this .defaultFetchSize.getValueAsInt();
2152:            }
2153:
2154:            /* (non-Javadoc)
2155:             * @see com.mysql.jdbc.IConnectionProperties#getDontTrackOpenResources()
2156:             */
2157:            public boolean getDontTrackOpenResources() {
2158:                return this .dontTrackOpenResources.getValueAsBoolean();
2159:            }
2160:
2161:            /* (non-Javadoc)
2162:             * @see com.mysql.jdbc.IConnectionProperties#getDumpQueriesOnException()
2163:             */
2164:            public boolean getDumpQueriesOnException() {
2165:                return this .dumpQueriesOnException.getValueAsBoolean();
2166:            }
2167:
2168:            /* (non-Javadoc)
2169:             * @see com.mysql.jdbc.IConnectionProperties#getDynamicCalendars()
2170:             */
2171:            public boolean getDynamicCalendars() {
2172:                return this .dynamicCalendars.getValueAsBoolean();
2173:            }
2174:
2175:            /* (non-Javadoc)
2176:             * @see com.mysql.jdbc.IConnectionProperties#getElideSetAutoCommits()
2177:             */
2178:            public boolean getElideSetAutoCommits() {
2179:                return this .elideSetAutoCommits.getValueAsBoolean();
2180:            }
2181:
2182:            /* (non-Javadoc)
2183:             * @see com.mysql.jdbc.IConnectionProperties#getEmptyStringsConvertToZero()
2184:             */
2185:            public boolean getEmptyStringsConvertToZero() {
2186:                return this .emptyStringsConvertToZero.getValueAsBoolean();
2187:            }
2188:
2189:            /* (non-Javadoc)
2190:             * @see com.mysql.jdbc.IConnectionProperties#getEmulateLocators()
2191:             */
2192:            public boolean getEmulateLocators() {
2193:                return this .emulateLocators.getValueAsBoolean();
2194:            }
2195:
2196:            /* (non-Javadoc)
2197:             * @see com.mysql.jdbc.IConnectionProperties#getEmulateUnsupportedPstmts()
2198:             */
2199:            public boolean getEmulateUnsupportedPstmts() {
2200:                return this .emulateUnsupportedPstmts.getValueAsBoolean();
2201:            }
2202:
2203:            /* (non-Javadoc)
2204:             * @see com.mysql.jdbc.IConnectionProperties#getEnablePacketDebug()
2205:             */
2206:            public boolean getEnablePacketDebug() {
2207:                return this .enablePacketDebug.getValueAsBoolean();
2208:            }
2209:
2210:            /* (non-Javadoc)
2211:             * @see com.mysql.jdbc.IConnectionProperties#getEncoding()
2212:             */
2213:            public String getEncoding() {
2214:                return this .characterEncodingAsString;
2215:            }
2216:
2217:            /* (non-Javadoc)
2218:             * @see com.mysql.jdbc.IConnectionProperties#getExplainSlowQueries()
2219:             */
2220:            public boolean getExplainSlowQueries() {
2221:                return this .explainSlowQueries.getValueAsBoolean();
2222:            }
2223:
2224:            /* (non-Javadoc)
2225:             * @see com.mysql.jdbc.IConnectionProperties#getFailOverReadOnly()
2226:             */
2227:            public boolean getFailOverReadOnly() {
2228:                return this .failOverReadOnly.getValueAsBoolean();
2229:            }
2230:
2231:            /* (non-Javadoc)
2232:             * @see com.mysql.jdbc.IConnectionProperties#getGatherPerformanceMetrics()
2233:             */
2234:            public boolean getGatherPerformanceMetrics() {
2235:                return this .gatherPerformanceMetrics.getValueAsBoolean();
2236:            }
2237:
2238:            /**
2239:             * DOCUMENT ME!
2240:             * 
2241:             * @return
2242:             */
2243:            protected boolean getHighAvailability() {
2244:                return this .highAvailabilityAsBoolean;
2245:            }
2246:
2247:            /* (non-Javadoc)
2248:             * @see com.mysql.jdbc.IConnectionProperties#getHoldResultsOpenOverStatementClose()
2249:             */
2250:            public boolean getHoldResultsOpenOverStatementClose() {
2251:                return holdResultsOpenOverStatementClose.getValueAsBoolean();
2252:            }
2253:
2254:            /* (non-Javadoc)
2255:             * @see com.mysql.jdbc.IConnectionProperties#getIgnoreNonTxTables()
2256:             */
2257:            public boolean getIgnoreNonTxTables() {
2258:                return this .ignoreNonTxTables.getValueAsBoolean();
2259:            }
2260:
2261:            /* (non-Javadoc)
2262:             * @see com.mysql.jdbc.IConnectionProperties#getInitialTimeout()
2263:             */
2264:            public int getInitialTimeout() {
2265:                return this .initialTimeout.getValueAsInt();
2266:            }
2267:
2268:            /* (non-Javadoc)
2269:             * @see com.mysql.jdbc.IConnectionProperties#getInteractiveClient()
2270:             */
2271:            public boolean getInteractiveClient() {
2272:                return this .isInteractiveClient.getValueAsBoolean();
2273:            }
2274:
2275:            /* (non-Javadoc)
2276:             * @see com.mysql.jdbc.IConnectionProperties#getIsInteractiveClient()
2277:             */
2278:            public boolean getIsInteractiveClient() {
2279:                return this .isInteractiveClient.getValueAsBoolean();
2280:            }
2281:
2282:            /* (non-Javadoc)
2283:             * @see com.mysql.jdbc.IConnectionProperties#getJdbcCompliantTruncation()
2284:             */
2285:            public boolean getJdbcCompliantTruncation() {
2286:                return this .jdbcCompliantTruncation.getValueAsBoolean();
2287:            }
2288:
2289:            /* (non-Javadoc)
2290:             * @see com.mysql.jdbc.IConnectionProperties#getLocatorFetchBufferSize()
2291:             */
2292:            public int getLocatorFetchBufferSize() {
2293:                return this .locatorFetchBufferSize.getValueAsInt();
2294:            }
2295:
2296:            /* (non-Javadoc)
2297:             * @see com.mysql.jdbc.IConnectionProperties#getLogger()
2298:             */
2299:            public String getLogger() {
2300:                return this .loggerClassName.getValueAsString();
2301:            }
2302:
2303:            /* (non-Javadoc)
2304:             * @see com.mysql.jdbc.IConnectionProperties#getLoggerClassName()
2305:             */
2306:            public String getLoggerClassName() {
2307:                return this .loggerClassName.getValueAsString();
2308:            }
2309:
2310:            /* (non-Javadoc)
2311:             * @see com.mysql.jdbc.IConnectionProperties#getLogSlowQueries()
2312:             */
2313:            public boolean getLogSlowQueries() {
2314:                return this .logSlowQueries.getValueAsBoolean();
2315:            }
2316:
2317:            /* (non-Javadoc)
2318:             * @see com.mysql.jdbc.IConnectionProperties#getMaintainTimeStats()
2319:             */
2320:            public boolean getMaintainTimeStats() {
2321:                return maintainTimeStatsAsBoolean;
2322:            }
2323:
2324:            /* (non-Javadoc)
2325:             * @see com.mysql.jdbc.IConnectionProperties#getMaxQuerySizeToLog()
2326:             */
2327:            public int getMaxQuerySizeToLog() {
2328:                return this .maxQuerySizeToLog.getValueAsInt();
2329:            }
2330:
2331:            /* (non-Javadoc)
2332:             * @see com.mysql.jdbc.IConnectionProperties#getMaxReconnects()
2333:             */
2334:            public int getMaxReconnects() {
2335:                return this .maxReconnects.getValueAsInt();
2336:            }
2337:
2338:            /* (non-Javadoc)
2339:             * @see com.mysql.jdbc.IConnectionProperties#getMaxRows()
2340:             */
2341:            public int getMaxRows() {
2342:                return this .maxRowsAsInt;
2343:            }
2344:
2345:            /* (non-Javadoc)
2346:             * @see com.mysql.jdbc.IConnectionProperties#getMetadataCacheSize()
2347:             */
2348:            public int getMetadataCacheSize() {
2349:                return this .metadataCacheSize.getValueAsInt();
2350:            }
2351:
2352:            /* (non-Javadoc)
2353:             * @see com.mysql.jdbc.IConnectionProperties#getNoDatetimeStringSync()
2354:             */
2355:            public boolean getNoDatetimeStringSync() {
2356:                return this .noDatetimeStringSync.getValueAsBoolean();
2357:            }
2358:
2359:            /* (non-Javadoc)
2360:             * @see com.mysql.jdbc.IConnectionProperties#getNullCatalogMeansCurrent()
2361:             */
2362:            public boolean getNullCatalogMeansCurrent() {
2363:                return this .nullCatalogMeansCurrent.getValueAsBoolean();
2364:            }
2365:
2366:            /* (non-Javadoc)
2367:             * @see com.mysql.jdbc.IConnectionProperties#getNullNamePatternMatchesAll()
2368:             */
2369:            public boolean getNullNamePatternMatchesAll() {
2370:                return this .nullNamePatternMatchesAll.getValueAsBoolean();
2371:            }
2372:
2373:            /* (non-Javadoc)
2374:             * @see com.mysql.jdbc.IConnectionProperties#getPacketDebugBufferSize()
2375:             */
2376:            public int getPacketDebugBufferSize() {
2377:                return this .packetDebugBufferSize.getValueAsInt();
2378:            }
2379:
2380:            /* (non-Javadoc)
2381:             * @see com.mysql.jdbc.IConnectionProperties#getParanoid()
2382:             */
2383:            public boolean getParanoid() {
2384:                return this .paranoid.getValueAsBoolean();
2385:            }
2386:
2387:            /* (non-Javadoc)
2388:             * @see com.mysql.jdbc.IConnectionProperties#getPedantic()
2389:             */
2390:            public boolean getPedantic() {
2391:                return this .pedantic.getValueAsBoolean();
2392:            }
2393:
2394:            /* (non-Javadoc)
2395:             * @see com.mysql.jdbc.IConnectionProperties#getPreparedStatementCacheSize()
2396:             */
2397:            public int getPreparedStatementCacheSize() {
2398:                return ((Integer) this .preparedStatementCacheSize
2399:                        .getValueAsObject()).intValue();
2400:            }
2401:
2402:            /* (non-Javadoc)
2403:             * @see com.mysql.jdbc.IConnectionProperties#getPreparedStatementCacheSqlLimit()
2404:             */
2405:            public int getPreparedStatementCacheSqlLimit() {
2406:                return ((Integer) this .preparedStatementCacheSqlLimit
2407:                        .getValueAsObject()).intValue();
2408:            }
2409:
2410:            /* (non-Javadoc)
2411:             * @see com.mysql.jdbc.IConnectionProperties#getProfileSql()
2412:             */
2413:            public boolean getProfileSql() {
2414:                return this .profileSQLAsBoolean;
2415:            }
2416:
2417:            /* (non-Javadoc)
2418:             * @see com.mysql.jdbc.IConnectionProperties#getProfileSQL()
2419:             */
2420:            public boolean getProfileSQL() {
2421:                return this .profileSQL.getValueAsBoolean();
2422:            }
2423:
2424:            /* (non-Javadoc)
2425:             * @see com.mysql.jdbc.IConnectionProperties#getPropertiesTransform()
2426:             */
2427:            public String getPropertiesTransform() {
2428:                return this .propertiesTransform.getValueAsString();
2429:            }
2430:
2431:            /* (non-Javadoc)
2432:             * @see com.mysql.jdbc.IConnectionProperties#getQueriesBeforeRetryMaster()
2433:             */
2434:            public int getQueriesBeforeRetryMaster() {
2435:                return this .queriesBeforeRetryMaster.getValueAsInt();
2436:            }
2437:
2438:            /* (non-Javadoc)
2439:             * @see com.mysql.jdbc.IConnectionProperties#getReconnectAtTxEnd()
2440:             */
2441:            public boolean getReconnectAtTxEnd() {
2442:                return this .reconnectTxAtEndAsBoolean;
2443:            }
2444:
2445:            /* (non-Javadoc)
2446:             * @see com.mysql.jdbc.IConnectionProperties#getRelaxAutoCommit()
2447:             */
2448:            public boolean getRelaxAutoCommit() {
2449:                return this .relaxAutoCommit.getValueAsBoolean();
2450:            }
2451:
2452:            /* (non-Javadoc)
2453:             * @see com.mysql.jdbc.IConnectionProperties#getReportMetricsIntervalMillis()
2454:             */
2455:            public int getReportMetricsIntervalMillis() {
2456:                return this .reportMetricsIntervalMillis.getValueAsInt();
2457:            }
2458:
2459:            /* (non-Javadoc)
2460:             * @see com.mysql.jdbc.IConnectionProperties#getRequireSSL()
2461:             */
2462:            public boolean getRequireSSL() {
2463:                return this .requireSSL.getValueAsBoolean();
2464:            }
2465:
2466:            protected boolean getRetainStatementAfterResultSetClose() {
2467:                return this .retainStatementAfterResultSetClose
2468:                        .getValueAsBoolean();
2469:            }
2470:
2471:            /* (non-Javadoc)
2472:             * @see com.mysql.jdbc.IConnectionProperties#getRollbackOnPooledClose()
2473:             */
2474:            public boolean getRollbackOnPooledClose() {
2475:                return this .rollbackOnPooledClose.getValueAsBoolean();
2476:            }
2477:
2478:            /* (non-Javadoc)
2479:             * @see com.mysql.jdbc.IConnectionProperties#getRoundRobinLoadBalance()
2480:             */
2481:            public boolean getRoundRobinLoadBalance() {
2482:                return this .roundRobinLoadBalance.getValueAsBoolean();
2483:            }
2484:
2485:            /* (non-Javadoc)
2486:             * @see com.mysql.jdbc.IConnectionProperties#getRunningCTS13()
2487:             */
2488:            public boolean getRunningCTS13() {
2489:                return this .runningCTS13.getValueAsBoolean();
2490:            }
2491:
2492:            /* (non-Javadoc)
2493:             * @see com.mysql.jdbc.IConnectionProperties#getSecondsBeforeRetryMaster()
2494:             */
2495:            public int getSecondsBeforeRetryMaster() {
2496:                return this .secondsBeforeRetryMaster.getValueAsInt();
2497:            }
2498:
2499:            /* (non-Javadoc)
2500:             * @see com.mysql.jdbc.IConnectionProperties#getServerTimezone()
2501:             */
2502:            public String getServerTimezone() {
2503:                return this .serverTimezone.getValueAsString();
2504:            }
2505:
2506:            /* (non-Javadoc)
2507:             * @see com.mysql.jdbc.IConnectionProperties#getSessionVariables()
2508:             */
2509:            public String getSessionVariables() {
2510:                return sessionVariables.getValueAsString();
2511:            }
2512:
2513:            /* (non-Javadoc)
2514:             * @see com.mysql.jdbc.IConnectionProperties#getSlowQueryThresholdMillis()
2515:             */
2516:            public int getSlowQueryThresholdMillis() {
2517:                return this .slowQueryThresholdMillis.getValueAsInt();
2518:            }
2519:
2520:            /* (non-Javadoc)
2521:             * @see com.mysql.jdbc.IConnectionProperties#getSocketFactoryClassName()
2522:             */
2523:            public String getSocketFactoryClassName() {
2524:                return this .socketFactoryClassName.getValueAsString();
2525:            }
2526:
2527:            /* (non-Javadoc)
2528:             * @see com.mysql.jdbc.IConnectionProperties#getSocketTimeout()
2529:             */
2530:            public int getSocketTimeout() {
2531:                return this .socketTimeout.getValueAsInt();
2532:            }
2533:
2534:            /* (non-Javadoc)
2535:             * @see com.mysql.jdbc.IConnectionProperties#getStrictFloatingPoint()
2536:             */
2537:            public boolean getStrictFloatingPoint() {
2538:                return this .strictFloatingPoint.getValueAsBoolean();
2539:            }
2540:
2541:            /* (non-Javadoc)
2542:             * @see com.mysql.jdbc.IConnectionProperties#getStrictUpdates()
2543:             */
2544:            public boolean getStrictUpdates() {
2545:                return this .strictUpdates.getValueAsBoolean();
2546:            }
2547:
2548:            /* (non-Javadoc)
2549:             * @see com.mysql.jdbc.IConnectionProperties#getTinyInt1isBit()
2550:             */
2551:            public boolean getTinyInt1isBit() {
2552:                return this .tinyInt1isBit.getValueAsBoolean();
2553:            }
2554:
2555:            /* (non-Javadoc)
2556:             * @see com.mysql.jdbc.IConnectionProperties#getTraceProtocol()
2557:             */
2558:            public boolean getTraceProtocol() {
2559:                return this .traceProtocol.getValueAsBoolean();
2560:            }
2561:
2562:            /* (non-Javadoc)
2563:             * @see com.mysql.jdbc.IConnectionProperties#getTransformedBitIsBoolean()
2564:             */
2565:            public boolean getTransformedBitIsBoolean() {
2566:                return this .transformedBitIsBoolean.getValueAsBoolean();
2567:            }
2568:
2569:            /* (non-Javadoc)
2570:             * @see com.mysql.jdbc.IConnectionProperties#getUseCompression()
2571:             */
2572:            public boolean getUseCompression() {
2573:                return this .useCompression.getValueAsBoolean();
2574:            }
2575:
2576:            /* (non-Javadoc)
2577:             * @see com.mysql.jdbc.IConnectionProperties#getUseFastIntParsing()
2578:             */
2579:            public boolean getUseFastIntParsing() {
2580:                return this .useFastIntParsing.getValueAsBoolean();
2581:            }
2582:
2583:            /* (non-Javadoc)
2584:             * @see com.mysql.jdbc.IConnectionProperties#getUseHostsInPrivileges()
2585:             */
2586:            public boolean getUseHostsInPrivileges() {
2587:                return this .useHostsInPrivileges.getValueAsBoolean();
2588:            }
2589:
2590:            /* (non-Javadoc)
2591:             * @see com.mysql.jdbc.IConnectionProperties#getUseInformationSchema()
2592:             */
2593:            public boolean getUseInformationSchema() {
2594:                return this .useInformationSchema.getValueAsBoolean();
2595:            }
2596:
2597:            /* (non-Javadoc)
2598:             * @see com.mysql.jdbc.IConnectionProperties#getUseLocalSessionState()
2599:             */
2600:            public boolean getUseLocalSessionState() {
2601:                return this .useLocalSessionState.getValueAsBoolean();
2602:            }
2603:
2604:            /* (non-Javadoc)
2605:             * @see com.mysql.jdbc.IConnectionProperties#getUseOldUTF8Behavior()
2606:             */
2607:            public boolean getUseOldUTF8Behavior() {
2608:                return this .useOldUTF8BehaviorAsBoolean;
2609:            }
2610:
2611:            /* (non-Javadoc)
2612:             * @see com.mysql.jdbc.IConnectionProperties#getUseOnlyServerErrorMessages()
2613:             */
2614:            public boolean getUseOnlyServerErrorMessages() {
2615:                return this .useOnlyServerErrorMessages.getValueAsBoolean();
2616:            }
2617:
2618:            /* (non-Javadoc)
2619:             * @see com.mysql.jdbc.IConnectionProperties#getUseReadAheadInput()
2620:             */
2621:            public boolean getUseReadAheadInput() {
2622:                return this .useReadAheadInput.getValueAsBoolean();
2623:            }
2624:
2625:            /* (non-Javadoc)
2626:             * @see com.mysql.jdbc.IConnectionProperties#getUseServerPreparedStmts()
2627:             */
2628:            public boolean getUseServerPreparedStmts() {
2629:                return this .detectServerPreparedStmts.getValueAsBoolean();
2630:            }
2631:
2632:            /* (non-Javadoc)
2633:             * @see com.mysql.jdbc.IConnectionProperties#getUseSqlStateCodes()
2634:             */
2635:            public boolean getUseSqlStateCodes() {
2636:                return this .useSqlStateCodes.getValueAsBoolean();
2637:            }
2638:
2639:            /* (non-Javadoc)
2640:             * @see com.mysql.jdbc.IConnectionProperties#getUseSSL()
2641:             */
2642:            public boolean getUseSSL() {
2643:                return this .useSSL.getValueAsBoolean();
2644:            }
2645:
2646:            /* (non-Javadoc)
2647:             * @see com.mysql.jdbc.IConnectionProperties#getUseStreamLengthsInPrepStmts()
2648:             */
2649:            public boolean getUseStreamLengthsInPrepStmts() {
2650:                return this .useStreamLengthsInPrepStmts.getValueAsBoolean();
2651:            }
2652:
2653:            /* (non-Javadoc)
2654:             * @see com.mysql.jdbc.IConnectionProperties#getUseTimezone()
2655:             */
2656:            public boolean getUseTimezone() {
2657:                return this .useTimezone.getValueAsBoolean();
2658:            }
2659:
2660:            /* (non-Javadoc)
2661:             * @see com.mysql.jdbc.IConnectionProperties#getUseUltraDevWorkAround()
2662:             */
2663:            public boolean getUseUltraDevWorkAround() {
2664:                return this .useUltraDevWorkAround.getValueAsBoolean();
2665:            }
2666:
2667:            /* (non-Javadoc)
2668:             * @see com.mysql.jdbc.IConnectionProperties#getUseUnbufferedInput()
2669:             */
2670:            public boolean getUseUnbufferedInput() {
2671:                return this .useUnbufferedInput.getValueAsBoolean();
2672:            }
2673:
2674:            /* (non-Javadoc)
2675:             * @see com.mysql.jdbc.IConnectionProperties#getUseUnicode()
2676:             */
2677:            public boolean getUseUnicode() {
2678:                return this .useUnicodeAsBoolean;
2679:            }
2680:
2681:            /* (non-Javadoc)
2682:             * @see com.mysql.jdbc.IConnectionProperties#getUseUsageAdvisor()
2683:             */
2684:            public boolean getUseUsageAdvisor() {
2685:                return this .useUsageAdvisorAsBoolean;
2686:            }
2687:
2688:            /* (non-Javadoc)
2689:             * @see com.mysql.jdbc.IConnectionProperties#getYearIsDateType()
2690:             */
2691:            public boolean getYearIsDateType() {
2692:                return this .yearIsDateType.getValueAsBoolean();
2693:            }
2694:
2695:            /* (non-Javadoc)
2696:             * @see com.mysql.jdbc.IConnectionProperties#getZeroDateTimeBehavior()
2697:             */
2698:            public String getZeroDateTimeBehavior() {
2699:                return this .zeroDateTimeBehavior.getValueAsString();
2700:            }
2701:
2702:            /**
2703:             * Initializes driver properties that come from a JNDI reference (in the
2704:             * case of a javax.sql.DataSource bound into some name service that doesn't
2705:             * handle Java objects directly).
2706:             * 
2707:             * @param ref
2708:             *            The JNDI Reference that holds RefAddrs for all properties
2709:             * @throws SQLException
2710:             *             DOCUMENT ME!
2711:             */
2712:            protected void initializeFromRef(Reference ref) throws SQLException {
2713:                int numPropertiesToSet = PROPERTY_LIST.size();
2714:
2715:                for (int i = 0; i < numPropertiesToSet; i++) {
2716:                    java.lang.reflect.Field propertyField = (java.lang.reflect.Field) PROPERTY_LIST
2717:                            .get(i);
2718:
2719:                    try {
2720:                        ConnectionProperty propToSet = (ConnectionProperty) propertyField
2721:                                .get(this );
2722:
2723:                        if (ref != null) {
2724:                            propToSet.initializeFrom(ref);
2725:                        }
2726:                    } catch (IllegalAccessException iae) {
2727:                        throw SQLError.createSQLException(
2728:                                "Internal properties failure", //$NON-NLS-1$
2729:                                SQLError.SQL_STATE_GENERAL_ERROR);
2730:                    }
2731:                }
2732:
2733:                postInitialization();
2734:            }
2735:
2736:            /**
2737:             * Initializes driver properties that come from URL or properties passed to
2738:             * the driver manager.
2739:             * 
2740:             * @param info
2741:             *            DOCUMENT ME!
2742:             * @throws SQLException
2743:             *             DOCUMENT ME!
2744:             */
2745:            protected void initializeProperties(Properties info)
2746:                    throws SQLException {
2747:                if (info != null) {
2748:                    // For backwards-compatibility
2749:                    String profileSqlLc = info.getProperty("profileSql"); //$NON-NLS-1$
2750:
2751:                    if (profileSqlLc != null) {
2752:                        info.put("profileSQL", profileSqlLc); //$NON-NLS-1$
2753:                    }
2754:
2755:                    Properties infoCopy = (Properties) info.clone();
2756:
2757:                    infoCopy.remove(NonRegisteringDriver.HOST_PROPERTY_KEY);
2758:                    infoCopy.remove(NonRegisteringDriver.USER_PROPERTY_KEY);
2759:                    infoCopy.remove(NonRegisteringDriver.PASSWORD_PROPERTY_KEY);
2760:                    infoCopy.remove(NonRegisteringDriver.DBNAME_PROPERTY_KEY);
2761:                    infoCopy.remove(NonRegisteringDriver.PORT_PROPERTY_KEY);
2762:                    infoCopy.remove("profileSql"); //$NON-NLS-1$
2763:
2764:                    int numPropertiesToSet = PROPERTY_LIST.size();
2765:
2766:                    for (int i = 0; i < numPropertiesToSet; i++) {
2767:                        java.lang.reflect.Field propertyField = (java.lang.reflect.Field) PROPERTY_LIST
2768:                                .get(i);
2769:
2770:                        try {
2771:                            ConnectionProperty propToSet = (ConnectionProperty) propertyField
2772:                                    .get(this );
2773:
2774:                            propToSet.initializeFrom(infoCopy);
2775:                        } catch (IllegalAccessException iae) {
2776:                            throw SQLError
2777:                                    .createSQLException(
2778:                                            Messages
2779:                                                    .getString("ConnectionProperties.unableToInitDriverProperties") //$NON-NLS-1$
2780:                                                    + iae.toString(),
2781:                                            SQLError.SQL_STATE_GENERAL_ERROR);
2782:                        }
2783:                    }
2784:
2785:                    // TODO -- Not yet
2786:                    /*
2787:                     * int numUnknownProperties = infoCopy.size(); if
2788:                     * (numUnknownProperties > 0) { StringBuffer errorMessageBuf = new
2789:                     * StringBuffer( "Unknown connection ");
2790:                     * errorMessageBuf.append((numUnknownProperties == 1) ? "property " :
2791:                     * "properties "); Iterator propNamesItor =
2792:                     * infoCopy.keySet().iterator(); errorMessageBuf.append("'");
2793:                     * errorMessageBuf.append(propNamesItor.next().toString());
2794:                     * errorMessageBuf.append("'"); while (propNamesItor.hasNext()) {
2795:                     * errorMessageBuf.append(", '");
2796:                     * errorMessageBuf.append(propNamesItor.next().toString());
2797:                     * errorMessageBuf.append("'"); } throw new
2798:                     * SQLException(errorMessageBuf.toString(),
2799:                     * SQLError.SQL_STATE_INVALID_CONNECTION_ATTRIBUTE); }
2800:                     */
2801:                    postInitialization();
2802:                }
2803:            }
2804:
2805:            protected void postInitialization() throws SQLException {
2806:
2807:                // Support 'old' profileSql capitalization
2808:                if (this .profileSql.getValueAsObject() != null) {
2809:                    this .profileSQL.initializeFrom(this .profileSql
2810:                            .getValueAsObject().toString());
2811:                }
2812:
2813:                this .reconnectTxAtEndAsBoolean = ((Boolean) this .reconnectAtTxEnd
2814:                        .getValueAsObject()).booleanValue();
2815:
2816:                // Adjust max rows
2817:                if (this .getMaxRows() == 0) {
2818:                    // adjust so that it will become MysqlDefs.MAX_ROWS
2819:                    // in execSQL()
2820:                    this .maxRows.setValueAsObject(Constants.integerValueOf(-1));
2821:                }
2822:
2823:                //
2824:                // Check character encoding
2825:                //
2826:                String testEncoding = this .getEncoding();
2827:
2828:                if (testEncoding != null) {
2829:                    // Attempt to use the encoding, and bail out if it
2830:                    // can't be used
2831:                    try {
2832:                        String testString = "abc"; //$NON-NLS-1$
2833:                        testString.getBytes(testEncoding);
2834:                    } catch (UnsupportedEncodingException UE) {
2835:                        throw SQLError
2836:                                .createSQLException(
2837:                                        Messages
2838:                                                .getString("ConnectionProperties.unsupportedCharacterEncoding") + Messages.getString("ConnectionProperties.unsupportedCharacterEncoding.1") //$NON-NLS-1$ //$NON-NLS-2$
2839:                                                + testEncoding
2840:                                                + Messages
2841:                                                        .getString("ConnectionProperties.unsupportedCharacterEncoding.2"), "0S100"); //$NON-NLS-1$ //$NON-NLS-2$
2842:                    }
2843:                }
2844:
2845:                // Metadata caching is only supported on JDK-1.4 and newer
2846:                // because it relies on LinkedHashMap being present.
2847:                // Check (and disable) if not supported
2848:                if (((Boolean) this .cacheResultSetMetadata.getValueAsObject())
2849:                        .booleanValue()) {
2850:                    try {
2851:                        Class.forName("java.util.LinkedHashMap"); //$NON-NLS-1$
2852:                    } catch (ClassNotFoundException cnfe) {
2853:                        this .cacheResultSetMetadata.setValue(false);
2854:                    }
2855:                }
2856:
2857:                this .cacheResultSetMetaDataAsBoolean = this .cacheResultSetMetadata
2858:                        .getValueAsBoolean();
2859:                this .useUnicodeAsBoolean = this .useUnicode.getValueAsBoolean();
2860:                this .characterEncodingAsString = ((String) this .characterEncoding
2861:                        .getValueAsObject());
2862:                this .highAvailabilityAsBoolean = this .autoReconnect
2863:                        .getValueAsBoolean();
2864:                this .autoReconnectForPoolsAsBoolean = this .autoReconnectForPools
2865:                        .getValueAsBoolean();
2866:                this .maxRowsAsInt = ((Integer) this .maxRows.getValueAsObject())
2867:                        .intValue();
2868:                this .profileSQLAsBoolean = this .profileSQL.getValueAsBoolean();
2869:                this .useUsageAdvisorAsBoolean = this .useUsageAdvisor
2870:                        .getValueAsBoolean();
2871:                this .useOldUTF8BehaviorAsBoolean = this .useOldUTF8Behavior
2872:                        .getValueAsBoolean();
2873:                this .autoGenerateTestcaseScriptAsBoolean = this .autoGenerateTestcaseScript
2874:                        .getValueAsBoolean();
2875:                this .maintainTimeStatsAsBoolean = this .maintainTimeStats
2876:                        .getValueAsBoolean();
2877:                this .jdbcCompliantTruncationForReads = getJdbcCompliantTruncation();
2878:
2879:                if (getUseCursorFetch()) {
2880:                    // assume they want to use server-side prepared statements
2881:                    // because they're required for this functionality
2882:                    setDetectServerPreparedStmts(true);
2883:                }
2884:            }
2885:
2886:            /* (non-Javadoc)
2887:             * @see com.mysql.jdbc.IConnectionProperties#setAllowLoadLocalInfile(boolean)
2888:             */
2889:            public void setAllowLoadLocalInfile(boolean property) {
2890:                this .allowLoadLocalInfile.setValue(property);
2891:            }
2892:
2893:            /* (non-Javadoc)
2894:             * @see com.mysql.jdbc.IConnectionProperties#setAllowMultiQueries(boolean)
2895:             */
2896:            public void setAllowMultiQueries(boolean property) {
2897:                this .allowMultiQueries.setValue(property);
2898:            }
2899:
2900:            /* (non-Javadoc)
2901:             * @see com.mysql.jdbc.IConnectionProperties#setAllowNanAndInf(boolean)
2902:             */
2903:            public void setAllowNanAndInf(boolean flag) {
2904:                this .allowNanAndInf.setValue(flag);
2905:            }
2906:
2907:            /* (non-Javadoc)
2908:             * @see com.mysql.jdbc.IConnectionProperties#setAllowUrlInLocalInfile(boolean)
2909:             */
2910:            public void setAllowUrlInLocalInfile(boolean flag) {
2911:                this .allowUrlInLocalInfile.setValue(flag);
2912:            }
2913:
2914:            /* (non-Javadoc)
2915:             * @see com.mysql.jdbc.IConnectionProperties#setAlwaysSendSetIsolation(boolean)
2916:             */
2917:            public void setAlwaysSendSetIsolation(boolean flag) {
2918:                this .alwaysSendSetIsolation.setValue(flag);
2919:            }
2920:
2921:            /* (non-Javadoc)
2922:             * @see com.mysql.jdbc.IConnectionProperties#setAutoDeserialize(boolean)
2923:             */
2924:            public void setAutoDeserialize(boolean flag) {
2925:                this .autoDeserialize.setValue(flag);
2926:            }
2927:
2928:            /* (non-Javadoc)
2929:             * @see com.mysql.jdbc.IConnectionProperties#setAutoGenerateTestcaseScript(boolean)
2930:             */
2931:            public void setAutoGenerateTestcaseScript(boolean flag) {
2932:                this .autoGenerateTestcaseScript.setValue(flag);
2933:                this .autoGenerateTestcaseScriptAsBoolean = this .autoGenerateTestcaseScript
2934:                        .getValueAsBoolean();
2935:            }
2936:
2937:            /* (non-Javadoc)
2938:             * @see com.mysql.jdbc.IConnectionProperties#setAutoReconnect(boolean)
2939:             */
2940:            public void setAutoReconnect(boolean flag) {
2941:                this .autoReconnect.setValue(flag);
2942:            }
2943:
2944:            /* (non-Javadoc)
2945:             * @see com.mysql.jdbc.IConnectionProperties#setAutoReconnectForConnectionPools(boolean)
2946:             */
2947:            public void setAutoReconnectForConnectionPools(boolean property) {
2948:                this .autoReconnectForPools.setValue(property);
2949:                this .autoReconnectForPoolsAsBoolean = this .autoReconnectForPools
2950:                        .getValueAsBoolean();
2951:            }
2952:
2953:            /* (non-Javadoc)
2954:             * @see com.mysql.jdbc.IConnectionProperties#setAutoReconnectForPools(boolean)
2955:             */
2956:            public void setAutoReconnectForPools(boolean flag) {
2957:                this .autoReconnectForPools.setValue(flag);
2958:            }
2959:
2960:            /* (non-Javadoc)
2961:             * @see com.mysql.jdbc.IConnectionProperties#setBlobSendChunkSize(java.lang.String)
2962:             */
2963:            public void setBlobSendChunkSize(String value) throws SQLException {
2964:                this .blobSendChunkSize.setValue(value);
2965:            }
2966:
2967:            /* (non-Javadoc)
2968:             * @see com.mysql.jdbc.IConnectionProperties#setCacheCallableStatements(boolean)
2969:             */
2970:            public void setCacheCallableStatements(boolean flag) {
2971:                this .cacheCallableStatements.setValue(flag);
2972:            }
2973:
2974:            /* (non-Javadoc)
2975:             * @see com.mysql.jdbc.IConnectionProperties#setCachePreparedStatements(boolean)
2976:             */
2977:            public void setCachePreparedStatements(boolean flag) {
2978:                this .cachePreparedStatements.setValue(flag);
2979:            }
2980:
2981:            /* (non-Javadoc)
2982:             * @see com.mysql.jdbc.IConnectionProperties#setCacheResultSetMetadata(boolean)
2983:             */
2984:            public void setCacheResultSetMetadata(boolean property) {
2985:                this .cacheResultSetMetadata.setValue(property);
2986:                this .cacheResultSetMetaDataAsBoolean = this .cacheResultSetMetadata
2987:                        .getValueAsBoolean();
2988:            }
2989:
2990:            /* (non-Javadoc)
2991:             * @see com.mysql.jdbc.IConnectionProperties#setCacheServerConfiguration(boolean)
2992:             */
2993:            public void setCacheServerConfiguration(boolean flag) {
2994:                this .cacheServerConfiguration.setValue(flag);
2995:            }
2996:
2997:            /* (non-Javadoc)
2998:             * @see com.mysql.jdbc.IConnectionProperties#setCallableStatementCacheSize(int)
2999:             */
3000:            public void setCallableStatementCacheSize(int size) {
3001:                this .callableStatementCacheSize.setValue(size);
3002:            }
3003:
3004:            /* (non-Javadoc)
3005:             * @see com.mysql.jdbc.IConnectionProperties#setCapitalizeDBMDTypes(boolean)
3006:             */
3007:            public void setCapitalizeDBMDTypes(boolean property) {
3008:                this .capitalizeTypeNames.setValue(property);
3009:            }
3010:
3011:            /* (non-Javadoc)
3012:             * @see com.mysql.jdbc.IConnectionProperties#setCapitalizeTypeNames(boolean)
3013:             */
3014:            public void setCapitalizeTypeNames(boolean flag) {
3015:                this .capitalizeTypeNames.setValue(flag);
3016:            }
3017:
3018:            /* (non-Javadoc)
3019:             * @see com.mysql.jdbc.IConnectionProperties#setCharacterEncoding(java.lang.String)
3020:             */
3021:            public void setCharacterEncoding(String encoding) {
3022:                this .characterEncoding.setValue(encoding);
3023:            }
3024:
3025:            /* (non-Javadoc)
3026:             * @see com.mysql.jdbc.IConnectionProperties#setCharacterSetResults(java.lang.String)
3027:             */
3028:            public void setCharacterSetResults(String characterSet) {
3029:                this .characterSetResults.setValue(characterSet);
3030:            }
3031:
3032:            /* (non-Javadoc)
3033:             * @see com.mysql.jdbc.IConnectionProperties#setClobberStreamingResults(boolean)
3034:             */
3035:            public void setClobberStreamingResults(boolean flag) {
3036:                this .clobberStreamingResults.setValue(flag);
3037:            }
3038:
3039:            /* (non-Javadoc)
3040:             * @see com.mysql.jdbc.IConnectionProperties#setClobCharacterEncoding(java.lang.String)
3041:             */
3042:            public void setClobCharacterEncoding(String encoding) {
3043:                this .clobCharacterEncoding.setValue(encoding);
3044:            }
3045:
3046:            /* (non-Javadoc)
3047:             * @see com.mysql.jdbc.IConnectionProperties#setConnectionCollation(java.lang.String)
3048:             */
3049:            public void setConnectionCollation(String collation) {
3050:                this .connectionCollation.setValue(collation);
3051:            }
3052:
3053:            /* (non-Javadoc)
3054:             * @see com.mysql.jdbc.IConnectionProperties#setConnectTimeout(int)
3055:             */
3056:            public void setConnectTimeout(int timeoutMs) {
3057:                this .connectTimeout.setValue(timeoutMs);
3058:            }
3059:
3060:            /* (non-Javadoc)
3061:             * @see com.mysql.jdbc.IConnectionProperties#setContinueBatchOnError(boolean)
3062:             */
3063:            public void setContinueBatchOnError(boolean property) {
3064:                this .continueBatchOnError.setValue(property);
3065:            }
3066:
3067:            /* (non-Javadoc)
3068:             * @see com.mysql.jdbc.IConnectionProperties#setCreateDatabaseIfNotExist(boolean)
3069:             */
3070:            public void setCreateDatabaseIfNotExist(boolean flag) {
3071:                this .createDatabaseIfNotExist.setValue(flag);
3072:            }
3073:
3074:            /* (non-Javadoc)
3075:             * @see com.mysql.jdbc.IConnectionProperties#setDefaultFetchSize(int)
3076:             */
3077:            public void setDefaultFetchSize(int n) {
3078:                this .defaultFetchSize.setValue(n);
3079:            }
3080:
3081:            /* (non-Javadoc)
3082:             * @see com.mysql.jdbc.IConnectionProperties#setDetectServerPreparedStmts(boolean)
3083:             */
3084:            public void setDetectServerPreparedStmts(boolean property) {
3085:                this .detectServerPreparedStmts.setValue(property);
3086:            }
3087:
3088:            /* (non-Javadoc)
3089:             * @see com.mysql.jdbc.IConnectionProperties#setDontTrackOpenResources(boolean)
3090:             */
3091:            public void setDontTrackOpenResources(boolean flag) {
3092:                this .dontTrackOpenResources.setValue(flag);
3093:            }
3094:
3095:            /* (non-Javadoc)
3096:             * @see com.mysql.jdbc.IConnectionProperties#setDumpQueriesOnException(boolean)
3097:             */
3098:            public void setDumpQueriesOnException(boolean flag) {
3099:                this .dumpQueriesOnException.setValue(flag);
3100:            }
3101:
3102:            /* (non-Javadoc)
3103:             * @see com.mysql.jdbc.IConnectionProperties#setDynamicCalendars(boolean)
3104:             */
3105:            public void setDynamicCalendars(boolean flag) {
3106:                this .dynamicCalendars.setValue(flag);
3107:            }
3108:
3109:            /* (non-Javadoc)
3110:             * @see com.mysql.jdbc.IConnectionProperties#setElideSetAutoCommits(boolean)
3111:             */
3112:            public void setElideSetAutoCommits(boolean flag) {
3113:                this .elideSetAutoCommits.setValue(flag);
3114:            }
3115:
3116:            /* (non-Javadoc)
3117:             * @see com.mysql.jdbc.IConnectionProperties#setEmptyStringsConvertToZero(boolean)
3118:             */
3119:            public void setEmptyStringsConvertToZero(boolean flag) {
3120:                this .emptyStringsConvertToZero.setValue(flag);
3121:            }
3122:
3123:            /* (non-Javadoc)
3124:             * @see com.mysql.jdbc.IConnectionProperties#setEmulateLocators(boolean)
3125:             */
3126:            public void setEmulateLocators(boolean property) {
3127:                this .emulateLocators.setValue(property);
3128:            }
3129:
3130:            /* (non-Javadoc)
3131:             * @see com.mysql.jdbc.IConnectionProperties#setEmulateUnsupportedPstmts(boolean)
3132:             */
3133:            public void setEmulateUnsupportedPstmts(boolean flag) {
3134:                this .emulateUnsupportedPstmts.setValue(flag);
3135:            }
3136:
3137:            /* (non-Javadoc)
3138:             * @see com.mysql.jdbc.IConnectionProperties#setEnablePacketDebug(boolean)
3139:             */
3140:            public void setEnablePacketDebug(boolean flag) {
3141:                this .enablePacketDebug.setValue(flag);
3142:            }
3143:
3144:            /* (non-Javadoc)
3145:             * @see com.mysql.jdbc.IConnectionProperties#setEncoding(java.lang.String)
3146:             */
3147:            public void setEncoding(String property) {
3148:                this .characterEncoding.setValue(property);
3149:                this .characterEncodingAsString = this .characterEncoding
3150:                        .getValueAsString();
3151:            }
3152:
3153:            /* (non-Javadoc)
3154:             * @see com.mysql.jdbc.IConnectionProperties#setExplainSlowQueries(boolean)
3155:             */
3156:            public void setExplainSlowQueries(boolean flag) {
3157:                this .explainSlowQueries.setValue(flag);
3158:            }
3159:
3160:            /* (non-Javadoc)
3161:             * @see com.mysql.jdbc.IConnectionProperties#setFailOverReadOnly(boolean)
3162:             */
3163:            public void setFailOverReadOnly(boolean flag) {
3164:                this .failOverReadOnly.setValue(flag);
3165:            }
3166:
3167:            /* (non-Javadoc)
3168:             * @see com.mysql.jdbc.IConnectionProperties#setGatherPerformanceMetrics(boolean)
3169:             */
3170:            public void setGatherPerformanceMetrics(boolean flag) {
3171:                this .gatherPerformanceMetrics.setValue(flag);
3172:            }
3173:
3174:            /**
3175:             * DOCUMENT ME!
3176:             * 
3177:             * @param property
3178:             */
3179:            protected void setHighAvailability(boolean property) {
3180:                this .autoReconnect.setValue(property);
3181:                this .highAvailabilityAsBoolean = this .autoReconnect
3182:                        .getValueAsBoolean();
3183:            }
3184:
3185:            /* (non-Javadoc)
3186:             * @see com.mysql.jdbc.IConnectionProperties#setHoldResultsOpenOverStatementClose(boolean)
3187:             */
3188:            public void setHoldResultsOpenOverStatementClose(boolean flag) {
3189:                this .holdResultsOpenOverStatementClose.setValue(flag);
3190:            }
3191:
3192:            /* (non-Javadoc)
3193:             * @see com.mysql.jdbc.IConnectionProperties#setIgnoreNonTxTables(boolean)
3194:             */
3195:            public void setIgnoreNonTxTables(boolean property) {
3196:                this .ignoreNonTxTables.setValue(property);
3197:            }
3198:
3199:            /* (non-Javadoc)
3200:             * @see com.mysql.jdbc.IConnectionProperties#setInitialTimeout(int)
3201:             */
3202:            public void setInitialTimeout(int property) {
3203:                this .initialTimeout.setValue(property);
3204:            }
3205:
3206:            /* (non-Javadoc)
3207:             * @see com.mysql.jdbc.IConnectionProperties#setIsInteractiveClient(boolean)
3208:             */
3209:            public void setIsInteractiveClient(boolean property) {
3210:                this .isInteractiveClient.setValue(property);
3211:            }
3212:
3213:            /* (non-Javadoc)
3214:             * @see com.mysql.jdbc.IConnectionProperties#setJdbcCompliantTruncation(boolean)
3215:             */
3216:            public void setJdbcCompliantTruncation(boolean flag) {
3217:                this .jdbcCompliantTruncation.setValue(flag);
3218:            }
3219:
3220:            /* (non-Javadoc)
3221:             * @see com.mysql.jdbc.IConnectionProperties#setLocatorFetchBufferSize(java.lang.String)
3222:             */
3223:            public void setLocatorFetchBufferSize(String value)
3224:                    throws SQLException {
3225:                this .locatorFetchBufferSize.setValue(value);
3226:            }
3227:
3228:            /* (non-Javadoc)
3229:             * @see com.mysql.jdbc.IConnectionProperties#setLogger(java.lang.String)
3230:             */
3231:            public void setLogger(String property) {
3232:                this .loggerClassName.setValueAsObject(property);
3233:            }
3234:
3235:            /* (non-Javadoc)
3236:             * @see com.mysql.jdbc.IConnectionProperties#setLoggerClassName(java.lang.String)
3237:             */
3238:            public void setLoggerClassName(String className) {
3239:                this .loggerClassName.setValue(className);
3240:            }
3241:
3242:            /* (non-Javadoc)
3243:             * @see com.mysql.jdbc.IConnectionProperties#setLogSlowQueries(boolean)
3244:             */
3245:            public void setLogSlowQueries(boolean flag) {
3246:                this .logSlowQueries.setValue(flag);
3247:            }
3248:
3249:            /* (non-Javadoc)
3250:             * @see com.mysql.jdbc.IConnectionProperties#setMaintainTimeStats(boolean)
3251:             */
3252:            public void setMaintainTimeStats(boolean flag) {
3253:                this .maintainTimeStats.setValue(flag);
3254:                this .maintainTimeStatsAsBoolean = this .maintainTimeStats
3255:                        .getValueAsBoolean();
3256:            }
3257:
3258:            /* (non-Javadoc)
3259:             * @see com.mysql.jdbc.IConnectionProperties#setMaxQuerySizeToLog(int)
3260:             */
3261:            public void setMaxQuerySizeToLog(int sizeInBytes) {
3262:                this .maxQuerySizeToLog.setValue(sizeInBytes);
3263:            }
3264:
3265:            /* (non-Javadoc)
3266:             * @see com.mysql.jdbc.IConnectionProperties#setMaxReconnects(int)
3267:             */
3268:            public void setMaxReconnects(int property) {
3269:                this .maxReconnects.setValue(property);
3270:            }
3271:
3272:            /* (non-Javadoc)
3273:             * @see com.mysql.jdbc.IConnectionProperties#setMaxRows(int)
3274:             */
3275:            public void setMaxRows(int property) {
3276:                this .maxRows.setValue(property);
3277:                this .maxRowsAsInt = this .maxRows.getValueAsInt();
3278:            }
3279:
3280:            /* (non-Javadoc)
3281:             * @see com.mysql.jdbc.IConnectionProperties#setMetadataCacheSize(int)
3282:             */
3283:            public void setMetadataCacheSize(int value) {
3284:                this .metadataCacheSize.setValue(value);
3285:            }
3286:
3287:            /* (non-Javadoc)
3288:             * @see com.mysql.jdbc.IConnectionProperties#setNoDatetimeStringSync(boolean)
3289:             */
3290:            public void setNoDatetimeStringSync(boolean flag) {
3291:                this .noDatetimeStringSync.setValue(flag);
3292:            }
3293:
3294:            /* (non-Javadoc)
3295:             * @see com.mysql.jdbc.IConnectionProperties#setNullCatalogMeansCurrent(boolean)
3296:             */
3297:            public void setNullCatalogMeansCurrent(boolean value) {
3298:                this .nullCatalogMeansCurrent.setValue(value);
3299:            }
3300:
3301:            /* (non-Javadoc)
3302:             * @see com.mysql.jdbc.IConnectionProperties#setNullNamePatternMatchesAll(boolean)
3303:             */
3304:            public void setNullNamePatternMatchesAll(boolean value) {
3305:                this .nullNamePatternMatchesAll.setValue(value);
3306:            }
3307:
3308:            /* (non-Javadoc)
3309:             * @see com.mysql.jdbc.IConnectionProperties#setPacketDebugBufferSize(int)
3310:             */
3311:            public void setPacketDebugBufferSize(int size) {
3312:                this .packetDebugBufferSize.setValue(size);
3313:            }
3314:
3315:            /* (non-Javadoc)
3316:             * @see com.mysql.jdbc.IConnectionProperties#setParanoid(boolean)
3317:             */
3318:            public void setParanoid(boolean property) {
3319:                this .paranoid.setValue(property);
3320:            }
3321:
3322:            /* (non-Javadoc)
3323:             * @see com.mysql.jdbc.IConnectionProperties#setPedantic(boolean)
3324:             */
3325:            public void setPedantic(boolean property) {
3326:                this .pedantic.setValue(property);
3327:            }
3328:
3329:            /* (non-Javadoc)
3330:             * @see com.mysql.jdbc.IConnectionProperties#setPreparedStatementCacheSize(int)
3331:             */
3332:            public void setPreparedStatementCacheSize(int cacheSize) {
3333:                this .preparedStatementCacheSize.setValue(cacheSize);
3334:            }
3335:
3336:            /* (non-Javadoc)
3337:             * @see com.mysql.jdbc.IConnectionProperties#setPreparedStatementCacheSqlLimit(int)
3338:             */
3339:            public void setPreparedStatementCacheSqlLimit(int cacheSqlLimit) {
3340:                this .preparedStatementCacheSqlLimit.setValue(cacheSqlLimit);
3341:            }
3342:
3343:            /* (non-Javadoc)
3344:             * @see com.mysql.jdbc.IConnectionProperties#setProfileSql(boolean)
3345:             */
3346:            public void setProfileSql(boolean property) {
3347:                this .profileSQL.setValue(property);
3348:                this .profileSQLAsBoolean = this .profileSQL.getValueAsBoolean();
3349:            }
3350:
3351:            /* (non-Javadoc)
3352:             * @see com.mysql.jdbc.IConnectionProperties#setProfileSQL(boolean)
3353:             */
3354:            public void setProfileSQL(boolean flag) {
3355:                this .profileSQL.setValue(flag);
3356:            }
3357:
3358:            /* (non-Javadoc)
3359:             * @see com.mysql.jdbc.IConnectionProperties#setPropertiesTransform(java.lang.String)
3360:             */
3361:            public void setPropertiesTransform(String value) {
3362:                this .propertiesTransform.setValue(value);
3363:            }
3364:
3365:            /* (non-Javadoc)
3366:             * @see com.mysql.jdbc.IConnectionProperties#setQueriesBeforeRetryMaster(int)
3367:             */
3368:            public void setQueriesBeforeRetryMaster(int property) {
3369:                this .queriesBeforeRetryMaster.setValue(property);
3370:            }
3371:
3372:            /* (non-Javadoc)
3373:             * @see com.mysql.jdbc.IConnectionProperties#setReconnectAtTxEnd(boolean)
3374:             */
3375:            public void setReconnectAtTxEnd(boolean property) {
3376:                this .reconnectAtTxEnd.setValue(property);
3377:                this .reconnectTxAtEndAsBoolean = this .reconnectAtTxEnd
3378:                        .getValueAsBoolean();
3379:            }
3380:
3381:            /* (non-Javadoc)
3382:             * @see com.mysql.jdbc.IConnectionProperties#setRelaxAutoCommit(boolean)
3383:             */
3384:            public void setRelaxAutoCommit(boolean property) {
3385:                this .relaxAutoCommit.setValue(property);
3386:            }
3387:
3388:            /* (non-Javadoc)
3389:             * @see com.mysql.jdbc.IConnectionProperties#setReportMetricsIntervalMillis(int)
3390:             */
3391:            public void setReportMetricsIntervalMillis(int millis) {
3392:                this .reportMetricsIntervalMillis.setValue(millis);
3393:            }
3394:
3395:            /* (non-Javadoc)
3396:             * @see com.mysql.jdbc.IConnectionProperties#setRequireSSL(boolean)
3397:             */
3398:            public void setRequireSSL(boolean property) {
3399:                this .requireSSL.setValue(property);
3400:            }
3401:
3402:            /* (non-Javadoc)
3403:             * @see com.mysql.jdbc.IConnectionProperties#setRetainStatementAfterResultSetClose(boolean)
3404:             */
3405:            public void setRetainStatementAfterResultSetClose(boolean flag) {
3406:                this .retainStatementAfterResultSetClose.setValue(flag);
3407:            }
3408:
3409:            /* (non-Javadoc)
3410:             * @see com.mysql.jdbc.IConnectionProperties#setRollbackOnPooledClose(boolean)
3411:             */
3412:            public void setRollbackOnPooledClose(boolean flag) {
3413:                this .rollbackOnPooledClose.setValue(flag);
3414:            }
3415:
3416:            /* (non-Javadoc)
3417:             * @see com.mysql.jdbc.IConnectionProperties#setRoundRobinLoadBalance(boolean)
3418:             */
3419:            public void setRoundRobinLoadBalance(boolean flag) {
3420:                this .roundRobinLoadBalance.setValue(flag);
3421:            }
3422:
3423:            /* (non-Javadoc)
3424:             * @see com.mysql.jdbc.IConnectionProperties#setRunningCTS13(boolean)
3425:             */
3426:            public void setRunningCTS13(boolean flag) {
3427:                this .runningCTS13.setValue(flag);
3428:            }
3429:
3430:            /* (non-Javadoc)
3431:             * @see com.mysql.jdbc.IConnectionProperties#setSecondsBeforeRetryMaster(int)
3432:             */
3433:            public void setSecondsBeforeRetryMaster(int property) {
3434:                this .secondsBeforeRetryMaster.setValue(property);
3435:            }
3436:
3437:            /* (non-Javadoc)
3438:             * @see com.mysql.jdbc.IConnectionProperties#setServerTimezone(java.lang.String)
3439:             */
3440:            public void setServerTimezone(String property) {
3441:                this .serverTimezone.setValue(property);
3442:            }
3443:
3444:            /* (non-Javadoc)
3445:             * @see com.mysql.jdbc.IConnectionProperties#setSessionVariables(java.lang.String)
3446:             */
3447:            public void setSessionVariables(String variables) {
3448:                this .sessionVariables.setValue(variables);
3449:            }
3450:
3451:            /* (non-Javadoc)
3452:             * @see com.mysql.jdbc.IConnectionProperties#setSlowQueryThresholdMillis(int)
3453:             */
3454:            public void setSlowQueryThresholdMillis(int millis) {
3455:                this .slowQueryThresholdMillis.setValue(millis);
3456:            }
3457:
3458:            /* (non-Javadoc)
3459:             * @see com.mysql.jdbc.IConnectionProperties#setSocketFactoryClassName(java.lang.String)
3460:             */
3461:            public void setSocketFactoryClassName(String property) {
3462:                this .socketFactoryClassName.setValue(property);
3463:            }
3464:
3465:            /* (non-Javadoc)
3466:             * @see com.mysql.jdbc.IConnectionProperties#setSocketTimeout(int)
3467:             */
3468:            public void setSocketTimeout(int property) {
3469:                this .socketTimeout.setValue(property);
3470:            }
3471:
3472:            /* (non-Javadoc)
3473:             * @see com.mysql.jdbc.IConnectionProperties#setStrictFloatingPoint(boolean)
3474:             */
3475:            public void setStrictFloatingPoint(boolean property) {
3476:                this .strictFloatingPoint.setValue(property);
3477:            }
3478:
3479:            /* (non-Javadoc)
3480:             * @see com.mysql.jdbc.IConnectionProperties#setStrictUpdates(boolean)
3481:             */
3482:            public void setStrictUpdates(boolean property) {
3483:                this .strictUpdates.setValue(property);
3484:            }
3485:
3486:            /* (non-Javadoc)
3487:             * @see com.mysql.jdbc.IConnectionProperties#setTinyInt1isBit(boolean)
3488:             */
3489:            public void setTinyInt1isBit(boolean flag) {
3490:                this .tinyInt1isBit.setValue(flag);
3491:            }
3492:
3493:            /* (non-Javadoc)
3494:             * @see com.mysql.jdbc.IConnectionProperties#setTraceProtocol(boolean)
3495:             */
3496:            public void setTraceProtocol(boolean flag) {
3497:                this .traceProtocol.setValue(flag);
3498:            }
3499:
3500:            /* (non-Javadoc)
3501:             * @see com.mysql.jdbc.IConnectionProperties#setTransformedBitIsBoolean(boolean)
3502:             */
3503:            public void setTransformedBitIsBoolean(boolean flag) {
3504:                this .transformedBitIsBoolean.setValue(flag);
3505:            }
3506:
3507:            /* (non-Javadoc)
3508:             * @see com.mysql.jdbc.IConnectionProperties#setUseCompression(boolean)
3509:             */
3510:            public void setUseCompression(boolean property) {
3511:                this .useCompression.setValue(property);
3512:            }
3513:
3514:            /* (non-Javadoc)
3515:             * @see com.mysql.jdbc.IConnectionProperties#setUseFastIntParsing(boolean)
3516:             */
3517:            public void setUseFastIntParsing(boolean flag) {
3518:                this .useFastIntParsing.setValue(flag);
3519:            }
3520:
3521:            /* (non-Javadoc)
3522:             * @see com.mysql.jdbc.IConnectionProperties#setUseHostsInPrivileges(boolean)
3523:             */
3524:            public void setUseHostsInPrivileges(boolean property) {
3525:                this .useHostsInPrivileges.setValue(property);
3526:            }
3527:
3528:            /* (non-Javadoc)
3529:             * @see com.mysql.jdbc.IConnectionProperties#setUseInformationSchema(boolean)
3530:             */
3531:            public void setUseInformationSchema(boolean flag) {
3532:                this .useInformationSchema.setValue(flag);
3533:            }
3534:
3535:            /* (non-Javadoc)
3536:             * @see com.mysql.jdbc.IConnectionProperties#setUseLocalSessionState(boolean)
3537:             */
3538:            public void setUseLocalSessionState(boolean flag) {
3539:                this .useLocalSessionState.setValue(flag);
3540:            }
3541:
3542:            /* (non-Javadoc)
3543:             * @see com.mysql.jdbc.IConnectionProperties#setUseOldUTF8Behavior(boolean)
3544:             */
3545:            public void setUseOldUTF8Behavior(boolean flag) {
3546:                this .useOldUTF8Behavior.setValue(flag);
3547:                this .useOldUTF8BehaviorAsBoolean = this .useOldUTF8Behavior
3548:                        .getValueAsBoolean();
3549:            }
3550:
3551:            /* (non-Javadoc)
3552:             * @see com.mysql.jdbc.IConnectionProperties#setUseOnlyServerErrorMessages(boolean)
3553:             */
3554:            public void setUseOnlyServerErrorMessages(boolean flag) {
3555:                this .useOnlyServerErrorMessages.setValue(flag);
3556:            }
3557:
3558:            /* (non-Javadoc)
3559:             * @see com.mysql.jdbc.IConnectionProperties#setUseReadAheadInput(boolean)
3560:             */
3561:            public void setUseReadAheadInput(boolean flag) {
3562:                this .useReadAheadInput.setValue(flag);
3563:            }
3564:
3565:            /* (non-Javadoc)
3566:             * @see com.mysql.jdbc.IConnectionProperties#setUseServerPreparedStmts(boolean)
3567:             */
3568:            public void setUseServerPreparedStmts(boolean flag) {
3569:                this .detectServerPreparedStmts.setValue(flag);
3570:            }
3571:
3572:            /* (non-Javadoc)
3573:             * @see com.mysql.jdbc.IConnectionProperties#setUseSqlStateCodes(boolean)
3574:             */
3575:            public void setUseSqlStateCodes(boolean flag) {
3576:                this .useSqlStateCodes.setValue(flag);
3577:            }
3578:
3579:            /* (non-Javadoc)
3580:             * @see com.mysql.jdbc.IConnectionProperties#setUseSSL(boolean)
3581:             */
3582:            public void setUseSSL(boolean property) {
3583:                this .useSSL.setValue(property);
3584:            }
3585:
3586:            /* (non-Javadoc)
3587:             * @see com.mysql.jdbc.IConnectionProperties#setUseStreamLengthsInPrepStmts(boolean)
3588:             */
3589:            public void setUseStreamLengthsInPrepStmts(boolean property) {
3590:                this .useStreamLengthsInPrepStmts.setValue(property);
3591:            }
3592:
3593:            /* (non-Javadoc)
3594:             * @see com.mysql.jdbc.IConnectionProperties#setUseTimezone(boolean)
3595:             */
3596:            public void setUseTimezone(boolean property) {
3597:                this .useTimezone.setValue(property);
3598:            }
3599:
3600:            /* (non-Javadoc)
3601:             * @see com.mysql.jdbc.IConnectionProperties#setUseUltraDevWorkAround(boolean)
3602:             */
3603:            public void setUseUltraDevWorkAround(boolean property) {
3604:                this .useUltraDevWorkAround.setValue(property);
3605:            }
3606:
3607:            /* (non-Javadoc)
3608:             * @see com.mysql.jdbc.IConnectionProperties#setUseUnbufferedInput(boolean)
3609:             */
3610:            public void setUseUnbufferedInput(boolean flag) {
3611:                this .useUnbufferedInput.setValue(flag);
3612:            }
3613:
3614:            /* (non-Javadoc)
3615:             * @see com.mysql.jdbc.IConnectionProperties#setUseUnicode(boolean)
3616:             */
3617:            public void setUseUnicode(boolean flag) {
3618:                this .useUnicode.setValue(flag);
3619:                this .useUnicodeAsBoolean = this .useUnicode.getValueAsBoolean();
3620:            }
3621:
3622:            /* (non-Javadoc)
3623:             * @see com.mysql.jdbc.IConnectionProperties#setUseUsageAdvisor(boolean)
3624:             */
3625:            public void setUseUsageAdvisor(boolean useUsageAdvisorFlag) {
3626:                this .useUsageAdvisor.setValue(useUsageAdvisorFlag);
3627:                this .useUsageAdvisorAsBoolean = this .useUsageAdvisor
3628:                        .getValueAsBoolean();
3629:            }
3630:
3631:            /* (non-Javadoc)
3632:             * @see com.mysql.jdbc.IConnectionProperties#setYearIsDateType(boolean)
3633:             */
3634:            public void setYearIsDateType(boolean flag) {
3635:                this .yearIsDateType.setValue(flag);
3636:            }
3637:
3638:            /* (non-Javadoc)
3639:             * @see com.mysql.jdbc.IConnectionProperties#setZeroDateTimeBehavior(java.lang.String)
3640:             */
3641:            public void setZeroDateTimeBehavior(String behavior) {
3642:                this .zeroDateTimeBehavior.setValue(behavior);
3643:            }
3644:
3645:            protected void storeToRef(Reference ref) throws SQLException {
3646:                int numPropertiesToSet = PROPERTY_LIST.size();
3647:
3648:                for (int i = 0; i < numPropertiesToSet; i++) {
3649:                    java.lang.reflect.Field propertyField = (java.lang.reflect.Field) PROPERTY_LIST
3650:                            .get(i);
3651:
3652:                    try {
3653:                        ConnectionProperty propToStore = (ConnectionProperty) propertyField
3654:                                .get(this );
3655:
3656:                        if (ref != null) {
3657:                            propToStore.storeTo(ref);
3658:                        }
3659:                    } catch (IllegalAccessException iae) {
3660:                        throw SQLError
3661:                                .createSQLException(Messages
3662:                                        .getString("ConnectionProperties.errorNotExpected")); //$NON-NLS-1$
3663:                    }
3664:                }
3665:            }
3666:
3667:            /* (non-Javadoc)
3668:             * @see com.mysql.jdbc.IConnectionProperties#useUnbufferedInput()
3669:             */
3670:            public boolean useUnbufferedInput() {
3671:                return this .useUnbufferedInput.getValueAsBoolean();
3672:            }
3673:
3674:            /* (non-Javadoc)
3675:             * @see com.mysql.jdbc.IConnectionProperties#getUseCursorFetch()
3676:             */
3677:            public boolean getUseCursorFetch() {
3678:                return this .useCursorFetch.getValueAsBoolean();
3679:            }
3680:
3681:            /* (non-Javadoc)
3682:             * @see com.mysql.jdbc.IConnectionProperties#setUseCursorFetch(boolean)
3683:             */
3684:            public void setUseCursorFetch(boolean flag) {
3685:                this .useCursorFetch.setValue(flag);
3686:            }
3687:
3688:            /* (non-Javadoc)
3689:             * @see com.mysql.jdbc.IConnectionProperties#getOverrideSupportsIntegrityEnhancementFacility()
3690:             */
3691:            public boolean getOverrideSupportsIntegrityEnhancementFacility() {
3692:                return this .overrideSupportsIntegrityEnhancementFacility
3693:                        .getValueAsBoolean();
3694:            }
3695:
3696:            /* (non-Javadoc)
3697:             * @see com.mysql.jdbc.IConnectionProperties#setOverrideSupportsIntegrityEnhancementFacility(boolean)
3698:             */
3699:            public void setOverrideSupportsIntegrityEnhancementFacility(
3700:                    boolean flag) {
3701:                this .overrideSupportsIntegrityEnhancementFacility
3702:                        .setValue(flag);
3703:            }
3704:
3705:            /* (non-Javadoc)
3706:             * @see com.mysql.jdbc.IConnectionProperties#getNoTimezoneConversionForTimeType()
3707:             */
3708:            public boolean getNoTimezoneConversionForTimeType() {
3709:                return this .noTimezoneConversionForTimeType.getValueAsBoolean();
3710:            }
3711:
3712:            /* (non-Javadoc)
3713:             * @see com.mysql.jdbc.IConnectionProperties#setNoTimezoneConversionForTimeType(boolean)
3714:             */
3715:            public void setNoTimezoneConversionForTimeType(boolean flag) {
3716:                this .noTimezoneConversionForTimeType.setValue(flag);
3717:            }
3718:
3719:            /* (non-Javadoc)
3720:             * @see com.mysql.jdbc.IConnectionProperties#getUseJDBCCompliantTimezoneShift()
3721:             */
3722:            public boolean getUseJDBCCompliantTimezoneShift() {
3723:                return this .useJDBCCompliantTimezoneShift.getValueAsBoolean();
3724:            }
3725:
3726:            /* (non-Javadoc)
3727:             * @see com.mysql.jdbc.IConnectionProperties#setUseJDBCCompliantTimezoneShift(boolean)
3728:             */
3729:            public void setUseJDBCCompliantTimezoneShift(boolean flag) {
3730:                this .useJDBCCompliantTimezoneShift.setValue(flag);
3731:            }
3732:
3733:            /* (non-Javadoc)
3734:             * @see com.mysql.jdbc.IConnectionProperties#getAutoClosePStmtStreams()
3735:             */
3736:            public boolean getAutoClosePStmtStreams() {
3737:                return this .autoClosePStmtStreams.getValueAsBoolean();
3738:            }
3739:
3740:            /* (non-Javadoc)
3741:             * @see com.mysql.jdbc.IConnectionProperties#setAutoClosePStmtStreams(boolean)
3742:             */
3743:            public void setAutoClosePStmtStreams(boolean flag) {
3744:                this .autoClosePStmtStreams.setValue(flag);
3745:            }
3746:
3747:            /* (non-Javadoc)
3748:             * @see com.mysql.jdbc.IConnectionProperties#getProcessEscapeCodesForPrepStmts()
3749:             */
3750:            public boolean getProcessEscapeCodesForPrepStmts() {
3751:                return this .processEscapeCodesForPrepStmts.getValueAsBoolean();
3752:            }
3753:
3754:            /* (non-Javadoc)
3755:             * @see com.mysql.jdbc.IConnectionProperties#setProcessEscapeCodesForPrepStmts(boolean)
3756:             */
3757:            public void setProcessEscapeCodesForPrepStmts(boolean flag) {
3758:                this .processEscapeCodesForPrepStmts.setValue(flag);
3759:            }
3760:
3761:            /* (non-Javadoc)
3762:             * @see com.mysql.jdbc.IConnectionProperties#getUseGmtMillisForDatetimes()
3763:             */
3764:            public boolean getUseGmtMillisForDatetimes() {
3765:                return this .useGmtMillisForDatetimes.getValueAsBoolean();
3766:            }
3767:
3768:            /* (non-Javadoc)
3769:             * @see com.mysql.jdbc.IConnectionProperties#setUseGmtMillisForDatetimes(boolean)
3770:             */
3771:            public void setUseGmtMillisForDatetimes(boolean flag) {
3772:                this .useGmtMillisForDatetimes.setValue(flag);
3773:            }
3774:
3775:            /* (non-Javadoc)
3776:             * @see com.mysql.jdbc.IConnectionProperties#getDumpMetadataOnColumnNotFound()
3777:             */
3778:            public boolean getDumpMetadataOnColumnNotFound() {
3779:                return this .dumpMetadataOnColumnNotFound.getValueAsBoolean();
3780:            }
3781:
3782:            /* (non-Javadoc)
3783:             * @see com.mysql.jdbc.IConnectionProperties#setDumpMetadataOnColumnNotFound(boolean)
3784:             */
3785:            public void setDumpMetadataOnColumnNotFound(boolean flag) {
3786:                this .dumpMetadataOnColumnNotFound.setValue(flag);
3787:            }
3788:
3789:            /* (non-Javadoc)
3790:             * @see com.mysql.jdbc.IConnectionProperties#getResourceId()
3791:             */
3792:            public String getResourceId() {
3793:                return this .resourceId.getValueAsString();
3794:            }
3795:
3796:            /* (non-Javadoc)
3797:             * @see com.mysql.jdbc.IConnectionProperties#setResourceId(java.lang.String)
3798:             */
3799:            public void setResourceId(String resourceId) {
3800:                this .resourceId.setValue(resourceId);
3801:            }
3802:
3803:            /* (non-Javadoc)
3804:             * @see com.mysql.jdbc.IConnectionProperties#getRewriteBatchedStatements()
3805:             */
3806:            public boolean getRewriteBatchedStatements() {
3807:                return this .rewriteBatchedStatements.getValueAsBoolean();
3808:            }
3809:
3810:            /* (non-Javadoc)
3811:             * @see com.mysql.jdbc.IConnectionProperties#setRewriteBatchedStatements(boolean)
3812:             */
3813:            public void setRewriteBatchedStatements(boolean flag) {
3814:                this .rewriteBatchedStatements.setValue(flag);
3815:            }
3816:
3817:            /* (non-Javadoc)
3818:             * @see com.mysql.jdbc.IConnectionProperties#getJdbcCompliantTruncationForReads()
3819:             */
3820:            public boolean getJdbcCompliantTruncationForReads() {
3821:                return this .jdbcCompliantTruncationForReads;
3822:            }
3823:
3824:            /* (non-Javadoc)
3825:             * @see com.mysql.jdbc.IConnectionProperties#setJdbcCompliantTruncationForReads(boolean)
3826:             */
3827:            public void setJdbcCompliantTruncationForReads(
3828:                    boolean jdbcCompliantTruncationForReads) {
3829:                this .jdbcCompliantTruncationForReads = jdbcCompliantTruncationForReads;
3830:            }
3831:
3832:            /* (non-Javadoc)
3833:             * @see com.mysql.jdbc.IConnectionProperties#getUseJvmCharsetConverters()
3834:             */
3835:            public boolean getUseJvmCharsetConverters() {
3836:                return this .useJvmCharsetConverters.getValueAsBoolean();
3837:            }
3838:
3839:            /* (non-Javadoc)
3840:             * @see com.mysql.jdbc.IConnectionProperties#setUseJvmCharsetConverters(boolean)
3841:             */
3842:            public void setUseJvmCharsetConverters(boolean flag) {
3843:                this .useJvmCharsetConverters.setValue(flag);
3844:            }
3845:
3846:            /* (non-Javadoc)
3847:             * @see com.mysql.jdbc.IConnectionProperties#getPinGlobalTxToPhysicalConnection()
3848:             */
3849:            public boolean getPinGlobalTxToPhysicalConnection() {
3850:                return this .pinGlobalTxToPhysicalConnection.getValueAsBoolean();
3851:            }
3852:
3853:            /* (non-Javadoc)
3854:             * @see com.mysql.jdbc.IConnectionProperties#setPinGlobalTxToPhysicalConnection(boolean)
3855:             */
3856:            public void setPinGlobalTxToPhysicalConnection(boolean flag) {
3857:                this .pinGlobalTxToPhysicalConnection.setValue(flag);
3858:            }
3859:
3860:            /*
3861:             * "Aliases" which match the property names to make using 
3862:             * from datasources easier.
3863:             */
3864:
3865:            /* (non-Javadoc)
3866:             * @see com.mysql.jdbc.IConnectionProperties#setGatherPerfMetrics(boolean)
3867:             */
3868:            public void setGatherPerfMetrics(boolean flag) {
3869:                setGatherPerformanceMetrics(flag);
3870:            }
3871:
3872:            /* (non-Javadoc)
3873:             * @see com.mysql.jdbc.IConnectionProperties#getGatherPerfMetrics()
3874:             */
3875:            public boolean getGatherPerfMetrics() {
3876:                return getGatherPerformanceMetrics();
3877:            }
3878:
3879:            /* (non-Javadoc)
3880:             * @see com.mysql.jdbc.IConnectionProperties#setUltraDevHack(boolean)
3881:             */
3882:            public void setUltraDevHack(boolean flag) {
3883:                setUseUltraDevWorkAround(flag);
3884:            }
3885:
3886:            /* (non-Javadoc)
3887:             * @see com.mysql.jdbc.IConnectionProperties#getUltraDevHack()
3888:             */
3889:            public boolean getUltraDevHack() {
3890:                return getUseUltraDevWorkAround();
3891:            }
3892:
3893:            /* (non-Javadoc)
3894:             * @see com.mysql.jdbc.IConnectionProperties#setInteractiveClient(boolean)
3895:             */
3896:            public void setInteractiveClient(boolean property) {
3897:                setIsInteractiveClient(property);
3898:            }
3899:
3900:            /* (non-Javadoc)
3901:             * @see com.mysql.jdbc.IConnectionProperties#setSocketFactory(java.lang.String)
3902:             */
3903:            public void setSocketFactory(String name) {
3904:                setSocketFactoryClassName(name);
3905:            }
3906:
3907:            /* (non-Javadoc)
3908:             * @see com.mysql.jdbc.IConnectionProperties#getSocketFactory()
3909:             */
3910:            public String getSocketFactory() {
3911:                return getSocketFactoryClassName();
3912:            }
3913:
3914:            /* (non-Javadoc)
3915:             * @see com.mysql.jdbc.IConnectionProperties#setUseServerPrepStmts(boolean)
3916:             */
3917:            public void setUseServerPrepStmts(boolean flag) {
3918:                setUseServerPreparedStmts(flag);
3919:            }
3920:
3921:            /* (non-Javadoc)
3922:             * @see com.mysql.jdbc.IConnectionProperties#getUseServerPrepStmts()
3923:             */
3924:            public boolean getUseServerPrepStmts() {
3925:                return getUseServerPreparedStmts();
3926:            }
3927:
3928:            /* (non-Javadoc)
3929:             * @see com.mysql.jdbc.IConnectionProperties#setCacheCallableStmts(boolean)
3930:             */
3931:            public void setCacheCallableStmts(boolean flag) {
3932:                setCacheCallableStatements(flag);
3933:            }
3934:
3935:            /* (non-Javadoc)
3936:             * @see com.mysql.jdbc.IConnectionProperties#getCacheCallableStmts()
3937:             */
3938:            public boolean getCacheCallableStmts() {
3939:                return getCacheCallableStatements();
3940:            }
3941:
3942:            /* (non-Javadoc)
3943:             * @see com.mysql.jdbc.IConnectionProperties#setCachePrepStmts(boolean)
3944:             */
3945:            public void setCachePrepStmts(boolean flag) {
3946:                setCachePreparedStatements(flag);
3947:            }
3948:
3949:            /* (non-Javadoc)
3950:             * @see com.mysql.jdbc.IConnectionProperties#getCachePrepStmts()
3951:             */
3952:            public boolean getCachePrepStmts() {
3953:                return getCachePreparedStatements();
3954:            }
3955:
3956:            /* (non-Javadoc)
3957:             * @see com.mysql.jdbc.IConnectionProperties#setCallableStmtCacheSize(int)
3958:             */
3959:            public void setCallableStmtCacheSize(int cacheSize) {
3960:                setCallableStatementCacheSize(cacheSize);
3961:            }
3962:
3963:            /* (non-Javadoc)
3964:             * @see com.mysql.jdbc.IConnectionProperties#getCallableStmtCacheSize()
3965:             */
3966:            public int getCallableStmtCacheSize() {
3967:                return getCallableStatementCacheSize();
3968:            }
3969:
3970:            /* (non-Javadoc)
3971:             * @see com.mysql.jdbc.IConnectionProperties#setPrepStmtCacheSize(int)
3972:             */
3973:            public void setPrepStmtCacheSize(int cacheSize) {
3974:                setPreparedStatementCacheSize(cacheSize);
3975:            }
3976:
3977:            /* (non-Javadoc)
3978:             * @see com.mysql.jdbc.IConnectionProperties#getPrepStmtCacheSize()
3979:             */
3980:            public int getPrepStmtCacheSize() {
3981:                return getPreparedStatementCacheSize();
3982:            }
3983:
3984:            /* (non-Javadoc)
3985:             * @see com.mysql.jdbc.IConnectionProperties#setPrepStmtCacheSqlLimit(int)
3986:             */
3987:            public void setPrepStmtCacheSqlLimit(int sqlLimit) {
3988:                setPreparedStatementCacheSqlLimit(sqlLimit);
3989:            }
3990:
3991:            /* (non-Javadoc)
3992:             * @see com.mysql.jdbc.IConnectionProperties#getPrepStmtCacheSqlLimit()
3993:             */
3994:            public int getPrepStmtCacheSqlLimit() {
3995:                return getPreparedStatementCacheSqlLimit();
3996:            }
3997:
3998:            /* (non-Javadoc)
3999:             * @see com.mysql.jdbc.IConnectionProperties#getNoAccessToProcedureBodies()
4000:             */
4001:            public boolean getNoAccessToProcedureBodies() {
4002:                return this .noAccessToProcedureBodies.getValueAsBoolean();
4003:            }
4004:
4005:            /* (non-Javadoc)
4006:             * @see com.mysql.jdbc.IConnectionProperties#setNoAccessToProcedureBodies(boolean)
4007:             */
4008:            public void setNoAccessToProcedureBodies(boolean flag) {
4009:                this .noAccessToProcedureBodies.setValue(flag);
4010:            }
4011:
4012:            /* (non-Javadoc)
4013:             * @see com.mysql.jdbc.IConnectionProperties#getUseOldAliasMetadataBehavior()
4014:             */
4015:            public boolean getUseOldAliasMetadataBehavior() {
4016:                return this .useOldAliasMetadataBehavior.getValueAsBoolean();
4017:            }
4018:
4019:            /* (non-Javadoc)
4020:             * @see com.mysql.jdbc.IConnectionProperties#setUseOldAliasMetadataBehavior(boolean)
4021:             */
4022:            public void setUseOldAliasMetadataBehavior(boolean flag) {
4023:                this .useOldAliasMetadataBehavior.setValue(flag);
4024:            }
4025:
4026:            /* (non-Javadoc)
4027:             * @see com.mysql.jdbc.IConnectionProperties#getClientCertificateKeyStorePassword()
4028:             */
4029:            public String getClientCertificateKeyStorePassword() {
4030:                return clientCertificateKeyStorePassword.getValueAsString();
4031:            }
4032:
4033:            /* (non-Javadoc)
4034:             * @see com.mysql.jdbc.IConnectionProperties#setClientCertificateKeyStorePassword(java.lang.String)
4035:             */
4036:            public void setClientCertificateKeyStorePassword(String value) {
4037:                this .clientCertificateKeyStorePassword.setValue(value);
4038:            }
4039:
4040:            /* (non-Javadoc)
4041:             * @see com.mysql.jdbc.IConnectionProperties#getClientCertificateKeyStoreType()
4042:             */
4043:            public String getClientCertificateKeyStoreType() {
4044:                return clientCertificateKeyStoreType.getValueAsString();
4045:            }
4046:
4047:            /* (non-Javadoc)
4048:             * @see com.mysql.jdbc.IConnectionProperties#setClientCertificateKeyStoreType(java.lang.String)
4049:             */
4050:            public void setClientCertificateKeyStoreType(String value) {
4051:                this .clientCertificateKeyStoreType.setValue(value);
4052:            }
4053:
4054:            /* (non-Javadoc)
4055:             * @see com.mysql.jdbc.IConnectionProperties#getClientCertificateKeyStoreUrl()
4056:             */
4057:            public String getClientCertificateKeyStoreUrl() {
4058:                return clientCertificateKeyStoreUrl.getValueAsString();
4059:            }
4060:
4061:            /* (non-Javadoc)
4062:             * @see com.mysql.jdbc.IConnectionProperties#setClientCertificateKeyStoreUrl(java.lang.String)
4063:             */
4064:            public void setClientCertificateKeyStoreUrl(String value) {
4065:                this .clientCertificateKeyStoreUrl.setValue(value);
4066:            }
4067:
4068:            /* (non-Javadoc)
4069:             * @see com.mysql.jdbc.IConnectionProperties#getTrustCertificateKeyStorePassword()
4070:             */
4071:            public String getTrustCertificateKeyStorePassword() {
4072:                return trustCertificateKeyStorePassword.getValueAsString();
4073:            }
4074:
4075:            /* (non-Javadoc)
4076:             * @see com.mysql.jdbc.IConnectionProperties#setTrustCertificateKeyStorePassword(java.lang.String)
4077:             */
4078:            public void setTrustCertificateKeyStorePassword(String value) {
4079:                this .trustCertificateKeyStorePassword.setValue(value);
4080:            }
4081:
4082:            /* (non-Javadoc)
4083:             * @see com.mysql.jdbc.IConnectionProperties#getTrustCertificateKeyStoreType()
4084:             */
4085:            public String getTrustCertificateKeyStoreType() {
4086:                return trustCertificateKeyStoreType.getValueAsString();
4087:            }
4088:
4089:            /* (non-Javadoc)
4090:             * @see com.mysql.jdbc.IConnectionProperties#setTrustCertificateKeyStoreType(java.lang.String)
4091:             */
4092:            public void setTrustCertificateKeyStoreType(String value) {
4093:                this .trustCertificateKeyStoreType.setValue(value);
4094:            }
4095:
4096:            /* (non-Javadoc)
4097:             * @see com.mysql.jdbc.IConnectionProperties#getTrustCertificateKeyStoreUrl()
4098:             */
4099:            public String getTrustCertificateKeyStoreUrl() {
4100:                return trustCertificateKeyStoreUrl.getValueAsString();
4101:            }
4102:
4103:            /* (non-Javadoc)
4104:             * @see com.mysql.jdbc.IConnectionProperties#setTrustCertificateKeyStoreUrl(java.lang.String)
4105:             */
4106:            public void setTrustCertificateKeyStoreUrl(String value) {
4107:                this .trustCertificateKeyStoreUrl.setValue(value);
4108:            }
4109:
4110:            /* (non-Javadoc)
4111:             * @see com.mysql.jdbc.IConnectionProperties#getUseSSPSCompatibleTimezoneShift()
4112:             */
4113:            public boolean getUseSSPSCompatibleTimezoneShift() {
4114:                return this .useSSPSCompatibleTimezoneShift.getValueAsBoolean();
4115:            }
4116:
4117:            /* (non-Javadoc)
4118:             * @see com.mysql.jdbc.IConnectionProperties#setUseSSPSCompatibleTimezoneShift(boolean)
4119:             */
4120:            public void setUseSSPSCompatibleTimezoneShift(boolean flag) {
4121:                this .useSSPSCompatibleTimezoneShift.setValue(flag);
4122:            }
4123:
4124:            /* (non-Javadoc)
4125:             * @see com.mysql.jdbc.IConnectionProperties#getTreatUtilDateAsTimestamp()
4126:             */
4127:            public boolean getTreatUtilDateAsTimestamp() {
4128:                return this .treatUtilDateAsTimestamp.getValueAsBoolean();
4129:            }
4130:
4131:            /* (non-Javadoc)
4132:             * @see com.mysql.jdbc.IConnectionProperties#setTreatUtilDateAsTimestamp(boolean)
4133:             */
4134:            public void setTreatUtilDateAsTimestamp(boolean flag) {
4135:                this .treatUtilDateAsTimestamp.setValue(flag);
4136:            }
4137:
4138:            /* (non-Javadoc)
4139:             * @see com.mysql.jdbc.IConnectionProperties#getUseFastDateParsing()
4140:             */
4141:            public boolean getUseFastDateParsing() {
4142:                return this .useFastDateParsing.getValueAsBoolean();
4143:            }
4144:
4145:            /* (non-Javadoc)
4146:             * @see com.mysql.jdbc.IConnectionProperties#setUseFastDateParsing(boolean)
4147:             */
4148:            public void setUseFastDateParsing(boolean flag) {
4149:                this .useFastDateParsing.setValue(flag);
4150:            }
4151:
4152:            /* (non-Javadoc)
4153:             * @see com.mysql.jdbc.IConnectionProperties#getLocalSocketAddress()
4154:             */
4155:            public String getLocalSocketAddress() {
4156:                return this .localSocketAddress.getValueAsString();
4157:            }
4158:
4159:            /* (non-Javadoc)
4160:             * @see com.mysql.jdbc.IConnectionProperties#setLocalSocketAddress(java.lang.String)
4161:             */
4162:            public void setLocalSocketAddress(String address) {
4163:                this .localSocketAddress.setValue(address);
4164:            }
4165:
4166:            /* (non-Javadoc)
4167:             * @see com.mysql.jdbc.IConnectionProperties#setUseConfigs(java.lang.String)
4168:             */
4169:            public void setUseConfigs(String configs) {
4170:                this .useConfigs.setValue(configs);
4171:            }
4172:
4173:            /* (non-Javadoc)
4174:             * @see com.mysql.jdbc.IConnectionProperties#getUseConfigs()
4175:             */
4176:            public String getUseConfigs() {
4177:                return this .useConfigs.getValueAsString();
4178:            }
4179:
4180:            /* (non-Javadoc)
4181:             * @see com.mysql.jdbc.IConnectionProperties#getGenerateSimpleParameterMetadata()
4182:             */
4183:            public boolean getGenerateSimpleParameterMetadata() {
4184:                return this .generateSimpleParameterMetadata.getValueAsBoolean();
4185:            }
4186:
4187:            /* (non-Javadoc)
4188:             * @see com.mysql.jdbc.IConnectionProperties#setGenerateSimpleParameterMetadata(boolean)
4189:             */
4190:            public void setGenerateSimpleParameterMetadata(boolean flag) {
4191:                this .generateSimpleParameterMetadata.setValue(flag);
4192:            }
4193:
4194:            /* (non-Javadoc)
4195:             * @see com.mysql.jdbc.IConnectionProperties#getLogXaCommands()
4196:             */
4197:            public boolean getLogXaCommands() {
4198:                return this .logXaCommands.getValueAsBoolean();
4199:            }
4200:
4201:            /* (non-Javadoc)
4202:             * @see com.mysql.jdbc.IConnectionProperties#setLogXaCommands(boolean)
4203:             */
4204:            public void setLogXaCommands(boolean flag) {
4205:                this .logXaCommands.setValue(flag);
4206:            }
4207:
4208:            /* (non-Javadoc)
4209:             * @see com.mysql.jdbc.IConnectionProperties#getResultSetSizeThreshold()
4210:             */
4211:            public int getResultSetSizeThreshold() {
4212:                return this .resultSetSizeThreshold.getValueAsInt();
4213:            }
4214:
4215:            /* (non-Javadoc)
4216:             * @see com.mysql.jdbc.IConnectionProperties#setResultSetSizeThreshold(int)
4217:             */
4218:            public void setResultSetSizeThreshold(int threshold) {
4219:                this .resultSetSizeThreshold.setValue(threshold);
4220:            }
4221:
4222:            /* (non-Javadoc)
4223:             * @see com.mysql.jdbc.IConnectionProperties#getNetTimeoutForStreamingResults()
4224:             */
4225:            public int getNetTimeoutForStreamingResults() {
4226:                return this .netTimeoutForStreamingResults.getValueAsInt();
4227:            }
4228:
4229:            /* (non-Javadoc)
4230:             * @see com.mysql.jdbc.IConnectionProperties#setNetTimeoutForStreamingResults(int)
4231:             */
4232:            public void setNetTimeoutForStreamingResults(int value) {
4233:                this .netTimeoutForStreamingResults.setValue(value);
4234:            }
4235:
4236:            /* (non-Javadoc)
4237:             * @see com.mysql.jdbc.IConnectionProperties#getEnableQueryTimeouts()
4238:             */
4239:            public boolean getEnableQueryTimeouts() {
4240:                return this .enableQueryTimeouts.getValueAsBoolean();
4241:            }
4242:
4243:            /* (non-Javadoc)
4244:             * @see com.mysql.jdbc.IConnectionProperties#setEnableQueryTimeouts(boolean)
4245:             */
4246:            public void setEnableQueryTimeouts(boolean flag) {
4247:                this .enableQueryTimeouts.setValue(flag);
4248:            }
4249:
4250:            /* (non-Javadoc)
4251:             * @see com.mysql.jdbc.IConnectionProperties#getPadCharsWithSpace()
4252:             */
4253:            public boolean getPadCharsWithSpace() {
4254:                return this .padCharsWithSpace.getValueAsBoolean();
4255:            }
4256:
4257:            /* (non-Javadoc)
4258:             * @see com.mysql.jdbc.IConnectionProperties#setPadCharsWithSpace(boolean)
4259:             */
4260:            public void setPadCharsWithSpace(boolean flag) {
4261:                this .padCharsWithSpace.setValue(flag);
4262:            }
4263:
4264:            /* (non-Javadoc)
4265:             * @see com.mysql.jdbc.IConnectionProperties#getUseDynamicCharsetInfo()
4266:             */
4267:            public boolean getUseDynamicCharsetInfo() {
4268:                return this .useDynamicCharsetInfo.getValueAsBoolean();
4269:            }
4270:
4271:            /* (non-Javadoc)
4272:             * @see com.mysql.jdbc.IConnectionProperties#setUseDynamicCharsetInfo(boolean)
4273:             */
4274:            public void setUseDynamicCharsetInfo(boolean flag) {
4275:                this .useDynamicCharsetInfo.setValue(flag);
4276:            }
4277:
4278:            /* (non-Javadoc)
4279:             * @see com.mysql.jdbc.IConnectionProperties#getClientInfoProvider()
4280:             */
4281:            public String getClientInfoProvider() {
4282:                return this .clientInfoProvider.getValueAsString();
4283:            }
4284:
4285:            /* (non-Javadoc)
4286:             * @see com.mysql.jdbc.IConnectionProperties#setClientInfoProvider(java.lang.String)
4287:             */
4288:            public void setClientInfoProvider(String classname) {
4289:                this .clientInfoProvider.setValue(classname);
4290:            }
4291:
4292:            public boolean getPopulateInsertRowWithDefaultValues() {
4293:                return this .populateInsertRowWithDefaultValues
4294:                        .getValueAsBoolean();
4295:            }
4296:
4297:            public void setPopulateInsertRowWithDefaultValues(boolean flag) {
4298:                this .populateInsertRowWithDefaultValues.setValue(flag);
4299:            }
4300:
4301:            public String getLoadBalanceStrategy() {
4302:                return this .loadBalanceStrategy.getValueAsString();
4303:            }
4304:
4305:            public void setLoadBalanceStrategy(String strategy) {
4306:                this .loadBalanceStrategy.setValue(strategy);
4307:            }
4308:
4309:            public boolean getTcpNoDelay() {
4310:                return this .tcpNoDelay.getValueAsBoolean();
4311:            }
4312:
4313:            public void setTcpNoDelay(boolean flag) {
4314:                this .tcpNoDelay.setValue(flag);
4315:            }
4316:
4317:            public boolean getTcpKeepAlive() {
4318:                return this .tcpKeepAlive.getValueAsBoolean();
4319:            }
4320:
4321:            public void setTcpKeepAlive(boolean flag) {
4322:                this .tcpKeepAlive.setValue(flag);
4323:            }
4324:
4325:            public int getTcpRcvBuf() {
4326:                return this .tcpRcvBuf.getValueAsInt();
4327:            }
4328:
4329:            public void setTcpRcvBuf(int bufSize) {
4330:                this .tcpRcvBuf.setValue(bufSize);
4331:            }
4332:
4333:            public int getTcpSndBuf() {
4334:                return this .tcpSndBuf.getValueAsInt();
4335:            }
4336:
4337:            public void setTcpSndBuf(int bufSize) {
4338:                this .tcpSndBuf.setValue(bufSize);
4339:            }
4340:
4341:            public int getTcpTrafficClass() {
4342:                return this .tcpTrafficClass.getValueAsInt();
4343:            }
4344:
4345:            public void setTcpTrafficClass(int classFlags) {
4346:                this .tcpTrafficClass.setValue(classFlags);
4347:            }
4348:
4349:            public boolean getUseNanosForElapsedTime() {
4350:                return this .useNanosForElapsedTime.getValueAsBoolean();
4351:            }
4352:
4353:            public void setUseNanosForElapsedTime(boolean flag) {
4354:                this .useNanosForElapsedTime.setValue(flag);
4355:            }
4356:
4357:            public long getSlowQueryThresholdNanos() {
4358:                return this .slowQueryThresholdNanos.getValueAsLong();
4359:            }
4360:
4361:            public void setSlowQueryThresholdNanos(long nanos) {
4362:                this .slowQueryThresholdNanos.setValue(nanos);
4363:            }
4364:
4365:            public String getStatementInterceptors() {
4366:                return this .statementInterceptors.getValueAsString();
4367:            }
4368:
4369:            public void setStatementInterceptors(String value) {
4370:                this .statementInterceptors.setValue(value);
4371:            }
4372:
4373:            public boolean getUseDirectRowUnpack() {
4374:                return this .useDirectRowUnpack.getValueAsBoolean();
4375:            }
4376:
4377:            public void setUseDirectRowUnpack(boolean flag) {
4378:                this .useDirectRowUnpack.setValue(flag);
4379:            }
4380:
4381:            public String getLargeRowSizeThreshold() {
4382:                return this .largeRowSizeThreshold.getValueAsString();
4383:            }
4384:
4385:            public void setLargeRowSizeThreshold(String value) {
4386:                try {
4387:                    this .largeRowSizeThreshold.setValue(value);
4388:                } catch (SQLException sqlEx) {
4389:                    RuntimeException ex = new RuntimeException(sqlEx
4390:                            .getMessage());
4391:                    ex.initCause(sqlEx);
4392:
4393:                    throw ex;
4394:                }
4395:            }
4396:
4397:            public boolean getUseBlobToStoreUTF8OutsideBMP() {
4398:                return this .useBlobToStoreUTF8OutsideBMP.getValueAsBoolean();
4399:            }
4400:
4401:            public void setUseBlobToStoreUTF8OutsideBMP(boolean flag) {
4402:                this .useBlobToStoreUTF8OutsideBMP.setValue(flag);
4403:            }
4404:
4405:            public String getUtf8OutsideBmpExcludedColumnNamePattern() {
4406:                return this .utf8OutsideBmpExcludedColumnNamePattern
4407:                        .getValueAsString();
4408:            }
4409:
4410:            public void setUtf8OutsideBmpExcludedColumnNamePattern(
4411:                    String regexPattern) {
4412:                this .utf8OutsideBmpExcludedColumnNamePattern
4413:                        .setValue(regexPattern);
4414:            }
4415:
4416:            public String getUtf8OutsideBmpIncludedColumnNamePattern() {
4417:                return this .utf8OutsideBmpIncludedColumnNamePattern
4418:                        .getValueAsString();
4419:            }
4420:
4421:            public void setUtf8OutsideBmpIncludedColumnNamePattern(
4422:                    String regexPattern) {
4423:                this .utf8OutsideBmpIncludedColumnNamePattern
4424:                        .setValue(regexPattern);
4425:            }
4426:
4427:            public boolean getIncludeInnodbStatusInDeadlockExceptions() {
4428:                return this .includeInnodbStatusInDeadlockExceptions
4429:                        .getValueAsBoolean();
4430:            }
4431:
4432:            public void setIncludeInnodbStatusInDeadlockExceptions(boolean flag) {
4433:                this .includeInnodbStatusInDeadlockExceptions.setValue(flag);
4434:            }
4435:
4436:            public boolean getBlobsAreStrings() {
4437:                return this .blobsAreStrings.getValueAsBoolean();
4438:            }
4439:
4440:            public void setBlobsAreStrings(boolean flag) {
4441:                this .blobsAreStrings.setValue(flag);
4442:            }
4443:
4444:            public boolean getFunctionsNeverReturnBlobs() {
4445:                return this .functionsNeverReturnBlobs.getValueAsBoolean();
4446:            }
4447:
4448:            public void setFunctionsNeverReturnBlobs(boolean flag) {
4449:                this.functionsNeverReturnBlobs.setValue(flag);
4450:            }
4451:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.