EMMA Coverage Report (generated Fri May 26 15:35:26 CDT 2006)
[all classes][com.mysql.jdbc]

COVERAGE SUMMARY FOR SOURCE FILE [ConnectionProperties.java]

nameclass, %method, %block, %line, %
ConnectionProperties.java100% (7/7)49%  (139/282)66%  (2629/3966)52%  (419.9/807)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ConnectionProperties$IntegerConnectionProperty100% (1/1)40%  (4/10)47%  (50/107)55%  (12/22)
ConnectionProperties$IntegerConnectionProperty (ConnectionProperties, String,... 0%   (0/1)0%   (0/12)0%   (0/2)
getLowerBound (): int 0%   (0/1)0%   (0/3)0%   (0/1)
getUpperBound (): int 0%   (0/1)0%   (0/3)0%   (0/1)
hasValueConstraints (): boolean 0%   (0/1)0%   (0/2)0%   (0/1)
isRangeBased (): boolean 0%   (0/1)0%   (0/9)0%   (0/1)
setValue (int): void 0%   (0/1)0%   (0/7)0%   (0/2)
initializeFrom (String): void 100% (1/1)50%  (21/42)75%  (6/8)
ConnectionProperties$IntegerConnectionProperty (ConnectionProperties, String,... 100% (1/1)100% (22/22)100% (4/4)
getAllowableValues (): String [] 100% (1/1)100% (2/2)100% (1/1)
getValueAsInt (): int 100% (1/1)100% (5/5)100% (1/1)
     
class ConnectionProperties$ConnectionProperty100% (1/1)59%  (10/17)54%  (142/264)58%  (41/71)
getCategoryName (): String 0%   (0/1)0%   (0/3)0%   (0/1)
getDefaultValue (): Object 0%   (0/1)0%   (0/3)0%   (0/1)
getLowerBound (): int 0%   (0/1)0%   (0/3)0%   (0/1)
getOrder (): int 0%   (0/1)0%   (0/3)0%   (0/1)
getUpperBound (): int 0%   (0/1)0%   (0/3)0%   (0/1)
setCategoryName (String): void 0%   (0/1)0%   (0/4)0%   (0/2)
setOrder (int): void 0%   (0/1)0%   (0/4)0%   (0/2)
validateStringValues (String): void 100% (1/1)23%  (30/129)25%  (7/28)
ConnectionProperties$ConnectionProperty (ConnectionProperties, String, Object... 100% (1/1)100% (41/41)100% (14/14)
getAllowableValues (): String [] 100% (1/1)100% (3/3)100% (1/1)
getPropertyName (): String 100% (1/1)100% (3/3)100% (1/1)
getValueAsObject (): Object 100% (1/1)100% (3/3)100% (1/1)
initializeFrom (Properties): void 100% (1/1)100% (14/14)100% (4/4)
initializeFrom (Reference): void 100% (1/1)100% (15/15)100% (5/5)
setValueAsObject (Object): void 100% (1/1)100% (4/4)100% (2/2)
storeTo (Reference): void 100% (1/1)100% (14/14)100% (3/3)
syncDriverPropertyInfo (): void 100% (1/1)100% (15/15)100% (3/3)
     
class ConnectionProperties100% (1/1)47%  (111/237)67%  (2219/3322)50%  (330.9/665)
exposeAsXml (): String 0%   (0/1)0%   (0/350)0%   (0/67)
getCacheCallableStmts (): boolean 0%   (0/1)0%   (0/3)0%   (0/1)
getCachePrepStmts (): boolean 0%   (0/1)0%   (0/3)0%   (0/1)
getCallableStmtCacheSize (): int 0%   (0/1)0%   (0/3)0%   (0/1)
getConnectTimeout (): int 0%   (0/1)0%   (0/4)0%   (0/1)
getIgnoreNonTxTables (): boolean 0%   (0/1)0%   (0/4)0%   (0/1)
getIsInteractiveClient (): boolean 0%   (0/1)0%   (0/4)0%   (0/1)
getLoggerClassName (): String 0%   (0/1)0%   (0/4)0%   (0/1)
getMetadataCacheSize (): int 0%   (0/1)0%   (0/4)0%   (0/1)
getPacketDebugBufferSize (): int 0%   (0/1)0%   (0/4)0%   (0/1)
getPrepStmtCacheSize (): int 0%   (0/1)0%   (0/3)0%   (0/1)
getPrepStmtCacheSqlLimit (): int 0%   (0/1)0%   (0/3)0%   (0/1)
getPreparedStatementCacheSqlLimit (): int 0%   (0/1)0%   (0/6)0%   (0/1)
getProfileSQL (): boolean 0%   (0/1)0%   (0/4)0%   (0/1)
getPropertiesTransform (): String 0%   (0/1)0%   (0/4)0%   (0/1)
getRelaxAutoCommit (): boolean 0%   (0/1)0%   (0/4)0%   (0/1)
getRequireSSL (): boolean 0%   (0/1)0%   (0/4)0%   (0/1)
getRunningCTS13 (): boolean 0%   (0/1)0%   (0/4)0%   (0/1)
getUseServerPrepStmts (): boolean 0%   (0/1)0%   (0/3)0%   (0/1)
getUseUnbufferedInput (): boolean 0%   (0/1)0%   (0/4)0%   (0/1)
setAllowLoadLocalInfile (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setAllowMultiQueries (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setAllowNanAndInf (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setAllowUrlInLocalInfile (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setAlwaysSendSetIsolation (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setAutoClosePStmtStreams (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setAutoDeserialize (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setAutoGenerateTestcaseScript (boolean): void 0%   (0/1)0%   (0/10)0%   (0/3)
setAutoReconnect (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setAutoReconnectForConnectionPools (boolean): void 0%   (0/1)0%   (0/10)0%   (0/3)
setAutoReconnectForPools (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setCacheCallableStatements (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setCacheCallableStmts (boolean): void 0%   (0/1)0%   (0/4)0%   (0/2)
setCachePrepStmts (boolean): void 0%   (0/1)0%   (0/4)0%   (0/2)
setCachePreparedStatements (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setCacheResultSetMetadata (boolean): void 0%   (0/1)0%   (0/10)0%   (0/3)
setCacheServerConfiguration (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setCallableStatementCacheSize (int): void 0%   (0/1)0%   (0/5)0%   (0/2)
setCallableStmtCacheSize (int): void 0%   (0/1)0%   (0/4)0%   (0/2)
setCapitalizeDBMDTypes (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setCapitalizeTypeNames (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setCharacterSetResults (String): void 0%   (0/1)0%   (0/5)0%   (0/2)
setClobberStreamingResults (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setConnectTimeout (int): void 0%   (0/1)0%   (0/5)0%   (0/2)
setConnectionCollation (String): void 0%   (0/1)0%   (0/5)0%   (0/2)
setContinueBatchOnError (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setCreateDatabaseIfNotExist (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setDetectServerPreparedStmts (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setDontTrackOpenResources (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setDumpMetadataOnColumnNotFound (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setDumpQueriesOnException (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setDynamicCalendars (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setElideSetAutoCommits (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setEmptyStringsConvertToZero (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setEmulateLocators (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setEmulateUnsupportedPstmts (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setEnablePacketDebug (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setExplainSlowQueries (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setFailOverReadOnly (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setGatherPerformanceMetrics (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setHighAvailability (boolean): void 0%   (0/1)0%   (0/10)0%   (0/3)
setHoldResultsOpenOverStatementClose (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setIgnoreNonTxTables (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setInitialTimeout (int): void 0%   (0/1)0%   (0/5)0%   (0/2)
setIsInteractiveClient (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setLogSlowQueries (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setLoggerClassName (String): void 0%   (0/1)0%   (0/5)0%   (0/2)
setMaintainTimeStats (boolean): void 0%   (0/1)0%   (0/10)0%   (0/3)
setMaxQuerySizeToLog (int): void 0%   (0/1)0%   (0/5)0%   (0/2)
setMaxReconnects (int): void 0%   (0/1)0%   (0/5)0%   (0/2)
setMaxRows (int): void 0%   (0/1)0%   (0/10)0%   (0/3)
setMetadataCacheSize (int): void 0%   (0/1)0%   (0/5)0%   (0/2)
setNoDatetimeStringSync (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setNullCatalogMeansCurrent (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setNullNamePatternMatchesAll (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setOverrideSupportsIntegrityEnhancementFacility (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setPacketDebugBufferSize (int): void 0%   (0/1)0%   (0/5)0%   (0/2)
setParanoid (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setPedantic (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setPrepStmtCacheSize (int): void 0%   (0/1)0%   (0/4)0%   (0/2)
setPrepStmtCacheSqlLimit (int): void 0%   (0/1)0%   (0/4)0%   (0/2)
setPreparedStatementCacheSize (int): void 0%   (0/1)0%   (0/5)0%   (0/2)
setPreparedStatementCacheSqlLimit (int): void 0%   (0/1)0%   (0/5)0%   (0/2)
setProcessEscapeCodesForPrepStmts (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setProfileSQL (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setPropertiesTransform (String): void 0%   (0/1)0%   (0/5)0%   (0/2)
setQueriesBeforeRetryMaster (int): void 0%   (0/1)0%   (0/5)0%   (0/2)
setReconnectAtTxEnd (boolean): void 0%   (0/1)0%   (0/10)0%   (0/3)
setRelaxAutoCommit (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setReportMetricsIntervalMillis (int): void 0%   (0/1)0%   (0/5)0%   (0/2)
setRequireSSL (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setRetainStatementAfterResultSetClose (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setRewriteBatchedStatements (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setRollbackOnPooledClose (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setRoundRobinLoadBalance (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setRunningCTS13 (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setSecondsBeforeRetryMaster (int): void 0%   (0/1)0%   (0/5)0%   (0/2)
setServerTimezone (String): void 0%   (0/1)0%   (0/5)0%   (0/2)
setSessionVariables (String): void 0%   (0/1)0%   (0/5)0%   (0/2)
setSlowQueryThresholdMillis (int): void 0%   (0/1)0%   (0/5)0%   (0/2)
setSocketFactoryClassName (String): void 0%   (0/1)0%   (0/5)0%   (0/2)
setSocketTimeout (int): void 0%   (0/1)0%   (0/5)0%   (0/2)
setStrictFloatingPoint (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setStrictUpdates (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setTinyInt1isBit (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setUseCompression (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setUseFastIntParsing (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setUseGmtMillisForDatetimes (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setUseHostsInPrivileges (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setUseLocalSessionState (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setUseNewIo (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setUseOldUTF8Behavior (boolean): void 0%   (0/1)0%   (0/10)0%   (0/3)
setUseOnlyServerErrorMessages (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setUseReadAheadInput (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setUseSSL (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setUseServerPrepStmts (boolean): void 0%   (0/1)0%   (0/4)0%   (0/2)
setUseServerPreparedStmts (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setUseSqlStateCodes (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setUseStreamLengthsInPrepStmts (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setUseTimezone (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setUseUltraDevWorkAround (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setUseUnbufferedInput (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setUseUsageAdvisor (boolean): void 0%   (0/1)0%   (0/10)0%   (0/3)
setYearIsDateType (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
setZeroDateTimeBehavior (String): void 0%   (0/1)0%   (0/5)0%   (0/2)
useUnbufferedInput (): boolean 0%   (0/1)0%   (0/4)0%   (0/1)
postInitialization (): void 100% (1/1)69%  (119/172)67%  (29/43)
initializeProperties (Properties): void 100% (1/1)76%  (63/83)86%  (18/21)
exposeAsProperties (Properties): Properties 100% (1/1)77%  (37/48)77%  (10/13)
initializeFromRef (Reference): void 100% (1/1)81%  (29/36)82%  (9/11)
storeToRef (Reference): void 100% (1/1)82%  (27/33)80%  (8/10)
exposeAsDriverPropertyInfoInternal (Properties, int): DriverPropertyInfo [] 100% (1/1)87%  (46/53)87%  (13/15)
<static initializer> 100% (1/1)90%  (83/92)81%  (8.9/11)
ConnectionProperties (): void 100% (1/1)100% (1382/1382)100% (118/118)
exposeAsDriverPropertyInfo (Properties, int): DriverPropertyInfo [] 100% (1/1)100% (7/7)100% (1/1)
getAllowLoadLocalInfile (): boolean 100% (1/1)100% (4/4)100% (1/1)
getAllowMultiQueries (): boolean 100% (1/1)100% (4/4)100% (1/1)
getAllowNanAndInf (): boolean 100% (1/1)100% (4/4)100% (1/1)
getAllowUrlInLocalInfile (): boolean 100% (1/1)100% (4/4)100% (1/1)
getAlwaysSendSetIsolation (): boolean 100% (1/1)100% (4/4)100% (1/1)
getAutoClosePStmtStreams (): boolean 100% (1/1)100% (4/4)100% (1/1)
getAutoDeserialize (): boolean 100% (1/1)100% (4/4)100% (1/1)
getAutoGenerateTestcaseScript (): boolean 100% (1/1)100% (3/3)100% (1/1)
getAutoReconnectForPools (): boolean 100% (1/1)100% (3/3)100% (1/1)
getBlobSendChunkSize (): int 100% (1/1)100% (4/4)100% (1/1)
getCacheCallableStatements (): boolean 100% (1/1)100% (4/4)100% (1/1)
getCachePreparedStatements (): boolean 100% (1/1)100% (6/6)100% (1/1)
getCacheResultSetMetadata (): boolean 100% (1/1)100% (3/3)100% (1/1)
getCacheServerConfiguration (): boolean 100% (1/1)100% (4/4)100% (1/1)
getCallableStatementCacheSize (): int 100% (1/1)100% (4/4)100% (1/1)
getCapitalizeTypeNames (): boolean 100% (1/1)100% (4/4)100% (1/1)
getCharacterSetResults (): String 100% (1/1)100% (4/4)100% (1/1)
getClobberStreamingResults (): boolean 100% (1/1)100% (4/4)100% (1/1)
getConnectionCollation (): String 100% (1/1)100% (4/4)100% (1/1)
getContinueBatchOnError (): boolean 100% (1/1)100% (4/4)100% (1/1)
getCreateDatabaseIfNotExist (): boolean 100% (1/1)100% (4/4)100% (1/1)
getDontTrackOpenResources (): boolean 100% (1/1)100% (4/4)100% (1/1)
getDumpMetadataOnColumnNotFound (): boolean 100% (1/1)100% (4/4)100% (1/1)
getDumpQueriesOnException (): boolean 100% (1/1)100% (4/4)100% (1/1)
getDynamicCalendars (): boolean 100% (1/1)100% (4/4)100% (1/1)
getElideSetAutoCommits (): boolean 100% (1/1)100% (4/4)100% (1/1)
getEmptyStringsConvertToZero (): boolean 100% (1/1)100% (4/4)100% (1/1)
getEmulateLocators (): boolean 100% (1/1)100% (4/4)100% (1/1)
getEmulateUnsupportedPstmts (): boolean 100% (1/1)100% (4/4)100% (1/1)
getEnablePacketDebug (): boolean 100% (1/1)100% (4/4)100% (1/1)
getEncoding (): String 100% (1/1)100% (3/3)100% (1/1)
getExplainSlowQueries (): boolean 100% (1/1)100% (4/4)100% (1/1)
getFailOverReadOnly (): boolean 100% (1/1)100% (4/4)100% (1/1)
getGatherPerformanceMetrics (): boolean 100% (1/1)100% (4/4)100% (1/1)
getHighAvailability (): boolean 100% (1/1)100% (3/3)100% (1/1)
getHoldResultsOpenOverStatementClose (): boolean 100% (1/1)100% (4/4)100% (1/1)
getInitialTimeout (): int 100% (1/1)100% (4/4)100% (1/1)
getInteractiveClient (): boolean 100% (1/1)100% (4/4)100% (1/1)
getJdbcCompliantTruncation (): boolean 100% (1/1)100% (4/4)100% (1/1)
getJdbcCompliantTruncationForReads (): boolean 100% (1/1)100% (3/3)100% (1/1)
getLogSlowQueries (): boolean 100% (1/1)100% (4/4)100% (1/1)
getLogger (): String 100% (1/1)100% (4/4)100% (1/1)
getMaintainTimeStats (): boolean 100% (1/1)100% (3/3)100% (1/1)
getMaxQuerySizeToLog (): int 100% (1/1)100% (4/4)100% (1/1)
getMaxReconnects (): int 100% (1/1)100% (4/4)100% (1/1)
getMaxRows (): int 100% (1/1)100% (3/3)100% (1/1)
getNoDatetimeStringSync (): boolean 100% (1/1)100% (4/4)100% (1/1)
getNullCatalogMeansCurrent (): boolean 100% (1/1)100% (4/4)100% (1/1)
getNullNamePatternMatchesAll (): boolean 100% (1/1)100% (4/4)100% (1/1)
getOverrideSupportsIntegrityEnhancementFacility (): boolean 100% (1/1)100% (4/4)100% (1/1)
getParanoid (): boolean 100% (1/1)100% (4/4)100% (1/1)
getPedantic (): boolean 100% (1/1)100% (4/4)100% (1/1)
getPreparedStatementCacheSize (): int 100% (1/1)100% (6/6)100% (1/1)
getProcessEscapeCodesForPrepStmts (): boolean 100% (1/1)100% (4/4)100% (1/1)
getProfileSql (): boolean 100% (1/1)100% (3/3)100% (1/1)
getQueriesBeforeRetryMaster (): int 100% (1/1)100% (4/4)100% (1/1)
getReconnectAtTxEnd (): boolean 100% (1/1)100% (3/3)100% (1/1)
getReportMetricsIntervalMillis (): int 100% (1/1)100% (4/4)100% (1/1)
getRetainStatementAfterResultSetClose (): boolean 100% (1/1)100% (4/4)100% (1/1)
getRewriteBatchedStatements (): boolean 100% (1/1)100% (4/4)100% (1/1)
getRollbackOnPooledClose (): boolean 100% (1/1)100% (4/4)100% (1/1)
getRoundRobinLoadBalance (): boolean 100% (1/1)100% (4/4)100% (1/1)
getSecondsBeforeRetryMaster (): int 100% (1/1)100% (4/4)100% (1/1)
getServerTimezone (): String 100% (1/1)100% (4/4)100% (1/1)
getSessionVariables (): String 100% (1/1)100% (4/4)100% (1/1)
getSlowQueryThresholdMillis (): int 100% (1/1)100% (4/4)100% (1/1)
getSocketFactoryClassName (): String 100% (1/1)100% (4/4)100% (1/1)
getSocketTimeout (): int 100% (1/1)100% (4/4)100% (1/1)
getStrictFloatingPoint (): boolean 100% (1/1)100% (4/4)100% (1/1)
getStrictUpdates (): boolean 100% (1/1)100% (4/4)100% (1/1)
getTinyInt1isBit (): boolean 100% (1/1)100% (4/4)100% (1/1)
getTraceProtocol (): boolean 100% (1/1)100% (4/4)100% (1/1)
getTransformedBitIsBoolean (): boolean 100% (1/1)100% (4/4)100% (1/1)
getUseCompression (): boolean 100% (1/1)100% (4/4)100% (1/1)
getUseFastIntParsing (): boolean 100% (1/1)100% (4/4)100% (1/1)
getUseGmtMillisForDatetimes (): boolean 100% (1/1)100% (4/4)100% (1/1)
getUseHostsInPrivileges (): boolean 100% (1/1)100% (4/4)100% (1/1)
getUseLocalSessionState (): boolean 100% (1/1)100% (4/4)100% (1/1)
getUseNewIo (): boolean 100% (1/1)100% (4/4)100% (1/1)
getUseOldUTF8Behavior (): boolean 100% (1/1)100% (3/3)100% (1/1)
getUseOnlyServerErrorMessages (): boolean 100% (1/1)100% (4/4)100% (1/1)
getUseReadAheadInput (): boolean 100% (1/1)100% (4/4)100% (1/1)
getUseSSL (): boolean 100% (1/1)100% (4/4)100% (1/1)
getUseServerPreparedStmts (): boolean 100% (1/1)100% (4/4)100% (1/1)
getUseSqlStateCodes (): boolean 100% (1/1)100% (4/4)100% (1/1)
getUseStreamLengthsInPrepStmts (): boolean 100% (1/1)100% (4/4)100% (1/1)
getUseTimezone (): boolean 100% (1/1)100% (4/4)100% (1/1)
getUseUltraDevWorkAround (): boolean 100% (1/1)100% (4/4)100% (1/1)
getUseUnicode (): boolean 100% (1/1)100% (3/3)100% (1/1)
getUseUsageAdvisor (): boolean 100% (1/1)100% (3/3)100% (1/1)
getYearIsDateType (): boolean 100% (1/1)100% (4/4)100% (1/1)
getZeroDateTimeBehavior (): String 100% (1/1)100% (4/4)100% (1/1)
setBlobSendChunkSize (String): void 100% (1/1)100% (5/5)100% (2/2)
setCharacterEncoding (String): void 100% (1/1)100% (5/5)100% (2/2)
setEncoding (String): void 100% (1/1)100% (10/10)100% (3/3)
setJdbcCompliantTruncation (boolean): void 100% (1/1)100% (8/8)100% (3/3)
setJdbcCompliantTruncationForReads (boolean): void 100% (1/1)100% (4/4)100% (2/2)
setLogger (String): void 100% (1/1)100% (5/5)100% (2/2)
setProfileSql (boolean): void 100% (1/1)100% (10/10)100% (3/3)
setTraceProtocol (boolean): void 100% (1/1)100% (5/5)100% (2/2)
setTransformedBitIsBoolean (boolean): void 100% (1/1)100% (5/5)100% (2/2)
setUseUnicode (boolean): void 100% (1/1)100% (10/10)100% (3/3)
     
class ConnectionProperties$MemorySizeConnectionProperty100% (1/1)100% (3/3)70%  (89/127)55%  (11/20)
initializeFrom (String): void 100% (1/1)65%  (70/108)40%  (6/15)
ConnectionProperties$MemorySizeConnectionProperty (ConnectionProperties, Stri... 100% (1/1)100% (15/15)100% (3/3)
setValue (String): void 100% (1/1)100% (4/4)100% (2/2)
     
class ConnectionProperties$StringConnectionProperty100% (1/1)71%  (5/7)79%  (49/62)87%  (13/15)
hasValueConstraints (): boolean 0%   (0/1)0%   (0/11)0%   (0/1)
isRangeBased (): boolean 0%   (0/1)0%   (0/2)0%   (0/1)
ConnectionProperties$StringConnectionProperty (ConnectionProperties, String, ... 100% (1/1)100% (16/16)100% (3/3)
ConnectionProperties$StringConnectionProperty (ConnectionProperties, String, ... 100% (1/1)100% (11/11)100% (2/2)
getValueAsString (): String 100% (1/1)100% (4/4)100% (1/1)
initializeFrom (String): void 100% (1/1)100% (14/14)100% (5/5)
setValue (String): void 100% (1/1)100% (4/4)100% (2/2)
     
class ConnectionProperties$BooleanConnectionProperty100% (1/1)71%  (5/7)95%  (77/81)86%  (12/14)
hasValueConstraints (): boolean 0%   (0/1)0%   (0/2)0%   (0/1)
isRangeBased (): boolean 0%   (0/1)0%   (0/2)0%   (0/1)
ConnectionProperties$BooleanConnectionProperty (ConnectionProperties, String,... 100% (1/1)100% (19/19)100% (3/3)
getAllowableValues (): String [] 100% (1/1)100% (19/19)100% (1/1)
getValueAsBoolean (): boolean 100% (1/1)100% (5/5)100% (1/1)
initializeFrom (String): void 100% (1/1)100% (27/27)100% (5/5)
setValue (boolean): void 100% (1/1)100% (7/7)100% (2/2)
     
class ConnectionProperties$1100% (1/1)100% (1/1)100% (3/3)100% (1/1)
ConnectionProperties$1 (): void 100% (1/1)100% (3/3)100% (1/1)

1/*
2 Copyright (C) 2002-2004 MySQL AB
3 
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of version 2 of the GNU General Public License as 
6 published by the Free Software Foundation.
7 
8 There are special exceptions to the terms and conditions of the GPL 
9 as it is applied to this software. View the full text of the 
10 exception in file EXCEPTIONS-CONNECTOR-J in the directory of this 
11 software distribution.
12 
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17 
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21 
22 
23 
24 */
25package com.mysql.jdbc;
26 
27import com.mysql.jdbc.log.Jdk14Logger;
28import com.mysql.jdbc.log.Log;
29import com.mysql.jdbc.log.StandardLogger;
30 
31import java.io.UnsupportedEncodingException;
32 
33import java.sql.DriverPropertyInfo;
34import java.sql.SQLException;
35 
36import java.util.ArrayList;
37import java.util.HashMap;
38import java.util.Iterator;
39import java.util.Map;
40import java.util.Properties;
41import java.util.TreeMap;
42 
43import javax.naming.RefAddr;
44import javax.naming.Reference;
45import javax.naming.StringRefAddr;
46 
47/**
48 * Represents configurable properties for Connections and DataSources. Can also
49 * expose properties as JDBC DriverPropertyInfo if required as well.
50 * 
51 * @author Mark Matthews
52 * @version $Id: ConnectionProperties.java,v 1.1.2.2 2005/05/17 14:58:56
53 *          mmatthews Exp $
54 */
55public class ConnectionProperties {
56        class BooleanConnectionProperty extends ConnectionProperty {
57                /**
58                 * DOCUMENT ME!
59                 * 
60                 * @param propertyNameToSet
61                 * @param defaultValueToSet
62                 * @param descriptionToSet
63                 *            DOCUMENT ME!
64                 * @param sinceVersionToSet
65                 *            DOCUMENT ME!
66                 */
67                BooleanConnectionProperty(String propertyNameToSet,
68                                boolean defaultValueToSet, String descriptionToSet,
69                                String sinceVersionToSet, String category, int orderInCategory) {
70                        super(propertyNameToSet, new Boolean(defaultValueToSet), null, 0,
71                                        0, descriptionToSet, sinceVersionToSet, category,
72                                        orderInCategory);
73                }
74 
75                /**
76                 * @see com.mysql.jdbc.ConnectionProperties.ConnectionProperty#getAllowableValues()
77                 */
78                String[] getAllowableValues() {
79                        return new String[] { "true", "false", "yes", "no" };
80                }
81 
82                boolean getValueAsBoolean() {
83                        return ((Boolean) this.valueAsObject).booleanValue();
84                }
85 
86                /**
87                 * @see com.mysql.jdbc.ConnectionProperties.ConnectionProperty#hasValueConstraints()
88                 */
89                boolean hasValueConstraints() {
90                        return true;
91                }
92 
93                /**
94                 * @see com.mysql.jdbc.ConnectionProperties.ConnectionProperty#initializeFrom(java.util.Properties)
95                 */
96                void initializeFrom(String extractedValue) throws SQLException {
97                        if (extractedValue != null) {
98                                validateStringValues(extractedValue);
99 
100                                this.valueAsObject = new Boolean(extractedValue
101                                                .equalsIgnoreCase("TRUE")
102                                                || extractedValue.equalsIgnoreCase("YES"));
103                        } else {
104                                this.valueAsObject = this.defaultValue;
105                        }
106                }
107 
108                /**
109                 * @see com.mysql.jdbc.ConnectionProperties.ConnectionProperty#isRangeBased()
110                 */
111                boolean isRangeBased() {
112                        return false;
113                }
114 
115                void setValue(boolean valueFlag) {
116                        this.valueAsObject = new Boolean(valueFlag);
117                }
118        }
119 
120        abstract class ConnectionProperty extends DriverPropertyInfo {
121                String[] allowableValues;
122 
123                String categoryName;
124 
125                Object defaultValue;
126 
127                int lowerBound;
128 
129                int order;
130 
131                String propertyName;
132 
133                String sinceVersion;
134 
135                int upperBound;
136 
137                Object valueAsObject;
138 
139                ConnectionProperty(String propertyNameToSet, Object defaultValueToSet,
140                                String[] allowableValuesToSet, int lowerBoundToSet,
141                                int upperBoundToSet, String descriptionToSet,
142                                String sinceVersionToSet, String category, int orderInCategory) {
143                        super(propertyNameToSet, null);
144 
145                        this.description = descriptionToSet;
146                        this.propertyName = propertyNameToSet;
147                        this.defaultValue = defaultValueToSet;
148                        this.valueAsObject = defaultValueToSet;
149                        this.allowableValues = allowableValuesToSet;
150                        this.lowerBound = lowerBoundToSet;
151                        this.upperBound = upperBoundToSet;
152                        this.required = false;
153                        this.sinceVersion = sinceVersionToSet;
154                        this.categoryName = category;
155                        this.order = orderInCategory;
156                }
157 
158                String[] getAllowableValues() {
159                        return this.allowableValues;
160                }
161 
162                /**
163                 * @return Returns the categoryName.
164                 */
165                String getCategoryName() {
166                        return this.categoryName;
167                }
168 
169                Object getDefaultValue() {
170                        return this.defaultValue;
171                }
172 
173                int getLowerBound() {
174                        return this.lowerBound;
175                }
176 
177                /**
178                 * @return Returns the order.
179                 */
180                int getOrder() {
181                        return this.order;
182                }
183 
184                String getPropertyName() {
185                        return this.propertyName;
186                }
187 
188                int getUpperBound() {
189                        return this.upperBound;
190                }
191 
192                Object getValueAsObject() {
193                        return this.valueAsObject;
194                }
195 
196                abstract boolean hasValueConstraints();
197 
198                void initializeFrom(Properties extractFrom) throws SQLException {
199                        String extractedValue = extractFrom.getProperty(getPropertyName());
200                        extractFrom.remove(getPropertyName());
201                        initializeFrom(extractedValue);
202                }
203 
204                void initializeFrom(Reference ref) throws SQLException {
205                        RefAddr refAddr = ref.get(getPropertyName());
206 
207                        if (refAddr != null) {
208                                String refContentAsString = (String) refAddr.getContent();
209 
210                                initializeFrom(refContentAsString);
211                        }
212                }
213 
214                abstract void initializeFrom(String extractedValue) throws SQLException;
215 
216                abstract boolean isRangeBased();
217 
218                /**
219                 * @param categoryName
220                 *            The categoryName to set.
221                 */
222                void setCategoryName(String categoryName) {
223                        this.categoryName = categoryName;
224                }
225 
226                /**
227                 * @param order
228                 *            The order to set.
229                 */
230                void setOrder(int order) {
231                        this.order = order;
232                }
233 
234                void setValueAsObject(Object obj) {
235                        this.valueAsObject = obj;
236                }
237 
238                void storeTo(Reference ref) {
239                        if (getValueAsObject() != null) {
240                                ref.add(new StringRefAddr(getPropertyName(), getValueAsObject()
241                                                .toString()));
242                        }
243                }
244 
245                /**
246                 * Synchronizes the state of a ConnectionProperty so that it can be
247                 * exposed as a DriverPropertyInfo instance.
248                 */
249                void syncDriverPropertyInfo() {
250                        this.choices = getAllowableValues();
251                        this.value = (this.valueAsObject != null) ? this.valueAsObject
252                                        .toString() : null;
253                }
254 
255                void validateStringValues(String valueToValidate) throws SQLException {
256                        String[] validateAgainst = getAllowableValues();
257 
258                        if (valueToValidate == null) {
259                                return;
260                        }
261 
262                        if ((validateAgainst == null) || (validateAgainst.length == 0)) {
263                                return;
264                        }
265 
266                        for (int i = 0; i < validateAgainst.length; i++) {
267                                if ((validateAgainst[i] != null)
268                                                && validateAgainst[i].equalsIgnoreCase(valueToValidate)) {
269                                        return;
270                                }
271                        }
272 
273                        StringBuffer errorMessageBuf = new StringBuffer();
274 
275                        errorMessageBuf.append("The connection property '");
276                        errorMessageBuf.append(getPropertyName());
277                        errorMessageBuf.append("' only accepts values of the form: ");
278 
279                        if (validateAgainst.length != 0) {
280                                errorMessageBuf.append("'");
281                                errorMessageBuf.append(validateAgainst[0]);
282                                errorMessageBuf.append("'");
283 
284                                for (int i = 1; i < (validateAgainst.length - 1); i++) {
285                                        errorMessageBuf.append(", ");
286                                        errorMessageBuf.append("'");
287                                        errorMessageBuf.append(validateAgainst[i]);
288                                        errorMessageBuf.append("'");
289                                }
290 
291                                errorMessageBuf.append(" or '");
292                                errorMessageBuf
293                                                .append(validateAgainst[validateAgainst.length - 1]);
294                                errorMessageBuf.append("'");
295                        }
296 
297                        errorMessageBuf.append(". The value '");
298                        errorMessageBuf.append(valueToValidate);
299                        errorMessageBuf.append("' is not in this set.");
300 
301                        throw new SQLException(errorMessageBuf.toString(),
302                                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
303                }
304        }
305 
306        class IntegerConnectionProperty extends ConnectionProperty {
307                int multiplier = 1;
308 
309                IntegerConnectionProperty(String propertyNameToSet,
310                                int defaultValueToSet, int lowerBoundToSet,
311                                int upperBoundToSet, String descriptionToSet,
312                                String sinceVersionToSet, String category, int orderInCategory) {
313                        super(propertyNameToSet, new Integer(defaultValueToSet), null,
314                                        lowerBoundToSet, upperBoundToSet, descriptionToSet,
315                                        sinceVersionToSet, category, orderInCategory);
316                }
317 
318                /**
319                 * DOCUMENT ME!
320                 * 
321                 * @param propertyNameToSet
322                 * @param defaultValueToSet
323                 * @param descriptionToSet
324                 * @param sinceVersionToSet
325                 *            DOCUMENT ME!
326                 */
327 
328                IntegerConnectionProperty(String propertyNameToSet,
329                                int defaultValueToSet, String descriptionToSet,
330                                String sinceVersionToSet, String category, int orderInCategory) {
331                        this(propertyNameToSet, defaultValueToSet, 0, 0, descriptionToSet,
332                                        sinceVersionToSet, category, orderInCategory);
333                }
334 
335                /**
336                 * @see com.mysql.jdbc.ConnectionProperties.ConnectionProperty#getAllowableValues()
337                 */
338                String[] getAllowableValues() {
339                        return null;
340                }
341 
342                /**
343                 * @see com.mysql.jdbc.ConnectionProperties.ConnectionProperty#getLowerBound()
344                 */
345                int getLowerBound() {
346                        return this.lowerBound;
347                }
348 
349                /**
350                 * @see com.mysql.jdbc.ConnectionProperties.ConnectionProperty#getUpperBound()
351                 */
352                int getUpperBound() {
353                        return this.upperBound;
354                }
355 
356                int getValueAsInt() {
357                        return ((Integer) this.valueAsObject).intValue();
358                }
359 
360                /**
361                 * @see com.mysql.jdbc.ConnectionProperties.ConnectionProperty#hasValueConstraints()
362                 */
363                boolean hasValueConstraints() {
364                        return false;
365                }
366 
367                /**
368                 * @see com.mysql.jdbc.ConnectionProperties.ConnectionProperty#initializeFrom(java.lang.String)
369                 */
370                void initializeFrom(String extractedValue) throws SQLException {
371                        if (extractedValue != null) {
372                                try {
373                                        // Parse decimals, too
374                                        int intValue = Double.valueOf(extractedValue).intValue();
375 
376                                        /*
377                                         * if (isRangeBased()) { if ((intValue < getLowerBound()) ||
378                                         * (intValue > getUpperBound())) { throw new
379                                         * SQLException("The connection property '" +
380                                         * getPropertyName() + "' only accepts integer values in the
381                                         * range of " + getLowerBound() + " - " + getUpperBound() + ",
382                                         * the value '" + extractedValue + "' exceeds this range.",
383                                         * SQLError.SQL_STATE_ILLEGAL_ARGUMENT); } }
384                                         */
385                                        this.valueAsObject = new Integer(intValue * multiplier);
386                                } catch (NumberFormatException nfe) {
387                                        throw new SQLException("The connection property '"
388                                                        + getPropertyName()
389                                                        + "' only accepts integer values. The value '"
390                                                        + extractedValue
391                                                        + "' can not be converted to an integer.",
392                                                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
393                                }
394                        } else {
395                                this.valueAsObject = this.defaultValue;
396                        }
397                }
398 
399                /**
400                 * @see com.mysql.jdbc.ConnectionProperties.ConnectionProperty#isRangeBased()
401                 */
402                boolean isRangeBased() {
403                        return getUpperBound() != getLowerBound();
404                }
405 
406                void setValue(int valueFlag) {
407                        this.valueAsObject = new Integer(valueFlag);
408                }
409        }
410 
411        class MemorySizeConnectionProperty extends IntegerConnectionProperty {
412 
413                MemorySizeConnectionProperty(String propertyNameToSet,
414                                int defaultValueToSet, int lowerBoundToSet,
415                                int upperBoundToSet, String descriptionToSet,
416                                String sinceVersionToSet, String category, int orderInCategory) {
417                        super(propertyNameToSet, defaultValueToSet, lowerBoundToSet,
418                                        upperBoundToSet, descriptionToSet, sinceVersionToSet,
419                                        category, orderInCategory);
420                        // TODO Auto-generated constructor stub
421                }
422 
423                void initializeFrom(String extractedValue) throws SQLException {
424                        if (extractedValue != null) {
425                                if (extractedValue.endsWith("k")
426                                                || extractedValue.endsWith("K")
427                                                || extractedValue.endsWith("kb")
428                                                || extractedValue.endsWith("Kb")
429                                                || extractedValue.endsWith("kB")) {
430                                        multiplier = 1024;
431                                        int indexOfK = StringUtils.indexOfIgnoreCase(
432                                                        extractedValue, "k");
433                                        extractedValue = extractedValue.substring(0, indexOfK);
434                                } else if (extractedValue.endsWith("m")
435                                                || extractedValue.endsWith("M")
436                                                || extractedValue.endsWith("G")
437                                                || extractedValue.endsWith("mb")
438                                                || extractedValue.endsWith("Mb")
439                                                || extractedValue.endsWith("mB")) {
440                                        multiplier = 1024 * 1024;
441                                        int indexOfM = StringUtils.indexOfIgnoreCase(
442                                                        extractedValue, "m");
443                                        extractedValue = extractedValue.substring(0, indexOfM);
444                                } else if (extractedValue.endsWith("g")
445                                                || extractedValue.endsWith("G")
446                                                || extractedValue.endsWith("gb")
447                                                || extractedValue.endsWith("Gb")
448                                                || extractedValue.endsWith("gB")) {
449                                        multiplier = 1024 * 1024 * 1024;
450                                        int indexOfG = StringUtils.indexOfIgnoreCase(
451                                                        extractedValue, "g");
452                                        extractedValue = extractedValue.substring(0, indexOfG);
453                                }
454                        }
455 
456                        super.initializeFrom(extractedValue);
457                }
458 
459                void setValue(String value) throws SQLException {
460                        initializeFrom(value);
461                }
462        }
463 
464        class StringConnectionProperty extends ConnectionProperty {
465                StringConnectionProperty(String propertyNameToSet,
466                                String defaultValueToSet, String descriptionToSet,
467                                String sinceVersionToSet, String category, int orderInCategory) {
468                        this(propertyNameToSet, defaultValueToSet, null, descriptionToSet,
469                                        sinceVersionToSet, category, orderInCategory);
470                }
471 
472                /**
473                 * DOCUMENT ME!
474                 * 
475                 * @param propertyNameToSet
476                 * @param defaultValueToSet
477                 * @param allowableValuesToSet
478                 * @param descriptionToSet
479                 * @param sinceVersionToSet
480                 *            DOCUMENT ME!
481                 */
482                StringConnectionProperty(String propertyNameToSet,
483                                String defaultValueToSet, String[] allowableValuesToSet,
484                                String descriptionToSet, String sinceVersionToSet,
485                                String category, int orderInCategory) {
486                        super(propertyNameToSet, defaultValueToSet, allowableValuesToSet,
487                                        0, 0, descriptionToSet, sinceVersionToSet, category,
488                                        orderInCategory);
489                }
490 
491                String getValueAsString() {
492                        return (String) this.valueAsObject;
493                }
494 
495                /**
496                 * @see com.mysql.jdbc.ConnectionProperties.ConnectionProperty#hasValueConstraints()
497                 */
498                boolean hasValueConstraints() {
499                        return (this.allowableValues != null)
500                                        && (this.allowableValues.length > 0);
501                }
502 
503                /**
504                 * @see com.mysql.jdbc.ConnectionProperties.ConnectionProperty#initializeFrom(java.util.Properties)
505                 */
506                void initializeFrom(String extractedValue) throws SQLException {
507                        if (extractedValue != null) {
508                                validateStringValues(extractedValue);
509 
510                                this.valueAsObject = extractedValue;
511                        } else {
512                                this.valueAsObject = this.defaultValue;
513                        }
514                }
515 
516                /**
517                 * @see com.mysql.jdbc.ConnectionProperties.ConnectionProperty#isRangeBased()
518                 */
519                boolean isRangeBased() {
520                        return false;
521                }
522 
523                void setValue(String valueFlag) {
524                        this.valueAsObject = valueFlag;
525                }
526        }
527 
528        private static final String CONNECTION_AND_AUTH_CATEGORY = "Connection/Authentication";
529 
530        private static final String DEBUGING_PROFILING_CATEGORY = "Debuging/Profiling";
531 
532        private static final String HA_CATEGORY = "High Availability and Clustering";
533 
534        private static final String MISC_CATEGORY = "Miscellaneous";
535 
536        private static final String PERFORMANCE_CATEGORY = "Performance Extensions";
537 
538        private static final String SECURITY_CATEGORY = "Security";
539 
540        private static final String[] PROPERTY_CATEGORIES = new String[] {
541                        CONNECTION_AND_AUTH_CATEGORY, HA_CATEGORY, SECURITY_CATEGORY,
542                        PERFORMANCE_CATEGORY, DEBUGING_PROFILING_CATEGORY, MISC_CATEGORY };
543 
544        private static final ArrayList PROPERTY_LIST = new ArrayList();
545 
546        //
547        // Yes, this looks goofy, but we're trying to avoid intern()ing here
548        //
549        private static final String STANDARD_LOGGER_NAME = new String(StandardLogger.class
550                        .getName().getBytes());
551 
552        protected static final String ZERO_DATETIME_BEHAVIOR_CONVERT_TO_NULL = "convertToNull";
553 
554        protected static final String ZERO_DATETIME_BEHAVIOR_EXCEPTION = "exception";
555 
556        protected static final String ZERO_DATETIME_BEHAVIOR_ROUND = "round";
557 
558        static {
559                try {
560                        java.lang.reflect.Field[] declaredFields = ConnectionProperties.class
561                                        .getDeclaredFields();
562 
563                        for (int i = 0; i < declaredFields.length; i++) {
564                                if (ConnectionProperties.ConnectionProperty.class
565                                                .isAssignableFrom(declaredFields[i].getType())) {
566                                        PROPERTY_LIST.add(declaredFields[i]);
567                                }
568                        }
569                } catch (Exception ex) {
570                        throw new RuntimeException(ex.toString());
571                }
572        }
573 
574        /**
575         * Exposes all ConnectionPropertyInfo instances as DriverPropertyInfo
576         * 
577         * @param info
578         *            the properties to load into these ConnectionPropertyInfo
579         *            instances
580         * @param slotsToReserve
581         *            the number of DPI slots to reserve for 'standard' DPI
582         *            properties (user, host, password, etc)
583         * @return a list of all ConnectionPropertyInfo instances, as
584         *         DriverPropertyInfo
585         * @throws SQLException
586         *             if an error occurs
587         */
588        protected static DriverPropertyInfo[] exposeAsDriverPropertyInfo(
589                        Properties info, int slotsToReserve) throws SQLException {
590                return (new ConnectionProperties() {
591                }).exposeAsDriverPropertyInfoInternal(info, slotsToReserve);
592        }
593 
594        private BooleanConnectionProperty allowLoadLocalInfile = new BooleanConnectionProperty(
595                        "allowLoadLocalInfile",
596                        true,
597                        "Should the driver allow use of 'LOAD DATA LOCAL INFILE...' (defaults to 'true').",
598                        "3.0.3", SECURITY_CATEGORY, Integer.MAX_VALUE);
599 
600        private BooleanConnectionProperty allowMultiQueries = new BooleanConnectionProperty(
601                        "allowMultiQueries",
602                        false,
603                        "Allow the use of ';' to delimit multiple queries during one statement (true/false, defaults to 'false'",
604                        "3.1.1", SECURITY_CATEGORY, 1);
605 
606        private BooleanConnectionProperty allowNanAndInf = new BooleanConnectionProperty(
607                        "allowNanAndInf",
608                        false,
609                        "Should the driver allow NaN or +/- INF values in PreparedStatement.setDouble()?",
610                        "3.1.5", MISC_CATEGORY, Integer.MIN_VALUE);
611 
612        private BooleanConnectionProperty allowUrlInLocalInfile = new BooleanConnectionProperty(
613                        "allowUrlInLocalInfile",
614                        false,
615                        "Should the driver allow URLs in 'LOAD DATA LOCAL INFILE' statements?",
616                        "3.1.4", SECURITY_CATEGORY, Integer.MAX_VALUE);
617 
618        private BooleanConnectionProperty alwaysSendSetIsolation = new BooleanConnectionProperty(
619                        "alwaysSendSetIsolation",
620                        true,
621                        "Should the driver always communicate with the database when "
622                                        + " Connection.setTransactionIsolation() is called? "
623                                        + "If set to false, the driver will only communicate with the "
624                                        + "database when the requested transaction isolation is different "
625                                        + "than the whichever is newer, the last value that was set via "
626                                        + "Connection.setTransactionIsolation(), or the value that was read from "
627                                        + "the server when the connection was established.",
628                        "3.1.7", PERFORMANCE_CATEGORY, Integer.MAX_VALUE);
629 
630        private BooleanConnectionProperty autoClosePStmtStreams = new BooleanConnectionProperty(
631                        "autoClosePStmtStreams", 
632                        false,
633                        "Should the driver automatically call .close() on streams/readers passed as "
634                        + "arguments via set*() methods?",
635                        "3.1.12",
636                        MISC_CATEGORY,
637                        Integer.MIN_VALUE);
638        
639        private BooleanConnectionProperty autoDeserialize = new BooleanConnectionProperty(
640                        "autoDeserialize",
641                        false,
642                        "Should the driver automatically detect and de-serialize objects stored in BLOB fields?",
643                        "3.1.5", MISC_CATEGORY, Integer.MIN_VALUE);
644 
645        private BooleanConnectionProperty autoGenerateTestcaseScript = new BooleanConnectionProperty(
646                        "autoGenerateTestcaseScript", false,
647                        "Should the driver dump the SQL it is executing, including server-side "
648                                        + "prepared statements to STDERR?", "3.1.9",
649                        DEBUGING_PROFILING_CATEGORY, Integer.MIN_VALUE);
650 
651        private boolean autoGenerateTestcaseScriptAsBoolean = false;
652 
653        private BooleanConnectionProperty autoReconnect = new BooleanConnectionProperty(
654                        "autoReconnect",
655                        false,
656                        "Should the driver try to re-establish stale and/or dead connections? "
657                                        + "  If enabled the driver will throw an exception for a queries issued on a stale or dead connection, "
658                                        + " which belong to the current transaction, but will attempt reconnect before the next query issued on the "
659                                        + "connection in a new transaction. The use of this feature "
660                                        + "is not recommended, because it has side effects related to session state and data consistency when applications don't"
661                                        + "handle SQLExceptions properly, and is only designed to be used "
662                                        + "when you are unable to configure your application to handle SQLExceptions resulting from dead and"
663                                        + "stale connections properly. Alternatively, investigate setting the MySQL server variable \"wait_timeout\""
664                                        + "to some high value rather than the default of 8 hours.",
665                        "1.1", HA_CATEGORY, 0);
666 
667        private BooleanConnectionProperty autoReconnectForPools = new BooleanConnectionProperty(
668                        "autoReconnectForPools",
669                        false,
670                        "Use a reconnection strategy appropriate for connection pools (defaults to 'false')",
671                        "3.1.3", HA_CATEGORY, 1);
672 
673        private boolean autoReconnectForPoolsAsBoolean = false;
674 
675        private MemorySizeConnectionProperty blobSendChunkSize = new MemorySizeConnectionProperty(
676                        "blobSendChunkSize",
677                        1024 * 1024,
678                        1,
679                        Integer.MAX_VALUE,
680                        "Chunk to use when sending BLOB/CLOBs via ServerPreparedStatements",
681                        "3.1.9", PERFORMANCE_CATEGORY, Integer.MIN_VALUE);
682 
683        private BooleanConnectionProperty cacheCallableStatements = new BooleanConnectionProperty(
684                        "cacheCallableStmts", false,
685                        "Should the driver cache the parsing stage of CallableStatements",
686                        "3.1.2", PERFORMANCE_CATEGORY, Integer.MIN_VALUE);
687 
688        private BooleanConnectionProperty cachePreparedStatements = new BooleanConnectionProperty(
689                        "cachePrepStmts",
690                        false,
691                        "Should the driver cache the parsing stage of PreparedStatements of client-side "
692                                        + "prepared statements, the \"check\" for suitability of server-side prepared "
693                                        + " and server-side prepared statements themselves?",
694                        "3.0.10", PERFORMANCE_CATEGORY, Integer.MIN_VALUE);
695 
696        private BooleanConnectionProperty cacheResultSetMetadata = new BooleanConnectionProperty(
697                        "cacheResultSetMetadata",
698                        false,
699                        "Should the driver cache ResultSetMetaData for Statements and PreparedStatements? (Req. JDK-1.4+, true/false, default 'false')",
700                        "3.1.1", PERFORMANCE_CATEGORY, Integer.MIN_VALUE);
701 
702        private boolean cacheResultSetMetaDataAsBoolean;
703 
704        private BooleanConnectionProperty cacheServerConfiguration = new BooleanConnectionProperty(
705                        "cacheServerConfiguration",
706                        false,
707                        "Should the driver cache the results of "
708                                        + "'SHOW VARIABLES' and 'SHOW COLLATION' on a per-URL basis?",
709                        "3.1.5", PERFORMANCE_CATEGORY, Integer.MIN_VALUE);
710 
711        private IntegerConnectionProperty callableStatementCacheSize = new IntegerConnectionProperty(
712                        "callableStmtCacheSize",
713                        100,
714                        0,
715                        Integer.MAX_VALUE,
716                        "If 'cacheCallableStmts' is enabled, how many callable statements should be cached?",
717                        "3.1.2", PERFORMANCE_CATEGORY, 5);
718 
719        private BooleanConnectionProperty capitalizeTypeNames = new BooleanConnectionProperty(
720                        "capitalizeTypeNames",
721                        false,
722                        "Capitalize type names in DatabaseMetaData? (usually only useful when using WebObjects, true/false, defaults to 'false')",
723                        "2.0.7", MISC_CATEGORY, Integer.MIN_VALUE);
724 
725        private StringConnectionProperty characterEncoding = new StringConnectionProperty(
726                        "characterEncoding",
727                        null,
728                        "If 'useUnicode' is set to true, what character encoding should the driver use when dealing with strings? (defaults is to 'autodetect')",
729                        "1.1g", MISC_CATEGORY, 5);
730 
731        private String characterEncodingAsString = null;
732 
733        private StringConnectionProperty characterSetResults = new StringConnectionProperty(
734                        "characterSetResults", null,
735                        "Character set to tell the server to return results as.", "3.0.13",
736                        MISC_CATEGORY, 6);
737 
738        private BooleanConnectionProperty clobberStreamingResults = new BooleanConnectionProperty(
739                        "clobberStreamingResults",
740                        false,
741                        "This will cause a 'streaming' ResultSet to be automatically closed, "
742                                        + "and any outstanding data still streaming from the server to be discarded if another query is executed "
743                                        + "before all the data has been read from the server.",
744                        "3.0.9", MISC_CATEGORY, Integer.MIN_VALUE);
745 
746        private StringConnectionProperty connectionCollation = new StringConnectionProperty(
747                        "connectionCollation",
748                        null,
749                        "If set, tells the server to use this collation via 'set collation_connection'",
750                        "3.0.13", MISC_CATEGORY, 7);
751 
752        private IntegerConnectionProperty connectTimeout = new IntegerConnectionProperty(
753                        "connectTimeout", 0, 0, Integer.MAX_VALUE,
754                        "Timeout for socket connect (in milliseconds), with 0 being no timeout. "
755                                        + "Only works on JDK-1.4 or newer. Defaults to '0'.",
756                        "3.0.1", CONNECTION_AND_AUTH_CATEGORY, 9);
757 
758        private BooleanConnectionProperty continueBatchOnError = new BooleanConnectionProperty(
759                        "continueBatchOnError",
760                        true,
761                        "Should the driver continue processing batch commands if "
762                                        + "one statement fails. The JDBC spec allows either way (defaults to 'true').",
763                        "3.0.3", MISC_CATEGORY, Integer.MIN_VALUE);
764 
765        private BooleanConnectionProperty createDatabaseIfNotExist = new BooleanConnectionProperty(
766                        "createDatabaseIfNotExist",
767                        false,
768                        "Creates the database given in the URL if it doesn't yet exist. Assumes "
769                                        + " the configured user has permissions to create databases.",
770                        "3.1.9", MISC_CATEGORY, Integer.MIN_VALUE);
771 
772        private BooleanConnectionProperty detectServerPreparedStmts = new BooleanConnectionProperty(
773                        "useServerPrepStmts",
774                        true,
775                        "Use server-side prepared statements if the server supports them? (defaults to 'true').",
776                        "3.1.0", MISC_CATEGORY, Integer.MIN_VALUE);
777 
778        private BooleanConnectionProperty dontTrackOpenResources = new BooleanConnectionProperty(
779                        "dontTrackOpenResources",
780                        false,
781                        "The JDBC specification requires the driver to automatically track and close resources, "
782                                        + "however if your application doesn't do a good job of "
783                                        + "explicitly calling close() on statements or result sets, "
784                                        + "this can cause memory leakage. Setting this property to true "
785                                        + "relaxes this constraint, and can be more memory efficient for "
786                                        + "some applications.", "3.1.7", PERFORMANCE_CATEGORY,
787                        Integer.MIN_VALUE);
788 
789        private BooleanConnectionProperty dumpMetadataOnColumnNotFound = new BooleanConnectionProperty(
790                        "dumpMetadataOnColumnNotFound",
791                        false,
792                        "Should the driver dump the field-level metadata of a result set into "
793                        + "the exception message when ResultSet.findColumn() fails?",
794                        "3.1.13", DEBUGING_PROFILING_CATEGORY, Integer.MIN_VALUE);
795        
796        private BooleanConnectionProperty dumpQueriesOnException = new BooleanConnectionProperty(
797                        "dumpQueriesOnException",
798                        false,
799                        "Should the driver dump the contents of the query sent to the server in the message for SQLExceptions?",
800                        "3.1.3", DEBUGING_PROFILING_CATEGORY, Integer.MIN_VALUE);
801 
802        private BooleanConnectionProperty dynamicCalendars = new BooleanConnectionProperty(
803                        "dynamicCalendars",
804                        false,
805                        "Should the driver retrieve the default"
806                                        + " calendar when required, or cache it per connection/session?",
807                        "3.1.5", PERFORMANCE_CATEGORY, Integer.MIN_VALUE);
808 
809        private BooleanConnectionProperty elideSetAutoCommits = new BooleanConnectionProperty(
810                        "elideSetAutoCommits",
811                        false,
812                        "If using MySQL-4.1 or newer, should the driver only issue 'set autocommit=n' queries when the server's state doesn't match the requested state by Connection.setAutoCommit(boolean)?",
813                        "3.1.3", PERFORMANCE_CATEGORY, Integer.MIN_VALUE);
814 
815        private BooleanConnectionProperty emptyStringsConvertToZero = new BooleanConnectionProperty(
816                        "emptyStringsConvertToZero", true,
817                        "Should the driver allow conversions from empty string "
818                                        + "fields to numeric values of '0'?", "3.1.8",
819                        MISC_CATEGORY, Integer.MIN_VALUE);
820 
821        private BooleanConnectionProperty emulateLocators = new BooleanConnectionProperty(
822                        "emulateLocators", false, "N/A", "3.1.0", MISC_CATEGORY,
823                        Integer.MIN_VALUE);
824 
825        private BooleanConnectionProperty emulateUnsupportedPstmts = new BooleanConnectionProperty(
826                        "emulateUnsupportedPstmts",
827                        true,
828                        "Should the driver detect prepared statements that are not supported by the server, and "
829                                        + "replace them with client-side emulated versions?",
830                        "3.1.7", MISC_CATEGORY, Integer.MIN_VALUE);
831 
832        private BooleanConnectionProperty enableDeprecatedAutoreconnect = new BooleanConnectionProperty(
833                        "enableDeprecatedAutoreconnect",
834                        false,
835                        "Auto-reconnect functionality is deprecated starting with version 3.2, and will be removed in version 3.3. Set this "
836                                        + "property to 'true' to disable the check for the feature being configured.",
837                        "3.2.1", HA_CATEGORY, Integer.MIN_VALUE);
838 
839        private BooleanConnectionProperty enablePacketDebug = new BooleanConnectionProperty(
840                        "enablePacketDebug",
841                        false,
842                        "When enabled, a ring-buffer of 'packetDebugBufferSize' packets will be kept, and dumped when exceptions are thrown in key areas in the driver's code",
843                        "3.1.3", DEBUGING_PROFILING_CATEGORY, Integer.MIN_VALUE);
844 
845        private BooleanConnectionProperty explainSlowQueries = new BooleanConnectionProperty(
846                        "explainSlowQueries",
847                        false,
848                        "If 'logSlowQueries' is enabled, should the driver automatically issue an 'EXPLAIN' on the"
849                                        + " server and send the results to the configured log at a WARN level?",
850                        "3.1.2", DEBUGING_PROFILING_CATEGORY, Integer.MIN_VALUE);
851 
852        /** When failed-over, set connection to read-only? */
853        private BooleanConnectionProperty failOverReadOnly = new BooleanConnectionProperty(
854                        "failOverReadOnly",
855                        true,
856                        "When failing over in autoReconnect mode, should the connection be set to 'read-only'?",
857                        "3.0.12", HA_CATEGORY, 2);
858 
859        private BooleanConnectionProperty gatherPerformanceMetrics = new BooleanConnectionProperty(
860                        "gatherPerfMetrics",
861                        false,
862                        "Should the driver gather performance metrics, and report them via the configured logger every 'reportMetricsIntervalMillis' milliseconds?",
863                        "3.1.2", DEBUGING_PROFILING_CATEGORY, 1);
864 
865        private boolean highAvailabilityAsBoolean = false;
866 
867        private BooleanConnectionProperty holdResultsOpenOverStatementClose = new BooleanConnectionProperty(
868                        "holdResultsOpenOverStatementClose",
869                        false,
870                        "Should the driver close result sets on Statement.close() as required by the JDBC specification?",
871                        "3.1.7", PERFORMANCE_CATEGORY, Integer.MIN_VALUE);
872 
873        private BooleanConnectionProperty ignoreNonTxTables = new BooleanConnectionProperty(
874                        "ignoreNonTxTables",
875                        false,
876                        "Ignore non-transactional table warning for rollback? (defaults to 'false').",
877                        "3.0.9", MISC_CATEGORY, Integer.MIN_VALUE);
878 
879        private IntegerConnectionProperty initialTimeout = new IntegerConnectionProperty(
880                        "initialTimeout", 2, 1, Integer.MAX_VALUE,
881                        "If autoReconnect is enabled, the"
882                                        + " initial time to wait between"
883                                        + " re-connect attempts (in seconds, defaults to '2').",
884                        "1.1", HA_CATEGORY, 5);
885 
886        private BooleanConnectionProperty isInteractiveClient = new BooleanConnectionProperty(
887                        "interactiveClient",
888                        false,
889                        "Set the CLIENT_INTERACTIVE flag, which tells MySQL "
890                                        + "to timeout connections based on INTERACTIVE_TIMEOUT instead of WAIT_TIMEOUT",
891                        "3.1.0", CONNECTION_AND_AUTH_CATEGORY, Integer.MIN_VALUE);
892 
893        private BooleanConnectionProperty jdbcCompliantTruncation = new BooleanConnectionProperty(
894                        "jdbcCompliantTruncation",
895                        true,
896                        "Should the driver throw java.sql.DataTruncation"
897                                        + " exceptions when data is truncated as is required by the JDBC specification when connected to a server that supports warnings"
898                                        + "(MySQL 4.1.0 and newer)? When connected to MySQL 5.0.2 or newer, the driver will "
899                                        + "alter the sql_mode on the server to include STRICT_TRANS_TABLES instead of checking "
900                                        + "for warnings on writes to the database, which is more efficient.", "3.1.2", MISC_CATEGORY,
901                        Integer.MIN_VALUE);
902 
903        private boolean jdbcCompliantTruncationForReads = 
904                this.jdbcCompliantTruncation.getValueAsBoolean();
905        
906        private MemorySizeConnectionProperty locatorFetchBufferSize = new MemorySizeConnectionProperty(
907                        "locatorFetchBufferSize",
908                        1024 * 1024,
909                        0,
910                        Integer.MAX_VALUE,
911                        "If 'emulateLocators' is configured to 'true', what size "
912                                        + " buffer should be used when fetching BLOB data for getBinaryInputStream?",
913                        "3.2.1", PERFORMANCE_CATEGORY, Integer.MIN_VALUE);
914 
915        private StringConnectionProperty loggerClassName = new StringConnectionProperty(
916                        "logger", STANDARD_LOGGER_NAME,
917                        "The name of a class that implements '" + Log.class.getName()
918                                        + "' that will be used to log messages to."
919                                        + "(default is '" + STANDARD_LOGGER_NAME + "', which "
920                                        + "logs to STDERR)", "3.1.1", DEBUGING_PROFILING_CATEGORY,
921                        0);
922 
923        private BooleanConnectionProperty logSlowQueries = new BooleanConnectionProperty(
924                        "logSlowQueries",
925                        false,
926                        "Should queries that take longer than 'slowQueryThresholdMillis' be logged?",
927                        "3.1.2", DEBUGING_PROFILING_CATEGORY, Integer.MIN_VALUE);
928 
929        private BooleanConnectionProperty maintainTimeStats = new BooleanConnectionProperty(
930                        "maintainTimeStats",
931                        true,
932                        "Should the driver maintain various internal timers to enable "
933                                        + "idle time calculations as well as more verbose error messages when "
934                                        + "the connection to the server fails? Setting this property to "
935                                        + "false removes at least two calls to System.getCurrentTimeMillis() "
936                                        + "per query.", "3.1.9", PERFORMANCE_CATEGORY,
937                        Integer.MAX_VALUE);
938 
939        private boolean maintainTimeStatsAsBoolean = true;
940 
941        private IntegerConnectionProperty maxQuerySizeToLog = new IntegerConnectionProperty(
942                        "maxQuerySizeToLog",
943                        2048,
944                        0,
945                        Integer.MAX_VALUE,
946                        "Controls the maximum length/size of a query that will get logged when profiling or tracing",
947                        "3.1.3", DEBUGING_PROFILING_CATEGORY, 4);
948 
949        private IntegerConnectionProperty maxReconnects = new IntegerConnectionProperty(
950                        "maxReconnects",
951                        3,
952                        1,
953                        Integer.MAX_VALUE,
954                        "Maximum number of reconnects to attempt if autoReconnect is true, default is '3'.",
955                        "1.1", HA_CATEGORY, 4);
956 
957        private IntegerConnectionProperty maxRows = new IntegerConnectionProperty(
958                        "maxRows", -1, -1, Integer.MAX_VALUE,
959                        "The maximum number of rows to return "
960                                        + " (0, the default means return all rows).",
961                        "all versions", MISC_CATEGORY, Integer.MIN_VALUE);
962 
963        private int maxRowsAsInt = -1;
964 
965        private IntegerConnectionProperty metadataCacheSize = new IntegerConnectionProperty(
966                        "metadataCacheSize",
967                        50,
968                        1,
969                        Integer.MAX_VALUE,
970                        "The number of queries to cache"
971                                        + "ResultSetMetadata for if cacheResultSetMetaData is set to 'true' (default 50)",
972                        "3.1.1", PERFORMANCE_CATEGORY, 5);
973 
974        private BooleanConnectionProperty noDatetimeStringSync = new BooleanConnectionProperty(
975                        "noDatetimeStringSync",
976                        false,
977                        "Don't ensure that ResultSet.getDatetimeType().toString().equals(ResultSet.getString())",
978                        "3.1.7", MISC_CATEGORY, Integer.MIN_VALUE);
979 
980        private BooleanConnectionProperty nullCatalogMeansCurrent = new BooleanConnectionProperty(
981                        "nullCatalogMeansCurrent",
982                        true,
983                        "When DatabaseMetadataMethods ask for a 'catalog' parameter, does the value null mean use the current catalog? "
984                                        + "(this is not JDBC-compliant, but follows legacy behavior from earlier versions of the driver)",
985                        "3.1.8", MISC_CATEGORY, Integer.MIN_VALUE);
986 
987        private BooleanConnectionProperty nullNamePatternMatchesAll = new BooleanConnectionProperty(
988                        "nullNamePatternMatchesAll",
989                        true,
990                        "Should DatabaseMetaData methods that accept *pattern parameters treat null the same as '%' "
991                                        + " (this is not JDBC-compliant, however older versions of the driver accepted this departure from the specification)",
992                        "3.1.8", MISC_CATEGORY, Integer.MIN_VALUE);
993 
994        private IntegerConnectionProperty packetDebugBufferSize = new IntegerConnectionProperty(
995                        "packetDebugBufferSize",
996                        20,
997                        0,
998                        Integer.MAX_VALUE,
999                        "The maximum number of packets to retain when 'enablePacketDebug' is true",
1000                        "3.1.3", DEBUGING_PROFILING_CATEGORY, 7);
1001 
1002        private BooleanConnectionProperty paranoid = new BooleanConnectionProperty(
1003                        "paranoid",
1004                        false,
1005                        "Take measures to prevent exposure sensitive information in error messages and clear "
1006                                        + "data structures holding sensitive data when possible? (defaults to 'false')",
1007                        "3.0.1", SECURITY_CATEGORY, Integer.MIN_VALUE);
1008 
1009        private BooleanConnectionProperty pedantic = new BooleanConnectionProperty(
1010                        "pedantic", false, "Follow the JDBC spec to the letter.", "3.0.0",
1011                        MISC_CATEGORY, Integer.MIN_VALUE);
1012 
1013        private IntegerConnectionProperty preparedStatementCacheSize = new IntegerConnectionProperty(
1014                        "prepStmtCacheSize", 25, 0, Integer.MAX_VALUE,
1015                        "If prepared statement caching is enabled, "
1016                                        + "how many prepared statements should be cached?",
1017                        "3.0.10", PERFORMANCE_CATEGORY, 10);
1018 
1019        private IntegerConnectionProperty preparedStatementCacheSqlLimit = new IntegerConnectionProperty(
1020                        "prepStmtCacheSqlLimit",
1021                        256,
1022                        1,
1023                        Integer.MAX_VALUE,
1024                        "If prepared statement caching is enabled, "
1025                                        + "what's the largest SQL the driver will cache the parsing for?",
1026                        "3.0.10", PERFORMANCE_CATEGORY, 11);
1027 
1028        private BooleanConnectionProperty processEscapeCodesForPrepStmts = 
1029                new BooleanConnectionProperty("processEscapeCodesForPrepStmts",
1030                                true,
1031                                "Should the driver process escape codes in queries that are prepared?",
1032                                "3.1.12",
1033                                MISC_CATEGORY, Integer.MIN_VALUE);
1034        
1035        private StringConnectionProperty profileSql = new StringConnectionProperty(
1036                        "profileSql",
1037                        null,
1038                        "Deprecated, use 'profileSQL' instead. Trace queries and their execution/fetch times on STDERR (true/false) defaults to 'false'",
1039                        "2.0.14", DEBUGING_PROFILING_CATEGORY, 3);
1040 
1041        private BooleanConnectionProperty profileSQL = new BooleanConnectionProperty(
1042                        "profileSQL",
1043                        false,
1044                        "Trace queries and their execution/fetch times to the configured logger (true/false) defaults to 'false'",
1045                        "3.1.0", DEBUGING_PROFILING_CATEGORY, 1);
1046 
1047        private boolean profileSQLAsBoolean = false;
1048 
1049        private StringConnectionProperty propertiesTransform = new StringConnectionProperty(
1050                        NonRegisteringDriver.PROPERTIES_TRANSFORM_KEY,
1051                        null,
1052                        "An implementation of com.mysql.jdbc.ConnectionPropertiesTransform that the driver will use to modify URL properties passed to the driver before attempting a connection",
1053                        "3.1.4", CONNECTION_AND_AUTH_CATEGORY, Integer.MIN_VALUE);
1054 
1055        private IntegerConnectionProperty queriesBeforeRetryMaster = new IntegerConnectionProperty(
1056                        "queriesBeforeRetryMaster",
1057                        50,
1058                        1,
1059                        Integer.MAX_VALUE,
1060                        "Number of queries to issue before falling back to master when failed over "
1061                                        + "(when using multi-host failover). Whichever condition is met first, "
1062                                        + "'queriesBeforeRetryMaster' or 'secondsBeforeRetryMaster' will cause an "
1063                                        + "attempt to be made to reconnect to the master. Defaults to 50.",
1064                        "3.0.2", HA_CATEGORY, 7);
1065 
1066        private BooleanConnectionProperty reconnectAtTxEnd = new BooleanConnectionProperty(
1067                        "reconnectAtTxEnd", false,
1068                        "If autoReconnect is set to true, should the driver attempt reconnections"
1069                                        + "at the end of every transaction?", "3.0.10",
1070                        HA_CATEGORY, 4);
1071 
1072        private boolean reconnectTxAtEndAsBoolean = false;
1073 
1074        private BooleanConnectionProperty relaxAutoCommit = new BooleanConnectionProperty(
1075                        "relaxAutoCommit",
1076                        false,
1077                        "If the version of MySQL the driver connects to does not support transactions, still allow calls to commit(), rollback() and setAutoCommit() (true/false, defaults to 'false')?",
1078                        "2.0.13", MISC_CATEGORY, Integer.MIN_VALUE);
1079 
1080        private IntegerConnectionProperty reportMetricsIntervalMillis = new IntegerConnectionProperty(
1081                        "reportMetricsIntervalMillis",
1082                        30000,
1083                        0,
1084                        Integer.MAX_VALUE,
1085                        "If 'gatherPerfMetrics' is enabled, how often should they be logged (in ms)?",
1086                        "3.1.2", DEBUGING_PROFILING_CATEGORY, 3);
1087 
1088        private BooleanConnectionProperty requireSSL = new BooleanConnectionProperty(
1089                        "requireSSL", false,
1090                        "Require SSL connection if useSSL=true? (defaults to 'false').",
1091                        "3.1.0", SECURITY_CATEGORY, 3);
1092 
1093        private BooleanConnectionProperty retainStatementAfterResultSetClose = new BooleanConnectionProperty(
1094                        "retainStatementAfterResultSetClose",
1095                        false,
1096                        "Should the driver retain the Statement reference in a ResultSet after ResultSet.close()"
1097                                        + " has been called. This is not JDBC-compliant after JDBC-4.0.",
1098                        "3.1.11", MISC_CATEGORY, Integer.MIN_VALUE);
1099        
1100        private BooleanConnectionProperty rewriteBatchedStatements = new BooleanConnectionProperty(
1101                        "rewriteBatchedStatements",
1102                        false, 
1103                        "Should the driver use multiqueries (irregardless of the setting of \"allowMultiQueries\") as well as "
1104                        + "rewriting of prepared statements for INSERT into multi-value inserts when executeBatch() is called? Notice that this has the potential "
1105                        + "for SQL injection if using plain java.sql.Statements and your code doesn't sanitize input correctly.\n\n"
1106                        + "Notice that for prepared statements, server-side prepared statements can not currently take advantage of "
1107                        + "this rewrite option, and that if you don't specify stream lengths when using PreparedStatement.set*Stream()," 
1108                        + "the driver won't be able to determine the optimium number of parameters per batch and you might receive an" 
1109                        + "an error from the driver that the resultant packet is too large.\n\n"
1110                        + "Statement.getGeneratedKeys() for these rewritten statements only works when the entire " 
1111                        + "batch includes INSERT statements.",
1112                        "3.1.13", PERFORMANCE_CATEGORY, Integer.MIN_VALUE);
1113        
1114        private BooleanConnectionProperty rollbackOnPooledClose = new BooleanConnectionProperty(
1115                        "rollbackOnPooledClose",
1116                        true,
1117                        "Should the driver issue a rollback() when the logical connection in a pool is closed?",
1118                        "3.0.15", MISC_CATEGORY, Integer.MIN_VALUE);
1119 
1120        private BooleanConnectionProperty roundRobinLoadBalance = new BooleanConnectionProperty(
1121                        "roundRobinLoadBalance",
1122                        false,
1123                        "When autoReconnect is enabled, and failoverReadonly is false, should we pick hosts to connect to on a round-robin basis?",
1124                        "3.1.2", HA_CATEGORY, 5);
1125 
1126        private BooleanConnectionProperty runningCTS13 = new BooleanConnectionProperty(
1127                        "runningCTS13",
1128                        false,
1129                        "Enables workarounds for bugs in Sun's JDBC compliance testsuite version 1.3",
1130                        "3.1.7", MISC_CATEGORY, Integer.MIN_VALUE);
1131 
1132        private IntegerConnectionProperty secondsBeforeRetryMaster = new IntegerConnectionProperty(
1133                        "secondsBeforeRetryMaster",
1134                        30,
1135                        1,
1136                        Integer.MAX_VALUE,
1137                        "How long should the driver wait, when failed over, before attempting "
1138                                        + "to reconnect to the master server? Whichever condition is met first, "
1139                                        + "'queriesBeforeRetryMaster' or 'secondsBeforeRetryMaster' will cause an "
1140                                        + "attempt to be made to reconnect to the master. Time in seconds, defaults to 30",
1141                        "3.0.2", HA_CATEGORY, 8);
1142 
1143        private StringConnectionProperty serverTimezone = new StringConnectionProperty(
1144                        "serverTimezone",
1145                        null,
1146                        "Override detection/mapping of timezone. Used when timezone from server doesn't map to Java timezone",
1147                        "3.0.2", MISC_CATEGORY, Integer.MIN_VALUE);
1148 
1149        private StringConnectionProperty sessionVariables = new StringConnectionProperty(
1150                        "sessionVariables", null,
1151                        "A comma-separated list of name/value pairs to be sent as SET SESSION ... to "
1152                                        + " the server when the driver connects.", "3.1.8",
1153                        MISC_CATEGORY, Integer.MAX_VALUE);
1154 
1155        private IntegerConnectionProperty slowQueryThresholdMillis = new IntegerConnectionProperty(
1156                        "slowQueryThresholdMillis",
1157                        2000,
1158                        0,
1159                        Integer.MAX_VALUE,
1160                        "If 'logSlowQueries' is enabled, how long should a query (in ms) before it is logged as 'slow'?",
1161                        "3.1.2", DEBUGING_PROFILING_CATEGORY, 9);
1162 
1163        private StringConnectionProperty socketFactoryClassName = new StringConnectionProperty(
1164                        "socketFactory",
1165                        StandardSocketFactory.class.getName(),
1166                        "The name of the class that the driver should use for creating socket connections to the server. This class must implement the interface 'com.mysql.jdbc.SocketFactory' and have public no-args constructor.",
1167                        "3.0.3", CONNECTION_AND_AUTH_CATEGORY, 4);
1168 
1169        private IntegerConnectionProperty socketTimeout = new IntegerConnectionProperty(
1170                        "socketTimeout",
1171                        0,
1172                        0,
1173                        Integer.MAX_VALUE,
1174                        "Timeout on network socket operations (0, the default means no timeout).",
1175                        "3.0.1", CONNECTION_AND_AUTH_CATEGORY, 10);
1176 
1177        private BooleanConnectionProperty strictFloatingPoint = new BooleanConnectionProperty(
1178                        "strictFloatingPoint", false,
1179                        "Used only in older versions of compliance test", "3.0.0",
1180                        MISC_CATEGORY, Integer.MIN_VALUE);
1181 
1182        private BooleanConnectionProperty strictUpdates = new BooleanConnectionProperty(
1183                        "strictUpdates",
1184                        true,
1185                        "Should the driver do strict checking (all primary keys selected) of updatable result sets (true, false, defaults to 'true')?",
1186                        "3.0.4", MISC_CATEGORY, Integer.MIN_VALUE);
1187 
1188        private BooleanConnectionProperty overrideSupportsIntegrityEnhancementFacility =
1189                new BooleanConnectionProperty("overrideSupportsIntegrityEnhancementFacility",
1190                                false,
1191                                "Should the driver return \"true\" for DatabaseMetaData.supportsIntegrityEnhancementFacility() "
1192                                + "even if the database doesn't support it to workaround applications that require this method to return "
1193                                + "\"true\" to signal support of foreign keys, even though the SQL specification states that this facility "
1194                                + "contains much more than just foreign key support (one such application being OpenOffice)?",
1195                                "3.1.12", MISC_CATEGORY, Integer.MIN_VALUE);
1196        
1197        private BooleanConnectionProperty tinyInt1isBit = new BooleanConnectionProperty(
1198                        "tinyInt1isBit",
1199                        true,
1200                        "Should the driver treat the datatype TINYINT(1) as the BIT type "
1201                                        + "(because the server silently converts BIT -> TINYINT(1) when creating tables)?",
1202                        "3.0.16", MISC_CATEGORY, Integer.MIN_VALUE);
1203 
1204        private BooleanConnectionProperty traceProtocol = new BooleanConnectionProperty(
1205                        "traceProtocol", false,
1206                        "Should trace-level network protocol be logged?", "3.1.2",
1207                        DEBUGING_PROFILING_CATEGORY, Integer.MIN_VALUE);
1208 
1209        private BooleanConnectionProperty transformedBitIsBoolean = new BooleanConnectionProperty(
1210                        "transformedBitIsBoolean",
1211                        false,
1212                        "If the driver converts TINYINT(1) to a different type, should it use BOOLEAN instead of BIT "
1213                                        + " for future compatibility with MySQL-5.0, as MySQL-5.0 has a BIT type?",
1214                        "3.1.9", MISC_CATEGORY, Integer.MIN_VALUE);
1215 
1216        private BooleanConnectionProperty useCompression = new BooleanConnectionProperty(
1217                        "useCompression",
1218                        false,
1219                        "Use zlib compression when communicating with the server (true/false)? Defaults to 'false'.",
1220                        "3.0.17", CONNECTION_AND_AUTH_CATEGORY, Integer.MIN_VALUE);
1221 
1222        private StringConnectionProperty useConfig = new StringConnectionProperty(
1223                        "useConfigs",
1224                        null,
1225                        "Load the comma-delimited list of configuration properties before parsing the "
1226                                        + "URL or applying user-specified properties. These configurations are explained in the 'Configurations' of the documentation.",
1227                        "3.1.5", CONNECTION_AND_AUTH_CATEGORY, Integer.MAX_VALUE);
1228 
1229        private BooleanConnectionProperty useFastIntParsing = new BooleanConnectionProperty(
1230                        "useFastIntParsing",
1231                        true,
1232                        "Use internal String->Integer conversion routines to avoid excessive object creation?",
1233                        "3.1.4", PERFORMANCE_CATEGORY, Integer.MIN_VALUE);
1234        private BooleanConnectionProperty useGmtMillisForDatetimes = new BooleanConnectionProperty(
1235                        "useGmtMillisForDatetimes",
1236                        false,
1237                        "Convert between session timezone and GMT before creating Date and Timestamp instances (value of \"false\" is legacy behavior, \"true\" leads to more JDBC-compliant behavior.",
1238                        "3.1.12", MISC_CATEGORY, Integer.MIN_VALUE);
1239        private BooleanConnectionProperty useHostsInPrivileges = new BooleanConnectionProperty(
1240                        "useHostsInPrivileges",
1241                        true,
1242                        "Add '@hostname' to users in DatabaseMetaData.getColumn/TablePrivileges() (true/false), defaults to 'true'.",
1243                        "3.0.2", MISC_CATEGORY, Integer.MIN_VALUE);
1244 
1245        private BooleanConnectionProperty useLocalSessionState = new BooleanConnectionProperty(
1246                        "useLocalSessionState",
1247                        false,
1248                        "Should the driver refer to the internal values of autocommit and transaction isolation that are set "
1249                                        + " by Connection.setAutoCommit() and Connection.setTransactionIsolation(), rather than querying the database?",
1250                        "3.1.7", PERFORMANCE_CATEGORY, Integer.MIN_VALUE);
1251        
1252        
1253        private BooleanConnectionProperty useNewIo = new BooleanConnectionProperty(
1254                        "useNewIO",
1255                        false,
1256                        "Should the driver use the java.nio.* interfaces for network communication (true/false), defaults to 'false'",
1257                        "3.1.0", PERFORMANCE_CATEGORY, Integer.MIN_VALUE);
1258 
1259        private BooleanConnectionProperty useOldUTF8Behavior = new BooleanConnectionProperty(
1260                        "useOldUTF8Behavior",
1261                        false,
1262                        "Use the UTF-8 behavior the driver did when communicating with 4.0 and older servers",
1263                        "3.1.6", MISC_CATEGORY, Integer.MIN_VALUE);
1264 
1265        private boolean useOldUTF8BehaviorAsBoolean = false;
1266 
1267        private BooleanConnectionProperty useOnlyServerErrorMessages = new BooleanConnectionProperty(
1268                        "useOnlyServerErrorMessages",
1269                        true,
1270                        "Don't prepend 'standard' SQLState error messages to error messages returned by the server.",
1271                        "3.0.15", MISC_CATEGORY, Integer.MIN_VALUE);
1272 
1273        private BooleanConnectionProperty useReadAheadInput = new BooleanConnectionProperty(
1274                        "useReadAheadInput",
1275                        true,
1276                        "Use newer, optimized non-blocking, buffered input stream when reading from the server?",
1277                        "3.1.5", PERFORMANCE_CATEGORY, Integer.MIN_VALUE);
1278 
1279        private BooleanConnectionProperty useSqlStateCodes = new BooleanConnectionProperty(
1280                        "useSqlStateCodes",
1281                        true,
1282                        "Use SQL Standard state codes instead of 'legacy' X/Open/SQL state codes (true/false), default is 'true'",
1283                        "3.1.3", MISC_CATEGORY, Integer.MIN_VALUE);
1284 
1285        private BooleanConnectionProperty useSSL = new BooleanConnectionProperty(
1286                        "useSSL",
1287                        false,
1288                        "Use SSL when communicating with the server (true/false), defaults to 'false'",
1289                        "3.0.2", SECURITY_CATEGORY, 2);
1290 
1291        private BooleanConnectionProperty useStreamLengthsInPrepStmts = new BooleanConnectionProperty(
1292                        "useStreamLengthsInPrepStmts",
1293                        true,
1294                        "Honor stream length parameter in "
1295                                        + "PreparedStatement/ResultSet.setXXXStream() method calls (true/false, defaults to 'true')?",
1296                        "3.0.2", MISC_CATEGORY, Integer.MIN_VALUE);
1297 
1298        private BooleanConnectionProperty useTimezone = new BooleanConnectionProperty(
1299                        "useTimezone",
1300                        false,
1301                        "Convert time/date types between client and server timezones (true/false, defaults to 'false')?",
1302                        "3.0.2", MISC_CATEGORY, Integer.MIN_VALUE);
1303 
1304        private BooleanConnectionProperty useUltraDevWorkAround = new BooleanConnectionProperty(
1305                        "ultraDevHack",
1306                        false,
1307                        "Create PreparedStatements for prepareCall() when required, because UltraDev "
1308                                        + " is broken and issues a prepareCall() for _all_ statements? (true/false, defaults to 'false')",
1309                        "2.0.3", MISC_CATEGORY, Integer.MIN_VALUE);
1310 
1311        private BooleanConnectionProperty useUnbufferedInput = new BooleanConnectionProperty(
1312                        "useUnbufferedInput", true,
1313                        "Don't use BufferedInputStream for reading data from the server",
1314                        "3.0.11", MISC_CATEGORY, Integer.MIN_VALUE);
1315 
1316        private BooleanConnectionProperty useUnicode = new BooleanConnectionProperty(
1317                        "useUnicode",
1318                        false,
1319                        "Should the driver use Unicode character encodings when handling strings? Should only be used when the driver can't determine the character set mapping, or you are trying to 'force' the driver to use a character set that MySQL either doesn't natively support (such as UTF-8), true/false, defaults to 'true'",
1320                        "1.1g", MISC_CATEGORY, 0);
1321 
1322        // Cache these values, they are 'hot'
1323        private boolean useUnicodeAsBoolean = true;
1324 
1325        private BooleanConnectionProperty useUsageAdvisor = new BooleanConnectionProperty(
1326                        "useUsageAdvisor",
1327                        false,
1328                        "Should the driver issue 'usage' warnings advising proper and efficient usage of JDBC and MySQL Connector/J to the log (true/false, defaults to 'false')?",
1329                        "3.1.1", DEBUGING_PROFILING_CATEGORY, 10);
1330 
1331        private boolean useUsageAdvisorAsBoolean = false;
1332 
1333        private BooleanConnectionProperty yearIsDateType = new BooleanConnectionProperty(
1334                        "yearIsDateType",
1335                        true,
1336                        "Should the JDBC driver treat the MySQL type \"YEAR\" as a java.sql.Date, or as a SHORT?",
1337                        "3.1.9", MISC_CATEGORY, Integer.MIN_VALUE);
1338 
1339        private StringConnectionProperty zeroDateTimeBehavior = new StringConnectionProperty(
1340                        "zeroDateTimeBehavior",
1341                        ZERO_DATETIME_BEHAVIOR_EXCEPTION,
1342                        new String[] { ZERO_DATETIME_BEHAVIOR_EXCEPTION,
1343                                        ZERO_DATETIME_BEHAVIOR_ROUND,
1344                                        ZERO_DATETIME_BEHAVIOR_CONVERT_TO_NULL },
1345                        "What should happen when the driver encounters DATETIME values that are composed "
1346                                        + "entirely of zeroes (used by MySQL to represent invalid dates)? "
1347                                        + "Valid values are '"
1348                                        + ZERO_DATETIME_BEHAVIOR_EXCEPTION
1349                                        + "', '"
1350                                        + ZERO_DATETIME_BEHAVIOR_ROUND
1351                                        + "' and '"
1352                                        + ZERO_DATETIME_BEHAVIOR_CONVERT_TO_NULL + "'.", "3.1.4",
1353                        MISC_CATEGORY, Integer.MIN_VALUE);
1354 
1355        protected DriverPropertyInfo[] exposeAsDriverPropertyInfoInternal(
1356                        Properties info, int slotsToReserve) throws SQLException {
1357                initializeProperties(info);
1358 
1359                int numProperties = PROPERTY_LIST.size();
1360 
1361                int listSize = numProperties + slotsToReserve;
1362 
1363                DriverPropertyInfo[] driverProperties = new DriverPropertyInfo[listSize];
1364 
1365                for (int i = slotsToReserve; i < listSize; i++) {
1366                        java.lang.reflect.Field propertyField = (java.lang.reflect.Field) PROPERTY_LIST
1367                                        .get(i - slotsToReserve);
1368 
1369                        try {
1370                                ConnectionProperty propToExpose = (ConnectionProperty) propertyField
1371                                                .get(this);
1372 
1373                                if (info != null) {
1374                                        propToExpose.initializeFrom(info);
1375                                }
1376 
1377                                propToExpose.syncDriverPropertyInfo();
1378                                driverProperties[i] = propToExpose;
1379                        } catch (IllegalAccessException iae) {
1380                                throw new SQLException("Internal properties failure",
1381                                                SQLError.SQL_STATE_GENERAL_ERROR);
1382                        }
1383                }
1384 
1385                return driverProperties;
1386        }
1387 
1388        protected Properties exposeAsProperties(Properties info)
1389                        throws SQLException {
1390                if (info == null) {
1391                        info = new Properties();
1392                }
1393 
1394                int numPropertiesToSet = PROPERTY_LIST.size();
1395 
1396                for (int i = 0; i < numPropertiesToSet; i++) {
1397                        java.lang.reflect.Field propertyField = (java.lang.reflect.Field) PROPERTY_LIST
1398                                        .get(i);
1399 
1400                        try {
1401                                ConnectionProperty propToGet = (ConnectionProperty) propertyField
1402                                                .get(this);
1403 
1404                                Object propValue = propToGet.getValueAsObject();
1405 
1406                                if (propValue != null) {
1407                                        info.setProperty(propToGet.getPropertyName(), propValue
1408                                                        .toString());
1409                                }
1410                        } catch (IllegalAccessException iae) {
1411                                throw new SQLException("Internal properties failure",
1412                                                SQLError.SQL_STATE_GENERAL_ERROR);
1413                        }
1414                }
1415 
1416                return info;
1417        }
1418 
1419        /**
1420         * Returns a description of the connection properties as an XML document.
1421         * 
1422         * @return the connection properties as an XML document.
1423         * @throws SQLException
1424         *             if an error occurs.
1425         */
1426        public String exposeAsXml() throws SQLException {
1427                StringBuffer xmlBuf = new StringBuffer();
1428                xmlBuf.append("<ConnectionProperties>");
1429 
1430                int numPropertiesToSet = PROPERTY_LIST.size();
1431 
1432                int numCategories = PROPERTY_CATEGORIES.length;
1433 
1434                Map propertyListByCategory = new HashMap();
1435 
1436                for (int i = 0; i < numCategories; i++) {
1437                        propertyListByCategory.put(PROPERTY_CATEGORIES[i], new Map[] {
1438                                        new TreeMap(), new TreeMap() });
1439                }
1440 
1441                //
1442                // The following properties are not exposed as 'normal' properties, but
1443                // they are
1444                // settable nonetheless, so we need to have them documented, make sure
1445                // that they sort 'first' as #1 and #2 in the category
1446                //
1447                StringConnectionProperty userProp = new StringConnectionProperty(
1448                                NonRegisteringDriver.USER_PROPERTY_KEY, null,
1449                                "The user to connect as", "all", CONNECTION_AND_AUTH_CATEGORY,
1450                                Integer.MIN_VALUE + 1);
1451                StringConnectionProperty passwordProp = new StringConnectionProperty(
1452                                NonRegisteringDriver.PASSWORD_PROPERTY_KEY, null,
1453                                "The password to use when connecting", "all",
1454                                CONNECTION_AND_AUTH_CATEGORY, Integer.MIN_VALUE + 2);
1455 
1456                Map[] connectionSortMaps = (Map[]) propertyListByCategory
1457                                .get(CONNECTION_AND_AUTH_CATEGORY);
1458                connectionSortMaps[0].put(new Integer(userProp.getOrder()), userProp);
1459                connectionSortMaps[0].put(new Integer(passwordProp.getOrder()),
1460                                passwordProp);
1461 
1462                try {
1463                        for (int i = 0; i < numPropertiesToSet; i++) {
1464                                java.lang.reflect.Field propertyField = (java.lang.reflect.Field) PROPERTY_LIST
1465                                                .get(i);
1466                                ConnectionProperty propToGet = (ConnectionProperty) propertyField
1467                                                .get(this);
1468                                Map[] sortMaps = (Map[]) propertyListByCategory.get(propToGet
1469                                                .getCategoryName());
1470                                int orderInCategory = propToGet.getOrder();
1471 
1472                                if (orderInCategory == Integer.MIN_VALUE) {
1473                                        sortMaps[1].put(propToGet.getPropertyName(), propToGet);
1474                                } else {
1475                                        sortMaps[0].put(new Integer(orderInCategory), propToGet);
1476                                }
1477                        }
1478 
1479                        for (int j = 0; j < numCategories; j++) {
1480                                Map[] sortMaps = (Map[]) propertyListByCategory
1481                                                .get(PROPERTY_CATEGORIES[j]);
1482                                Iterator orderedIter = sortMaps[0].values().iterator();
1483                                Iterator alphaIter = sortMaps[1].values().iterator();
1484 
1485                                xmlBuf.append("\n <PropertyCategory name=\"");
1486                                xmlBuf.append(PROPERTY_CATEGORIES[j]);
1487                                xmlBuf.append("\">");
1488 
1489                                while (orderedIter.hasNext()) {
1490                                        ConnectionProperty propToGet = (ConnectionProperty) orderedIter
1491                                                        .next();
1492                                        propToGet.syncDriverPropertyInfo();
1493 
1494                                        xmlBuf.append("\n  <Property name=\"");
1495                                        xmlBuf.append(propToGet.getPropertyName());
1496                                        xmlBuf.append("\" required=\"");
1497                                        xmlBuf.append(propToGet.required ? "Yes" : "No");
1498 
1499                                        xmlBuf.append("\" default=\"");
1500 
1501                                        if (propToGet.getDefaultValue() != null) {
1502                                                xmlBuf.append(propToGet.getDefaultValue());
1503                                        }
1504 
1505                                        xmlBuf.append("\" sortOrder=\"");
1506                                        xmlBuf.append(propToGet.getOrder());
1507                                        xmlBuf.append("\" since=\"");
1508                                        xmlBuf.append(propToGet.sinceVersion);
1509                                        xmlBuf.append("\">\n");
1510                                        xmlBuf.append("    ");
1511                                        xmlBuf.append(propToGet.description);
1512                                        xmlBuf.append("\n  </Property>");
1513                                }
1514 
1515                                while (alphaIter.hasNext()) {
1516                                        ConnectionProperty propToGet = (ConnectionProperty) alphaIter
1517                                                        .next();
1518                                        propToGet.syncDriverPropertyInfo();
1519 
1520                                        xmlBuf.append("\n  <Property name=\"");
1521                                        xmlBuf.append(propToGet.getPropertyName());
1522                                        xmlBuf.append("\" required=\"");
1523                                        xmlBuf.append(propToGet.required ? "Yes" : "No");
1524 
1525                                        xmlBuf.append("\" default=\"");
1526 
1527                                        if (propToGet.getDefaultValue() != null) {
1528                                                xmlBuf.append(propToGet.getDefaultValue());
1529                                        }
1530 
1531                                        xmlBuf.append("\" sortOrder=\"alpha\" since=\"");
1532                                        xmlBuf.append(propToGet.sinceVersion);
1533                                        xmlBuf.append("\">\n");
1534                                        xmlBuf.append("    ");
1535                                        xmlBuf.append(propToGet.description);
1536                                        xmlBuf.append("\n  </Property>");
1537                                }
1538 
1539                                xmlBuf.append("\n </PropertyCategory>");
1540                        }
1541                } catch (IllegalAccessException iae) {
1542                        throw new SQLException("Internal properties failure",
1543                                        SQLError.SQL_STATE_GENERAL_ERROR);
1544                }
1545 
1546                xmlBuf.append("\n</ConnectionProperties>");
1547 
1548                return xmlBuf.toString();
1549        }
1550 
1551        /**
1552         * DOCUMENT ME!
1553         * 
1554         * @return
1555         */
1556        public boolean getAllowLoadLocalInfile() {
1557                return this.allowLoadLocalInfile.getValueAsBoolean();
1558        }
1559 
1560        /**
1561         * DOCUMENT ME!
1562         * 
1563         * @return
1564         */
1565        public boolean getAllowMultiQueries() {
1566                return this.allowMultiQueries.getValueAsBoolean();
1567        }
1568 
1569        /**
1570         * @return Returns the allowNanAndInf.
1571         */
1572        protected boolean getAllowNanAndInf() {
1573                return allowNanAndInf.getValueAsBoolean();
1574        }
1575 
1576        /**
1577         * @return Returns the allowUrlInLocalInfile.
1578         */
1579        public boolean getAllowUrlInLocalInfile() {
1580                return this.allowUrlInLocalInfile.getValueAsBoolean();
1581        }
1582 
1583        /**
1584         * @return Returns the alwaysSendSetIsolation.
1585         */
1586        public boolean getAlwaysSendSetIsolation() {
1587                return this.alwaysSendSetIsolation.getValueAsBoolean();
1588        }
1589 
1590        /**
1591         * @return Returns the autoDeserialize.
1592         */
1593        public boolean getAutoDeserialize() {
1594                return autoDeserialize.getValueAsBoolean();
1595        }
1596 
1597        public boolean getAutoGenerateTestcaseScript() {
1598                return this.autoGenerateTestcaseScriptAsBoolean;
1599        }
1600 
1601        /**
1602         * DOCUMENT ME!
1603         * 
1604         * @return
1605         */
1606        public boolean getAutoReconnectForPools() {
1607                return this.autoReconnectForPoolsAsBoolean;
1608        }
1609 
1610        /**
1611         * @return Returns the blobSendChunkSize.
1612         */
1613        public int getBlobSendChunkSize() {
1614                return blobSendChunkSize.getValueAsInt();
1615        }
1616 
1617        /**
1618         * DOCUMENT ME!
1619         * 
1620         * @return Returns if cacheCallableStatements is enabled
1621         */
1622        public boolean getCacheCallableStatements() {
1623                return this.cacheCallableStatements.getValueAsBoolean();
1624        }
1625 
1626        /**
1627         * DOCUMENT ME!
1628         * 
1629         * @return Returns the cachePreparedStatements.
1630         */
1631        public boolean getCachePreparedStatements() {
1632                return ((Boolean) this.cachePreparedStatements.getValueAsObject())
1633                                .booleanValue();
1634        }
1635 
1636        /**
1637         * DOCUMENT ME!
1638         * 
1639         * @return DOCUMENT ME!
1640         */
1641        public boolean getCacheResultSetMetadata() {
1642                return this.cacheResultSetMetaDataAsBoolean;
1643        }
1644 
1645        /**
1646         * @return Returns the cacheServerConfiguration.
1647         */
1648        public boolean getCacheServerConfiguration() {
1649                return cacheServerConfiguration.getValueAsBoolean();
1650        }
1651 
1652        /**
1653         * DOCUMENT ME!
1654         * 
1655         * @return Returns the callableStatementCacheSize.
1656         */
1657        public int getCallableStatementCacheSize() {
1658                return this.callableStatementCacheSize.getValueAsInt();
1659        }
1660 
1661        /**
1662         * DOCUMENT ME!
1663         * 
1664         * @return
1665         */
1666        public boolean getCapitalizeTypeNames() {
1667                return this.capitalizeTypeNames.getValueAsBoolean();
1668        }
1669 
1670        /**
1671         * DOCUMENT ME!
1672         * 
1673         * @return Returns the characterSetResults.
1674         */
1675        public String getCharacterSetResults() {
1676                return this.characterSetResults.getValueAsString();
1677        }
1678 
1679        /**
1680         * DOCUMENT ME!
1681         * 
1682         * @return Returns the clobberStreamingResults.
1683         */
1684        public boolean getClobberStreamingResults() {
1685                return this.clobberStreamingResults.getValueAsBoolean();
1686        }
1687 
1688        /**
1689         * DOCUMENT ME!
1690         * 
1691         * @return Returns the connectionCollation.
1692         */
1693        public String getConnectionCollation() {
1694                return this.connectionCollation.getValueAsString();
1695        }
1696 
1697        /**
1698         * DOCUMENT ME!
1699         * 
1700         * @return
1701         */
1702        public int getConnectTimeout() {
1703                return this.connectTimeout.getValueAsInt();
1704        }
1705 
1706        /**
1707         * DOCUMENT ME!
1708         * 
1709         * @return
1710         */
1711        public boolean getContinueBatchOnError() {
1712                return this.continueBatchOnError.getValueAsBoolean();
1713        }
1714 
1715        public boolean getCreateDatabaseIfNotExist() {
1716                return this.createDatabaseIfNotExist.getValueAsBoolean();
1717        }
1718 
1719        /**
1720         * @return Returns the dontTrackOpenResources.
1721         */
1722        public boolean getDontTrackOpenResources() {
1723                return this.dontTrackOpenResources.getValueAsBoolean();
1724        }
1725 
1726        /**
1727         * DOCUMENT ME!
1728         * 
1729         * @return Returns the dumpQueriesOnException.
1730         */
1731        public boolean getDumpQueriesOnException() {
1732                return this.dumpQueriesOnException.getValueAsBoolean();
1733        }
1734 
1735        /**
1736         * @return Returns the dynamicCalendars.
1737         */
1738        public boolean getDynamicCalendars() {
1739                return this.dynamicCalendars.getValueAsBoolean();
1740        }
1741 
1742        /**
1743         * DOCUMENT ME!
1744         * 
1745         * @return Returns the elideSetAutoCommits.
1746         */
1747        public boolean getElideSetAutoCommits() {
1748                return this.elideSetAutoCommits.getValueAsBoolean();
1749        }
1750 
1751        public boolean getEmptyStringsConvertToZero() {
1752                return this.emptyStringsConvertToZero.getValueAsBoolean();
1753        }
1754 
1755        /**
1756         * DOCUMENT ME!
1757         * 
1758         * @return
1759         */
1760        public boolean getEmulateLocators() {
1761                return this.emulateLocators.getValueAsBoolean();
1762        }
1763 
1764        /**
1765         * @return Returns the emulateUnsupportedPstmts.
1766         */
1767        public boolean getEmulateUnsupportedPstmts() {
1768                return this.emulateUnsupportedPstmts.getValueAsBoolean();
1769        }
1770 
1771        /**
1772         * DOCUMENT ME!
1773         * 
1774         * @return Returns the enablePacketDebug.
1775         */
1776        public boolean getEnablePacketDebug() {
1777                return this.enablePacketDebug.getValueAsBoolean();
1778        }
1779 
1780        /**
1781         * DOCUMENT ME!
1782         * 
1783         * @return
1784         */
1785        protected String getEncoding() {
1786                return this.characterEncodingAsString;
1787        }
1788 
1789        /**
1790         * DOCUMENT ME!
1791         * 
1792         * @return Returns the explainSlowQueries.
1793         */
1794        public boolean getExplainSlowQueries() {
1795                return this.explainSlowQueries.getValueAsBoolean();
1796        }
1797 
1798        /**
1799         * DOCUMENT ME!
1800         * 
1801         * @return Returns the failOverReadOnly.
1802         */
1803        public boolean getFailOverReadOnly() {
1804                return this.failOverReadOnly.getValueAsBoolean();
1805        }
1806 
1807        /**
1808         * DOCUMENT ME!
1809         * 
1810         * @return Returns the gatherPerformanceMetrics.
1811         */
1812        public boolean getGatherPerformanceMetrics() {
1813                return this.gatherPerformanceMetrics.getValueAsBoolean();
1814        }
1815 
1816        /**
1817         * DOCUMENT ME!
1818         * 
1819         * @return
1820         */
1821        protected boolean getHighAvailability() {
1822                return this.highAvailabilityAsBoolean;
1823        }
1824 
1825        /**
1826         * @return Returns the holdResultsOpenOverStatementClose.
1827         */
1828        public boolean getHoldResultsOpenOverStatementClose() {
1829                return holdResultsOpenOverStatementClose.getValueAsBoolean();
1830        }
1831 
1832        /**
1833         * DOCUMENT ME!
1834         * 
1835         * @return
1836         */
1837        public boolean getIgnoreNonTxTables() {
1838                return this.ignoreNonTxTables.getValueAsBoolean();
1839        }
1840 
1841        /**
1842         * DOCUMENT ME!
1843         * 
1844         * @return
1845         */
1846        public int getInitialTimeout() {
1847                return this.initialTimeout.getValueAsInt();
1848        }
1849 
1850        /**
1851         * DOCUMENT ME!
1852         * 
1853         * @return
1854         */
1855        public boolean getInteractiveClient() {
1856                return this.isInteractiveClient.getValueAsBoolean();
1857        }
1858 
1859        /**
1860         * DOCUMENT ME!
1861         * 
1862         * @return Returns the isInteractiveClient.
1863         */
1864        public boolean getIsInteractiveClient() {
1865                return this.isInteractiveClient.getValueAsBoolean();
1866        }
1867 
1868        /**
1869         * DOCUMENT ME!
1870         * 
1871         * @return Returns the jdbcCompliantTruncation.
1872         */
1873        public boolean getJdbcCompliantTruncation() {
1874                return this.jdbcCompliantTruncation.getValueAsBoolean();
1875        }
1876 
1877        /**
1878         * DOCUMENT ME!
1879         * 
1880         * @return
1881         */
1882        public String getLogger() {
1883                return this.loggerClassName.getValueAsString();
1884        }
1885 
1886        /**
1887         * DOCUMENT ME!
1888         * 
1889         * @return Returns the loggerClassName.
1890         */
1891        public String getLoggerClassName() {
1892                return this.loggerClassName.getValueAsString();
1893        }
1894 
1895        /**
1896         * DOCUMENT ME!
1897         * 
1898         * @return Returns the logSlowQueries.
1899         */
1900        public boolean getLogSlowQueries() {
1901                return this.logSlowQueries.getValueAsBoolean();
1902        }
1903 
1904        public boolean getMaintainTimeStats() {
1905                return maintainTimeStatsAsBoolean;
1906        }
1907 
1908        /**
1909         * DOCUMENT ME!
1910         * 
1911         * @return Returns the maxQuerySizeToLog.
1912         */
1913        public int getMaxQuerySizeToLog() {
1914                return this.maxQuerySizeToLog.getValueAsInt();
1915        }
1916 
1917        /**
1918         * DOCUMENT ME!
1919         * 
1920         * @return
1921         */
1922        public int getMaxReconnects() {
1923                return this.maxReconnects.getValueAsInt();
1924        }
1925 
1926        /**
1927         * DOCUMENT ME!
1928         * 
1929         * @return
1930         */
1931        public int getMaxRows() {
1932                return this.maxRowsAsInt;
1933        }
1934 
1935        /**
1936         * Returns the number of queries that metadata can be cached if caching is
1937         * enabled.
1938         * 
1939         * @return the number of queries to cache metadata for.
1940         */
1941        public int getMetadataCacheSize() {
1942                return this.metadataCacheSize.getValueAsInt();
1943        }
1944 
1945        /**
1946         * @return Returns the noDatetimeStringSync.
1947         */
1948        public boolean getNoDatetimeStringSync() {
1949                return this.noDatetimeStringSync.getValueAsBoolean();
1950        }
1951 
1952        public boolean getNullCatalogMeansCurrent() {
1953                return this.nullCatalogMeansCurrent.getValueAsBoolean();
1954        }
1955 
1956        public boolean getNullNamePatternMatchesAll() {
1957                return this.nullNamePatternMatchesAll.getValueAsBoolean();
1958        }
1959 
1960        /**
1961         * DOCUMENT ME!
1962         * 
1963         * @return Returns the packetDebugBufferSize.
1964         */
1965        public int getPacketDebugBufferSize() {
1966                return this.packetDebugBufferSize.getValueAsInt();
1967        }
1968 
1969        /**
1970         * DOCUMENT ME!
1971         * 
1972         * @return
1973         */
1974        public boolean getParanoid() {
1975                return this.paranoid.getValueAsBoolean();
1976        }
1977 
1978        /**
1979         * DOCUMENT ME!
1980         * 
1981         * @return
1982         */
1983        public boolean getPedantic() {
1984                return this.pedantic.getValueAsBoolean();
1985        }
1986 
1987        /**
1988         * DOCUMENT ME!
1989         * 
1990         * @return Returns the preparedStatementCacheSize.
1991         */
1992        public int getPreparedStatementCacheSize() {
1993                return ((Integer) this.preparedStatementCacheSize.getValueAsObject())
1994                                .intValue();
1995        }
1996 
1997        /**
1998         * DOCUMENT ME!
1999         * 
2000         * @return Returns the preparedStatementCacheSqlLimit.
2001         */
2002        public int getPreparedStatementCacheSqlLimit() {
2003                return ((Integer) this.preparedStatementCacheSqlLimit
2004                                .getValueAsObject()).intValue();
2005        }
2006 
2007        /**
2008         * DOCUMENT ME!
2009         * 
2010         * @return
2011         */
2012        public boolean getProfileSql() {
2013                return this.profileSQLAsBoolean;
2014        }
2015 
2016        /**
2017         * DOCUMENT ME!
2018         * 
2019         * @return Returns the profileSQL flag
2020         */
2021        public boolean getProfileSQL() {
2022                return this.profileSQL.getValueAsBoolean();
2023        }
2024 
2025        /**
2026         * @return Returns the propertiesTransform.
2027         */
2028        public String getPropertiesTransform() {
2029                return this.propertiesTransform.getValueAsString();
2030        }
2031 
2032        /**
2033         * DOCUMENT ME!
2034         * 
2035         * @return
2036         */
2037        public int getQueriesBeforeRetryMaster() {
2038                return this.queriesBeforeRetryMaster.getValueAsInt();
2039        }
2040 
2041        /**
2042         * DOCUMENT ME!
2043         * 
2044         * @return
2045         */
2046        public boolean getReconnectAtTxEnd() {
2047                return this.reconnectTxAtEndAsBoolean;
2048        }
2049 
2050        /**
2051         * DOCUMENT ME!
2052         * 
2053         * @return
2054         */
2055        public boolean getRelaxAutoCommit() {
2056                return this.relaxAutoCommit.getValueAsBoolean();
2057        }
2058 
2059        /**
2060         * DOCUMENT ME!
2061         * 
2062         * @return Returns the reportMetricsIntervalMillis.
2063         */
2064        public int getReportMetricsIntervalMillis() {
2065                return this.reportMetricsIntervalMillis.getValueAsInt();
2066        }
2067 
2068        /**
2069         * DOCUMENT ME!
2070         * 
2071         * @return
2072         */
2073        public boolean getRequireSSL() {
2074                return this.requireSSL.getValueAsBoolean();
2075        }
2076 
2077        protected boolean getRetainStatementAfterResultSetClose() {
2078                return this.retainStatementAfterResultSetClose.getValueAsBoolean();
2079        }
2080 
2081        /**
2082         * @return Returns the rollbackOnPooledClose.
2083         */
2084        public boolean getRollbackOnPooledClose() {
2085                return this.rollbackOnPooledClose.getValueAsBoolean();
2086        }
2087 
2088        /**
2089         * Returns whether or not hosts will be picked in a round-robin fashion.
2090         * 
2091         * @return Returns the roundRobinLoadBalance property.
2092         */
2093        public boolean getRoundRobinLoadBalance() {
2094                return this.roundRobinLoadBalance.getValueAsBoolean();
2095        }
2096 
2097        /**
2098         * @return Returns the runningCTS13.
2099         */
2100        public boolean getRunningCTS13() {
2101                return this.runningCTS13.getValueAsBoolean();
2102        }
2103 
2104        /**
2105         * DOCUMENT ME!
2106         * 
2107         * @return
2108         */
2109        public int getSecondsBeforeRetryMaster() {
2110                return this.secondsBeforeRetryMaster.getValueAsInt();
2111        }
2112 
2113        /**
2114         * Returns the 'serverTimezone' property.
2115         * 
2116         * @return the configured server timezone property.
2117         */
2118        public String getServerTimezone() {
2119                return this.serverTimezone.getValueAsString();
2120        }
2121 
2122        /**
2123         * @return Returns the sessionVariables.
2124         */
2125        public String getSessionVariables() {
2126                return sessionVariables.getValueAsString();
2127        }
2128 
2129        /**
2130         * DOCUMENT ME!
2131         * 
2132         * @return Returns the slowQueryThresholdMillis.
2133         */
2134        public int getSlowQueryThresholdMillis() {
2135                return this.slowQueryThresholdMillis.getValueAsInt();
2136        }
2137 
2138        /**
2139         * DOCUMENT ME!
2140         * 
2141         * @return
2142         */
2143        public String getSocketFactoryClassName() {
2144                return this.socketFactoryClassName.getValueAsString();
2145        }
2146 
2147        /**
2148         * DOCUMENT ME!
2149         * 
2150         * @return
2151         */
2152        public int getSocketTimeout() {
2153                return this.socketTimeout.getValueAsInt();
2154        }
2155 
2156        /**
2157         * DOCUMENT ME!
2158         * 
2159         * @return
2160         */
2161        public boolean getStrictFloatingPoint() {
2162                return this.strictFloatingPoint.getValueAsBoolean();
2163        }
2164 
2165        /**
2166         * DOCUMENT ME!
2167         * 
2168         * @return
2169         */
2170        public boolean getStrictUpdates() {
2171                return this.strictUpdates.getValueAsBoolean();
2172        }
2173 
2174        /**
2175         * @return Returns the tinyInt1isBit.
2176         */
2177        public boolean getTinyInt1isBit() {
2178                return this.tinyInt1isBit.getValueAsBoolean();
2179        }
2180 
2181        /**
2182         * DOCUMENT ME!
2183         * 
2184         * @return Returns the logProtocol.
2185         */
2186        public boolean getTraceProtocol() {
2187                return this.traceProtocol.getValueAsBoolean();
2188        }
2189 
2190        public boolean getTransformedBitIsBoolean() {
2191                return this.transformedBitIsBoolean.getValueAsBoolean();
2192        }
2193 
2194        /**
2195         * DOCUMENT ME!
2196         * 
2197         * @return
2198         */
2199        public boolean getUseCompression() {
2200                return this.useCompression.getValueAsBoolean();
2201        }
2202 
2203        /**
2204         * @return Returns the useFastIntParsing.
2205         */
2206        public boolean getUseFastIntParsing() {
2207                return this.useFastIntParsing.getValueAsBoolean();
2208        }
2209 
2210        /**
2211         * DOCUMENT ME!
2212         * 
2213         * @return
2214         */
2215        public boolean getUseHostsInPrivileges() {
2216                return this.useHostsInPrivileges.getValueAsBoolean();
2217        }
2218 
2219        /**
2220         * @return Returns the useLocalSessionState.
2221         */
2222        public boolean getUseLocalSessionState() {
2223                return this.useLocalSessionState.getValueAsBoolean();
2224        }
2225 
2226        /**
2227         * DOCUMENT ME!
2228         * 
2229         * @return
2230         */
2231        public boolean getUseNewIo() {
2232                return this.useNewIo.getValueAsBoolean();
2233        }
2234 
2235        /**
2236         * @return Returns the useOldUTF8Behavior.
2237         */
2238        public boolean getUseOldUTF8Behavior() {
2239                return this.useOldUTF8BehaviorAsBoolean;
2240        }
2241 
2242        /**
2243         * @return Returns the useOnlyServerErrorMessages.
2244         */
2245        public boolean getUseOnlyServerErrorMessages() {
2246                return this.useOnlyServerErrorMessages.getValueAsBoolean();
2247        }
2248 
2249        /**
2250         * @return Returns the useReadAheadInput.
2251         */
2252        public boolean getUseReadAheadInput() {
2253                return this.useReadAheadInput.getValueAsBoolean();
2254        }
2255 
2256        /**
2257         * DOCUMENT ME!
2258         * 
2259         * @return
2260         */
2261        public boolean getUseServerPreparedStmts() {
2262                return this.detectServerPreparedStmts.getValueAsBoolean();
2263        }
2264 
2265        /**
2266         * DOCUMENT ME!
2267         * 
2268         * @return Returns the useSqlStateCodes state.
2269         */
2270        public boolean getUseSqlStateCodes() {
2271                return this.useSqlStateCodes.getValueAsBoolean();
2272        }
2273 
2274        /**
2275         * DOCUMENT ME!
2276         * 
2277         * @return
2278         */
2279        public boolean getUseSSL() {
2280                return this.useSSL.getValueAsBoolean();
2281        }
2282 
2283        /**
2284         * DOCUMENT ME!
2285         * 
2286         * @return
2287         */
2288        public boolean getUseStreamLengthsInPrepStmts() {
2289                return this.useStreamLengthsInPrepStmts.getValueAsBoolean();
2290        }
2291 
2292        /**
2293         * DOCUMENT ME!
2294         * 
2295         * @return
2296         */
2297        public boolean getUseTimezone() {
2298                return this.useTimezone.getValueAsBoolean();
2299        }
2300 
2301        /**
2302         * DOCUMENT ME!
2303         * 
2304         * @return
2305         */
2306        public boolean getUseUltraDevWorkAround() {
2307                return this.useUltraDevWorkAround.getValueAsBoolean();
2308        }
2309 
2310        /**
2311         * DOCUMENT ME!
2312         * 
2313         * @return Returns the useUnbufferedInput.
2314         */
2315        public boolean getUseUnbufferedInput() {
2316                return this.useUnbufferedInput.getValueAsBoolean();
2317        }
2318 
2319        /**
2320         * DOCUMENT ME!
2321         * 
2322         * @return
2323         */
2324        public boolean getUseUnicode() {
2325                return this.useUnicodeAsBoolean;
2326        }
2327 
2328        /**
2329         * Returns whether or not the driver advises of proper usage.
2330         * 
2331         * @return the value of useUsageAdvisor
2332         */
2333        public boolean getUseUsageAdvisor() {
2334                return this.useUsageAdvisorAsBoolean;
2335        }
2336 
2337        public boolean getYearIsDateType() {
2338                return this.yearIsDateType.getValueAsBoolean();
2339        }
2340 
2341        /**
2342         * @return Returns the zeroDateTimeBehavior.
2343         */
2344        public String getZeroDateTimeBehavior() {
2345                return this.zeroDateTimeBehavior.getValueAsString();
2346        }
2347 
2348        /**
2349         * Initializes driver properties that come from a JNDI reference (in the
2350         * case of a javax.sql.DataSource bound into some name service that doesn't
2351         * handle Java objects directly).
2352         * 
2353         * @param ref
2354         *            The JNDI Reference that holds RefAddrs for all properties
2355         * @throws SQLException
2356         *             DOCUMENT ME!
2357         */
2358        protected void initializeFromRef(Reference ref) throws SQLException {
2359                int numPropertiesToSet = PROPERTY_LIST.size();
2360 
2361                for (int i = 0; i < numPropertiesToSet; i++) {
2362                        java.lang.reflect.Field propertyField = (java.lang.reflect.Field) PROPERTY_LIST
2363                                        .get(i);
2364 
2365                        try {
2366                                ConnectionProperty propToSet = (ConnectionProperty) propertyField
2367                                                .get(this);
2368 
2369                                if (ref != null) {
2370                                        propToSet.initializeFrom(ref);
2371                                }
2372                        } catch (IllegalAccessException iae) {
2373                                throw new SQLException("Internal properties failure",
2374                                                SQLError.SQL_STATE_GENERAL_ERROR);
2375                        }
2376                }
2377 
2378                postInitialization();
2379        }
2380 
2381        /**
2382         * Initializes driver properties that come from URL or properties passed to
2383         * the driver manager.
2384         * 
2385         * @param info
2386         *            DOCUMENT ME!
2387         * @throws SQLException
2388         *             DOCUMENT ME!
2389         */
2390        protected void initializeProperties(Properties info) throws SQLException {
2391                if (info != null) {
2392                        // For backwards-compatibility
2393                        String profileSqlLc = info.getProperty("profileSql");
2394 
2395                        if (profileSqlLc != null) {
2396                                info.put("profileSQL", profileSqlLc);
2397                        }
2398 
2399                        Properties infoCopy = (Properties) info.clone();
2400 
2401                        infoCopy.remove(NonRegisteringDriver.HOST_PROPERTY_KEY);
2402                        infoCopy.remove(NonRegisteringDriver.USER_PROPERTY_KEY);
2403                        infoCopy.remove(NonRegisteringDriver.PASSWORD_PROPERTY_KEY);
2404                        infoCopy.remove(NonRegisteringDriver.DBNAME_PROPERTY_KEY);
2405                        infoCopy.remove(NonRegisteringDriver.PORT_PROPERTY_KEY);
2406                        infoCopy.remove("profileSql");
2407 
2408                        int numPropertiesToSet = PROPERTY_LIST.size();
2409 
2410                        for (int i = 0; i < numPropertiesToSet; i++) {
2411                                java.lang.reflect.Field propertyField = (java.lang.reflect.Field) PROPERTY_LIST
2412                                                .get(i);
2413 
2414                                try {
2415                                        ConnectionProperty propToSet = (ConnectionProperty) propertyField
2416                                                        .get(this);
2417 
2418                                        propToSet.initializeFrom(infoCopy);
2419                                } catch (IllegalAccessException iae) {
2420                                        throw new SQLException(
2421                                                        "Unable to initialize driver properties due to "
2422                                                                        + iae.toString(),
2423                                                        SQLError.SQL_STATE_GENERAL_ERROR);
2424                                }
2425                        }
2426 
2427                        // TODO -- Not yet
2428                        /*
2429                         * int numUnknownProperties = infoCopy.size(); if
2430                         * (numUnknownProperties > 0) { StringBuffer errorMessageBuf = new
2431                         * StringBuffer( "Unknown connection ");
2432                         * errorMessageBuf.append((numUnknownProperties == 1) ? "property " :
2433                         * "properties "); Iterator propNamesItor =
2434                         * infoCopy.keySet().iterator(); errorMessageBuf.append("'");
2435                         * errorMessageBuf.append(propNamesItor.next().toString());
2436                         * errorMessageBuf.append("'"); while (propNamesItor.hasNext()) {
2437                         * errorMessageBuf.append(", '");
2438                         * errorMessageBuf.append(propNamesItor.next().toString());
2439                         * errorMessageBuf.append("'"); } throw new
2440                         * SQLException(errorMessageBuf.toString(),
2441                         * SQLError.SQL_STATE_INVALID_CONNECTION_ATTRIBUTE); }
2442                         */
2443                        postInitialization();
2444                }
2445        }
2446 
2447        protected void postInitialization() throws SQLException {
2448                //
2449                // Configure logger If the value has been set by the user, then use
2450                // that, otherwise, autodetect it : JDK1.4 logging, 
2451                // Then fallback to our STDERR logging.
2452                //
2453 
2454                //
2455                // Yes, this looks goofy (String == instead of .equals),
2456                // but it's how we tell whether we're using defaults
2457                // or not, and it survives JNDI/Properties initialization, etc.
2458                //
2459                
2460                if (getLogger() == STANDARD_LOGGER_NAME) {
2461                        String environmentLoggerName = null;
2462 
2463                        try {
2464                                environmentLoggerName = System
2465                                                .getProperty("com.mysql.jdbc.logger");
2466                        } catch (Throwable noAccessToSystemProperties) {
2467                                environmentLoggerName = null;
2468                        }
2469 
2470                        if (environmentLoggerName != null) {
2471                                setLogger(environmentLoggerName);
2472                        } else {
2473                                try {
2474                                        // Are we running on JDK-1.4?
2475                                        Class.forName("java.util.logging.Level");
2476                                        setLogger(Jdk14Logger.class.getName());
2477                                } catch (Throwable t2) {
2478                                        // guess not
2479                                        setLogger(STANDARD_LOGGER_NAME);
2480                                }
2481                        }
2482                }
2483 
2484                // Support 'old' profileSql capitalization
2485                if (this.profileSql.getValueAsObject() != null) {
2486                        this.profileSQL.initializeFrom(this.profileSql.getValueAsObject()
2487                                        .toString());
2488                }
2489 
2490                this.reconnectTxAtEndAsBoolean = ((Boolean) this.reconnectAtTxEnd
2491                                .getValueAsObject()).booleanValue();
2492 
2493                // Adjust max rows
2494                if (this.getMaxRows() == 0) {
2495                        // adjust so that it will become MysqlDefs.MAX_ROWS
2496                        // in execSQL()
2497                        this.maxRows.setValueAsObject(new Integer(-1));
2498                }
2499 
2500                //
2501                // Check character encoding
2502                //
2503                String testEncoding = this.getEncoding();
2504 
2505                if (testEncoding != null) {
2506                        // Attempt to use the encoding, and bail out if it
2507                        // can't be used
2508                        try {
2509                                String testString = "abc";
2510                                testString.getBytes(testEncoding);
2511                        } catch (UnsupportedEncodingException UE) {
2512                                throw new SQLException("Unsupported character " + "encoding '"
2513                                                + testEncoding + "'.", "0S100");
2514                        }
2515                }
2516 
2517                // Metadata caching is only supported on JDK-1.4 and newer
2518                // because it relies on LinkedHashMap being present.
2519                // Check (and disable) if not supported
2520                if (((Boolean) this.cacheResultSetMetadata.getValueAsObject())
2521                                .booleanValue()) {
2522                        try {
2523                                Class.forName("java.util.LinkedHashMap");
2524                        } catch (ClassNotFoundException cnfe) {
2525                                this.cacheResultSetMetadata.setValue(false);
2526                        }
2527                }
2528 
2529                this.cacheResultSetMetaDataAsBoolean = this.cacheResultSetMetadata
2530                                .getValueAsBoolean();
2531                this.useUnicodeAsBoolean = this.useUnicode.getValueAsBoolean();
2532                this.characterEncodingAsString = ((String) this.characterEncoding
2533                                .getValueAsObject());
2534                this.highAvailabilityAsBoolean = this.autoReconnect.getValueAsBoolean();
2535                this.autoReconnectForPoolsAsBoolean = this.autoReconnectForPools
2536                                .getValueAsBoolean();
2537                this.maxRowsAsInt = ((Integer) this.maxRows.getValueAsObject())
2538                                .intValue();
2539                this.profileSQLAsBoolean = this.profileSQL.getValueAsBoolean();
2540                this.useUsageAdvisorAsBoolean = this.useUsageAdvisor
2541                                .getValueAsBoolean();
2542                this.useOldUTF8BehaviorAsBoolean = this.useOldUTF8Behavior
2543                                .getValueAsBoolean();
2544                this.autoGenerateTestcaseScriptAsBoolean = this.autoGenerateTestcaseScript
2545                                .getValueAsBoolean();
2546                this.maintainTimeStatsAsBoolean = this.maintainTimeStats
2547                                .getValueAsBoolean();
2548                this.jdbcCompliantTruncationForReads = getJdbcCompliantTruncation();
2549        }
2550 
2551        /**
2552         * DOCUMENT ME!
2553         * 
2554         * @param property
2555         */
2556        public void setAllowLoadLocalInfile(boolean property) {
2557                this.allowLoadLocalInfile.setValue(property);
2558        }
2559 
2560        /**
2561         * DOCUMENT ME!
2562         * 
2563         * @param property
2564         */
2565        public void setAllowMultiQueries(boolean property) {
2566                this.allowMultiQueries.setValue(property);
2567        }
2568 
2569        /**
2570         * @param allowNanAndInf
2571         *            The allowNanAndInf to set.
2572         */
2573        protected void setAllowNanAndInf(boolean flag) {
2574                this.allowNanAndInf.setValue(flag);
2575        }
2576 
2577        /**
2578         * @param allowUrlInLocalInfile
2579         *            The allowUrlInLocalInfile to set.
2580         */
2581        public void setAllowUrlInLocalInfile(boolean flag) {
2582                this.allowUrlInLocalInfile.setValue(flag);
2583        }
2584 
2585        /**
2586         * @param alwaysSendSetIsolation
2587         *            The alwaysSendSetIsolation to set.
2588         */
2589        public void setAlwaysSendSetIsolation(boolean flag) {
2590                this.alwaysSendSetIsolation.setValue(flag);
2591        }
2592 
2593        /**
2594         * @param autoDeserialize
2595         *            The autoDeserialize to set.
2596         */
2597        public void setAutoDeserialize(boolean flag) {
2598                this.autoDeserialize.setValue(flag);
2599        }
2600 
2601        public void setAutoGenerateTestcaseScript(boolean flag) {
2602                this.autoGenerateTestcaseScript.setValue(flag);
2603                this.autoGenerateTestcaseScriptAsBoolean = this.autoGenerateTestcaseScript
2604                                .getValueAsBoolean();
2605        }
2606 
2607        /**
2608         * DOCUMENT ME!
2609         * 
2610         * @param flag
2611         *            The autoReconnect to set.
2612         */
2613        public void setAutoReconnect(boolean flag) {
2614                this.autoReconnect.setValue(flag);
2615        }
2616 
2617        /**
2618         * DOCUMENT ME!
2619         * 
2620         * @param property
2621         */
2622        public void setAutoReconnectForConnectionPools(boolean property) {
2623                this.autoReconnectForPools.setValue(property);
2624                this.autoReconnectForPoolsAsBoolean = this.autoReconnectForPools
2625                                .getValueAsBoolean();
2626        }
2627 
2628        /**
2629         * DOCUMENT ME!
2630         * 
2631         * @param flag
2632         *            The autoReconnectForPools to set.
2633         */
2634        public void setAutoReconnectForPools(boolean flag) {
2635                this.autoReconnectForPools.setValue(flag);
2636        }
2637 
2638        /**
2639         * @param blobSendChunkSize
2640         *            The blobSendChunkSize to set.
2641         */
2642        public void setBlobSendChunkSize(String value) throws SQLException {
2643                this.blobSendChunkSize.setValue(value);
2644        }
2645 
2646        /**
2647         * DOCUMENT ME!
2648         * 
2649         * @param flag
2650         *            The cacheCallableStatements to set.
2651         */
2652        public void setCacheCallableStatements(boolean flag) {
2653                this.cacheCallableStatements.setValue(flag);
2654        }
2655 
2656        /**
2657         * DOCUMENT ME!
2658         * 
2659         * @param flag
2660         *            The cachePreparedStatements to set.
2661         */
2662        public void setCachePreparedStatements(boolean flag) {
2663                this.cachePreparedStatements.setValue(flag);
2664        }
2665 
2666        /**
2667         * Sets whether or not we should cache result set metadata.
2668         * 
2669         * @param property
2670         */
2671        public void setCacheResultSetMetadata(boolean property) {
2672                this.cacheResultSetMetadata.setValue(property);
2673                this.cacheResultSetMetaDataAsBoolean = this.cacheResultSetMetadata
2674                                .getValueAsBoolean();
2675        }
2676 
2677        /**
2678         * @param cacheServerConfiguration
2679         *            The cacheServerConfiguration to set.
2680         */
2681        public void setCacheServerConfiguration(boolean flag) {
2682                this.cacheServerConfiguration.setValue(flag);
2683        }
2684 
2685        /**
2686         * Configures the number of callable statements to cache. (this is
2687         * configurable during the life of the connection).
2688         * 
2689         * @param size
2690         *            The callableStatementCacheSize to set.
2691         */
2692        public void setCallableStatementCacheSize(int size) {
2693                this.callableStatementCacheSize.setValue(size);
2694        }
2695 
2696        /**
2697         * DOCUMENT ME!
2698         * 
2699         * @param property
2700         */
2701        public void setCapitalizeDBMDTypes(boolean property) {
2702                this.capitalizeTypeNames.setValue(property);
2703        }
2704 
2705        /**
2706         * DOCUMENT ME!
2707         * 
2708         * @param flag
2709         *            The capitalizeTypeNames to set.
2710         */
2711        public void setCapitalizeTypeNames(boolean flag) {
2712                this.capitalizeTypeNames.setValue(flag);
2713        }
2714 
2715        /**
2716         * DOCUMENT ME!
2717         * 
2718         * @param encoding
2719         *            The characterEncoding to set.
2720         */
2721        public void setCharacterEncoding(String encoding) {
2722                this.characterEncoding.setValue(encoding);
2723        }
2724 
2725        /**
2726         * DOCUMENT ME!
2727         * 
2728         * @param characterSet
2729         *            The characterSetResults to set.
2730         */
2731        public void setCharacterSetResults(String characterSet) {
2732                this.characterSetResults.setValue(characterSet);
2733        }
2734 
2735        /**
2736         * DOCUMENT ME!
2737         * 
2738         * @param flag
2739         *            The clobberStreamingResults to set.
2740         */
2741        public void setClobberStreamingResults(boolean flag) {
2742                this.clobberStreamingResults.setValue(flag);
2743        }
2744 
2745        /**
2746         * DOCUMENT ME!
2747         * 
2748         * @param collation
2749         *            The connectionCollation to set.
2750         */
2751        public void setConnectionCollation(String collation) {
2752                this.connectionCollation.setValue(collation);
2753        }
2754 
2755        /**
2756         * DOCUMENT ME!
2757         * 
2758         * @param timeoutMs
2759         */
2760        public void setConnectTimeout(int timeoutMs) {
2761                this.connectTimeout.setValue(timeoutMs);
2762        }
2763 
2764        /**
2765         * DOCUMENT ME!
2766         * 
2767         * @param property
2768         */
2769        public void setContinueBatchOnError(boolean property) {
2770                this.continueBatchOnError.setValue(property);
2771        }
2772 
2773        public void setCreateDatabaseIfNotExist(boolean flag) {
2774                this.createDatabaseIfNotExist.setValue(flag);
2775        }
2776 
2777        /**
2778         * DOCUMENT ME!
2779         * 
2780         * @param property
2781         */
2782        public void setDetectServerPreparedStmts(boolean property) {
2783                this.detectServerPreparedStmts.setValue(property);
2784        }
2785 
2786        /**
2787         * @param dontTrackOpenResources
2788         *            The dontTrackOpenResources to set.
2789         */
2790        public void setDontTrackOpenResources(boolean flag) {
2791                this.dontTrackOpenResources.setValue(flag);
2792        }
2793 
2794        /**
2795         * DOCUMENT ME!
2796         * 
2797         * @param flag
2798         *            The dumpQueriesOnException to set.
2799         */
2800        public void setDumpQueriesOnException(boolean flag) {
2801                this.dumpQueriesOnException.setValue(flag);
2802        }
2803 
2804        /**
2805         * @param dynamicCalendars
2806         *            The dynamicCalendars to set.
2807         */
2808        public void setDynamicCalendars(boolean flag) {
2809                this.dynamicCalendars.setValue(flag);
2810        }
2811 
2812        /**
2813         * DOCUMENT ME!
2814         * 
2815         * @param flag
2816         *            The elideSetAutoCommits to set.
2817         */
2818        public void setElideSetAutoCommits(boolean flag) {
2819                this.elideSetAutoCommits.setValue(flag);
2820        }
2821 
2822        public void setEmptyStringsConvertToZero(boolean flag) {
2823                this.emptyStringsConvertToZero.setValue(flag);
2824        }
2825 
2826        /**
2827         * DOCUMENT ME!
2828         * 
2829         * @param property
2830         */
2831        public void setEmulateLocators(boolean property) {
2832                this.emulateLocators.setValue(property);
2833        }
2834 
2835        /**
2836         * @param emulateUnsupportedPstmts
2837         *            The emulateUnsupportedPstmts to set.
2838         */
2839        public void setEmulateUnsupportedPstmts(boolean flag) {
2840                this.emulateUnsupportedPstmts.setValue(flag);
2841        }
2842 
2843        /**
2844         * DOCUMENT ME!
2845         * 
2846         * @param flag
2847         *            The enablePacketDebug to set.
2848         */
2849        public void setEnablePacketDebug(boolean flag) {
2850                this.enablePacketDebug.setValue(flag);
2851        }
2852 
2853        /**
2854         * DOCUMENT ME!
2855         * 
2856         * @param property
2857         */
2858        public void setEncoding(String property) {
2859                this.characterEncoding.setValue(property);
2860                this.characterEncodingAsString = this.characterEncoding
2861                                .getValueAsString();
2862        }
2863 
2864        /**
2865         * DOCUMENT ME!
2866         * 
2867         * @param flag
2868         *            The explainSlowQueries to set.
2869         */
2870        public void setExplainSlowQueries(boolean flag) {
2871                this.explainSlowQueries.setValue(flag);
2872        }
2873 
2874        /**
2875         * DOCUMENT ME!
2876         * 
2877         * @param flag
2878         *            The failOverReadOnly to set.
2879         */
2880        public void setFailOverReadOnly(boolean flag) {
2881                this.failOverReadOnly.setValue(flag);
2882        }
2883 
2884        /**
2885         * DOCUMENT ME!
2886         * 
2887         * @param flag
2888         *            The gatherPerformanceMetrics to set.
2889         */
2890        public void setGatherPerformanceMetrics(boolean flag) {
2891                this.gatherPerformanceMetrics.setValue(flag);
2892        }
2893 
2894        /**
2895         * DOCUMENT ME!
2896         * 
2897         * @param property
2898         */
2899        protected void setHighAvailability(boolean property) {
2900                this.autoReconnect.setValue(property);
2901                this.highAvailabilityAsBoolean = this.autoReconnect.getValueAsBoolean();
2902        }
2903 
2904        /**
2905         * @param holdResultsOpenOverStatementClose
2906         *            The holdResultsOpenOverStatementClose to set.
2907         */
2908        public void setHoldResultsOpenOverStatementClose(boolean flag) {
2909                this.holdResultsOpenOverStatementClose.setValue(flag);
2910        }
2911 
2912        /**
2913         * DOCUMENT ME!
2914         * 
2915         * @param property
2916         */
2917        public void setIgnoreNonTxTables(boolean property) {
2918                this.ignoreNonTxTables.setValue(property);
2919        }
2920 
2921        /**
2922         * DOCUMENT ME!
2923         * 
2924         * @param property
2925         */
2926        public void setInitialTimeout(int property) {
2927                this.initialTimeout.setValue(property);
2928        }
2929 
2930        /**
2931         * DOCUMENT ME!
2932         * 
2933         * @param property
2934         */
2935        public void setIsInteractiveClient(boolean property) {
2936                this.isInteractiveClient.setValue(property);
2937        }
2938 
2939        /**
2940         * DOCUMENT ME!
2941         * 
2942         * @param flag
2943         *            The jdbcCompliantTruncation to set.
2944         */
2945        public void setJdbcCompliantTruncation(boolean flag) {
2946                this.jdbcCompliantTruncation.setValue(flag);
2947                setJdbcCompliantTruncationForReads(flag);
2948        }
2949 
2950        /**
2951         * DOCUMENT ME!
2952         * 
2953         * @param property
2954         */
2955        public void setLogger(String property) {
2956                this.loggerClassName.setValueAsObject(property);
2957        }
2958 
2959        /**
2960         * DOCUMENT ME!
2961         * 
2962         * @param className
2963         *            The loggerClassName to set.
2964         */
2965        public void setLoggerClassName(String className) {
2966                this.loggerClassName.setValue(className);
2967        }
2968 
2969        /**
2970         * DOCUMENT ME!
2971         * 
2972         * @param flag
2973         *            The logSlowQueries to set.
2974         */
2975        public void setLogSlowQueries(boolean flag) {
2976                this.logSlowQueries.setValue(flag);
2977        }
2978 
2979        public void setMaintainTimeStats(boolean flag) {
2980                this.maintainTimeStats.setValue(flag);
2981                this.maintainTimeStatsAsBoolean = this.maintainTimeStats
2982                                .getValueAsBoolean();
2983        }
2984 
2985        /**
2986         * DOCUMENT ME!
2987         * 
2988         * @param sizeInBytes
2989         *            The maxQuerySizeToLog to set.
2990         */
2991        public void setMaxQuerySizeToLog(int sizeInBytes) {
2992                this.maxQuerySizeToLog.setValue(sizeInBytes);
2993        }
2994 
2995        /**
2996         * DOCUMENT ME!
2997         * 
2998         * @param property
2999         */
3000        public void setMaxReconnects(int property) {
3001                this.maxReconnects.setValue(property);
3002        }
3003 
3004        /**
3005         * DOCUMENT ME!
3006         * 
3007         * @param property
3008         */
3009        public void setMaxRows(int property) {
3010                this.maxRows.setValue(property);
3011                this.maxRowsAsInt = this.maxRows.getValueAsInt();
3012        }
3013 
3014        /**
3015         * Sets the number of queries that metadata can be cached if caching is
3016         * enabled.
3017         * 
3018         * @param value
3019         *            the number of queries to cache metadata for.
3020         */
3021        public void setMetadataCacheSize(int value) {
3022                this.metadataCacheSize.setValue(value);
3023        }
3024 
3025        /**
3026         * @param noDatetimeStringSync
3027         *            The noDatetimeStringSync to set.
3028         */
3029        public void setNoDatetimeStringSync(boolean flag) {
3030                this.noDatetimeStringSync.setValue(flag);
3031        }
3032 
3033        public void setNullCatalogMeansCurrent(boolean value) {
3034                this.nullCatalogMeansCurrent.setValue(value);
3035        }
3036 
3037        public void setNullNamePatternMatchesAll(boolean value) {
3038                this.nullNamePatternMatchesAll.setValue(value);
3039        }
3040 
3041        /**
3042         * DOCUMENT ME!
3043         * 
3044         * @param size
3045         *            The packetDebugBufferSize to set.
3046         */
3047        public void setPacketDebugBufferSize(int size) {
3048                this.packetDebugBufferSize.setValue(size);
3049        }
3050 
3051        /**
3052         * DOCUMENT ME!
3053         * 
3054         * @param property
3055         */
3056        public void setParanoid(boolean property) {
3057                this.paranoid.setValue(property);
3058        }
3059 
3060        /**
3061         * DOCUMENT ME!
3062         * 
3063         * @param property
3064         */
3065        public void setPedantic(boolean property) {
3066                this.pedantic.setValue(property);
3067        }
3068 
3069        /**
3070         * DOCUMENT ME!
3071         * 
3072         * @param cacheSize
3073         *            The preparedStatementCacheSize to set.
3074         */
3075        public void setPreparedStatementCacheSize(int cacheSize) {
3076                this.preparedStatementCacheSize.setValue(cacheSize);
3077        }
3078 
3079        /**
3080         * DOCUMENT ME!
3081         * 
3082         * @param cacheSqlLimit
3083         *            The preparedStatementCacheSqlLimit to set.
3084         */
3085        public void setPreparedStatementCacheSqlLimit(int cacheSqlLimit) {
3086                this.preparedStatementCacheSqlLimit.setValue(cacheSqlLimit);
3087        }
3088 
3089        /**
3090         * DOCUMENT ME!
3091         * 
3092         * @param property
3093         */
3094        public void setProfileSql(boolean property) {
3095                this.profileSQL.setValue(property);
3096                this.profileSQLAsBoolean = this.profileSQL.getValueAsBoolean();
3097        }
3098 
3099        /**
3100         * DOCUMENT ME!
3101         * 
3102         * @param flag
3103         *            The profileSQL to set.
3104         */
3105        public void setProfileSQL(boolean flag) {
3106                this.profileSQL.setValue(flag);
3107        }
3108 
3109        /**
3110         * @param propertiesTransform
3111         *            The propertiesTransform to set.
3112         */
3113        public void setPropertiesTransform(String value) {
3114                this.propertiesTransform.setValue(value);
3115        }
3116 
3117        /**
3118         * DOCUMENT ME!
3119         * 
3120         * @param property
3121         */
3122        public void setQueriesBeforeRetryMaster(int property) {
3123                this.queriesBeforeRetryMaster.setValue(property);
3124        }
3125 
3126        /**
3127         * DOCUMENT ME!
3128         * 
3129         * @param property
3130         */
3131        public void setReconnectAtTxEnd(boolean property) {
3132                this.reconnectAtTxEnd.setValue(property);
3133                this.reconnectTxAtEndAsBoolean = this.reconnectAtTxEnd
3134                                .getValueAsBoolean();
3135        }
3136 
3137        /**
3138         * DOCUMENT ME!
3139         * 
3140         * @param property
3141         */
3142        public void setRelaxAutoCommit(boolean property) {
3143                this.relaxAutoCommit.setValue(property);
3144        }
3145 
3146        /**
3147         * DOCUMENT ME!
3148         * 
3149         * @param millis
3150         *            The reportMetricsIntervalMillis to set.
3151         */
3152        public void setReportMetricsIntervalMillis(int millis) {
3153                this.reportMetricsIntervalMillis.setValue(millis);
3154        }
3155 
3156        /**
3157         * DOCUMENT ME!
3158         * 
3159         * @param property
3160         */
3161        public void setRequireSSL(boolean property) {
3162                this.requireSSL.setValue(property);
3163        }
3164 
3165        protected void setRetainStatementAfterResultSetClose(boolean flag) {
3166                this.retainStatementAfterResultSetClose.setValue(flag);
3167        }
3168 
3169        /**
3170         * @param rollbackOnPooledClose
3171         *            The rollbackOnPooledClose to set.
3172         */
3173        public void setRollbackOnPooledClose(boolean flag) {
3174                this.rollbackOnPooledClose.setValue(flag);
3175        }
3176 
3177        /**
3178         * Sets whether or not hosts will be picked in a round-robin fashion.
3179         * 
3180         * @param flag
3181         *            The roundRobinLoadBalance property to set.
3182         */
3183        public void setRoundRobinLoadBalance(boolean flag) {
3184                this.roundRobinLoadBalance.setValue(flag);
3185        }
3186 
3187        /**
3188         * @param runningCTS13
3189         *            The runningCTS13 to set.
3190         */
3191        public void setRunningCTS13(boolean flag) {
3192                this.runningCTS13.setValue(flag);
3193        }
3194 
3195        /**
3196         * DOCUMENT ME!
3197         * 
3198         * @param property
3199         */
3200        public void setSecondsBeforeRetryMaster(int property) {
3201                this.secondsBeforeRetryMaster.setValue(property);
3202        }
3203 
3204        /**
3205         * DOCUMENT ME!
3206         * 
3207         * @param property
3208         *            DOCUMENT ME!
3209         */
3210        public void setServerTimezone(String property) {
3211                this.serverTimezone.setValue(property);
3212        }
3213 
3214        /**
3215         * @param sessionVariables
3216         *            The sessionVariables to set.
3217         */
3218        public void setSessionVariables(String variables) {
3219                this.sessionVariables.setValue(variables);
3220        }
3221 
3222        /**
3223         * DOCUMENT ME!
3224         * 
3225         * @param millis
3226         *            The slowQueryThresholdMillis to set.
3227         */
3228        public void setSlowQueryThresholdMillis(int millis) {
3229                this.slowQueryThresholdMillis.setValue(millis);
3230        }
3231 
3232        /**
3233         * DOCUMENT ME!
3234         * 
3235         * @param property
3236         */
3237        public void setSocketFactoryClassName(String property) {
3238                this.socketFactoryClassName.setValue(property);
3239        }
3240 
3241        /**
3242         * DOCUMENT ME!
3243         * 
3244         * @param property
3245         */
3246        public void setSocketTimeout(int property) {
3247                this.socketTimeout.setValue(property);
3248        }
3249 
3250        /**
3251         * DOCUMENT ME!
3252         * 
3253         * @param property
3254         */
3255        public void setStrictFloatingPoint(boolean property) {
3256                this.strictFloatingPoint.setValue(property);
3257        }
3258 
3259        /**
3260         * DOCUMENT ME!
3261         * 
3262         * @param property
3263         */
3264        public void setStrictUpdates(boolean property) {
3265                this.strictUpdates.setValue(property);
3266        }
3267 
3268        /**
3269         * @param tinyInt1isBit
3270         *            The tinyInt1isBit to set.
3271         */
3272        public void setTinyInt1isBit(boolean flag) {
3273                this.tinyInt1isBit.setValue(flag);
3274        }
3275 
3276        /**
3277         * DOCUMENT ME!
3278         * 
3279         * @param flag
3280         *            The logProtocol to set.
3281         */
3282        public void setTraceProtocol(boolean flag) {
3283                this.traceProtocol.setValue(flag);
3284        }
3285 
3286        public void setTransformedBitIsBoolean(boolean flag) {
3287                this.transformedBitIsBoolean.setValue(flag);
3288        }
3289 
3290        /**
3291         * DOCUMENT ME!
3292         * 
3293         * @param property
3294         */
3295        public void setUseCompression(boolean property) {
3296                this.useCompression.setValue(property);
3297        }
3298 
3299        /**
3300         * @param useFastIntParsing
3301         *            The useFastIntParsing to set.
3302         */
3303        public void setUseFastIntParsing(boolean flag) {
3304                this.useFastIntParsing.setValue(flag);
3305        }
3306 
3307        /**
3308         * DOCUMENT ME!
3309         * 
3310         * @param property
3311         */
3312        public void setUseHostsInPrivileges(boolean property) {
3313                this.useHostsInPrivileges.setValue(property);
3314        }
3315 
3316        /**
3317         * @param useLocalSessionState
3318         *            The useLocalSessionState to set.
3319         */
3320        public void setUseLocalSessionState(boolean flag) {
3321                this.useLocalSessionState.setValue(flag);
3322        }
3323 
3324        /**
3325         * DOCUMENT ME!
3326         * 
3327         * @param property
3328         */
3329        public void setUseNewIo(boolean property) {
3330                this.useNewIo.setValue(property);
3331        }
3332 
3333        /**
3334         * @param useOldUTF8Behavior
3335         *            The useOldUTF8Behavior to set.
3336         */
3337        public void setUseOldUTF8Behavior(boolean flag) {
3338                this.useOldUTF8Behavior.setValue(flag);
3339                this.useOldUTF8BehaviorAsBoolean = this.useOldUTF8Behavior
3340                                .getValueAsBoolean();
3341        }
3342 
3343        /**
3344         * @param useOnlyServerErrorMessages
3345         *            The useOnlyServerErrorMessages to set.
3346         */
3347        public void setUseOnlyServerErrorMessages(boolean flag) {
3348                this.useOnlyServerErrorMessages.setValue(flag);
3349        }
3350 
3351        /**
3352         * @param useReadAheadInput
3353         *            The useReadAheadInput to set.
3354         */
3355        public void setUseReadAheadInput(boolean flag) {
3356                this.useReadAheadInput.setValue(flag);
3357        }
3358 
3359        /**
3360         * DOCUMENT ME!
3361         * 
3362         * @param flag
3363         *            The detectServerPreparedStmts to set.
3364         */
3365        public void setUseServerPreparedStmts(boolean flag) {
3366                this.detectServerPreparedStmts.setValue(flag);
3367        }
3368 
3369        /**
3370         * DOCUMENT ME!
3371         * 
3372         * @param flag
3373         *            The useSqlStateCodes to set.
3374         */
3375        public void setUseSqlStateCodes(boolean flag) {
3376                this.useSqlStateCodes.setValue(flag);
3377        }
3378 
3379        /**
3380         * DOCUMENT ME!
3381         * 
3382         * @param property
3383         */
3384        public void setUseSSL(boolean property) {
3385                this.useSSL.setValue(property);
3386        }
3387 
3388        /**
3389         * DOCUMENT ME!
3390         * 
3391         * @param property
3392         */
3393        public void setUseStreamLengthsInPrepStmts(boolean property) {
3394                this.useStreamLengthsInPrepStmts.setValue(property);
3395        }
3396 
3397        /**
3398         * DOCUMENT ME!
3399         * 
3400         * @param property
3401         */
3402        public void setUseTimezone(boolean property) {
3403                this.useTimezone.setValue(property);
3404        }
3405 
3406        /**
3407         * DOCUMENT ME!
3408         * 
3409         * @param property
3410         */
3411        public void setUseUltraDevWorkAround(boolean property) {
3412                this.useUltraDevWorkAround.setValue(property);
3413        }
3414 
3415        /**
3416         * DOCUMENT ME!
3417         * 
3418         * @param flag
3419         *            The useUnbufferedInput to set.
3420         */
3421        public void setUseUnbufferedInput(boolean flag) {
3422                this.useUnbufferedInput.setValue(flag);
3423        }
3424 
3425        /**
3426         * DOCUMENT ME!
3427         * 
3428         * @param flag
3429         *            The useUnicode to set.
3430         */
3431        public void setUseUnicode(boolean flag) {
3432                this.useUnicode.setValue(flag);
3433                this.useUnicodeAsBoolean = this.useUnicode.getValueAsBoolean();
3434        }
3435 
3436        /**
3437         * Sets whether or not the driver advises of proper usage.
3438         * 
3439         * @param useUsageAdvisorFlag
3440         *            whether or not the driver advises of proper usage.
3441         */
3442        public void setUseUsageAdvisor(boolean useUsageAdvisorFlag) {
3443                this.useUsageAdvisor.setValue(useUsageAdvisorFlag);
3444                this.useUsageAdvisorAsBoolean = this.useUsageAdvisor
3445                                .getValueAsBoolean();
3446        }
3447 
3448        public void setYearIsDateType(boolean flag) {
3449                this.yearIsDateType.setValue(flag);
3450        }
3451 
3452        /**
3453         * @param zeroDateTimeBehavior
3454         *            The zeroDateTimeBehavior to set.
3455         */
3456        public void setZeroDateTimeBehavior(String behavior) {
3457                this.zeroDateTimeBehavior.setValue(behavior);
3458        }
3459 
3460        protected void storeToRef(Reference ref) throws SQLException {
3461                int numPropertiesToSet = PROPERTY_LIST.size();
3462 
3463                for (int i = 0; i < numPropertiesToSet; i++) {
3464                        java.lang.reflect.Field propertyField = (java.lang.reflect.Field) PROPERTY_LIST
3465                                        .get(i);
3466 
3467                        try {
3468                                ConnectionProperty propToStore = (ConnectionProperty) propertyField
3469                                                .get(this);
3470 
3471                                if (ref != null) {
3472                                        propToStore.storeTo(ref);
3473                                }
3474                        } catch (IllegalAccessException iae) {
3475                                throw new SQLException("Huh?");
3476                        }
3477                }
3478        }
3479 
3480        /**
3481         * DOCUMENT ME!
3482         * 
3483         * @return Returns the useUnbufferedInput.
3484         */
3485        public boolean useUnbufferedInput() {
3486                return this.useUnbufferedInput.getValueAsBoolean();
3487        }
3488 
3489        public boolean getUseGmtMillisForDatetimes() {
3490                return this.useGmtMillisForDatetimes.getValueAsBoolean();
3491        }
3492 
3493        public void setUseGmtMillisForDatetimes(boolean flag) {
3494                this.useGmtMillisForDatetimes.setValue(flag);
3495        }
3496 
3497        public boolean getOverrideSupportsIntegrityEnhancementFacility() {
3498                return this.overrideSupportsIntegrityEnhancementFacility.getValueAsBoolean();
3499        }
3500 
3501        public void setOverrideSupportsIntegrityEnhancementFacility(boolean flag) {
3502                this.overrideSupportsIntegrityEnhancementFacility.setValue(flag);        
3503        }
3504 
3505        public boolean getAutoClosePStmtStreams() {
3506                return this.autoClosePStmtStreams.getValueAsBoolean();
3507        }
3508 
3509        public void setAutoClosePStmtStreams(boolean flag) {
3510                this.autoClosePStmtStreams.setValue(flag);
3511        }
3512 
3513        public boolean getProcessEscapeCodesForPrepStmts() {
3514                return this.processEscapeCodesForPrepStmts.getValueAsBoolean();
3515        }
3516 
3517        public void setProcessEscapeCodesForPrepStmts(boolean flag) {
3518                this.processEscapeCodesForPrepStmts.setValue(flag);
3519        }
3520 
3521        public boolean getDumpMetadataOnColumnNotFound() {
3522                return this.dumpMetadataOnColumnNotFound.getValueAsBoolean();
3523        }
3524 
3525        public void setDumpMetadataOnColumnNotFound(boolean flag) {
3526                this.dumpMetadataOnColumnNotFound.setValue(flag);
3527        }
3528 
3529        public boolean getRewriteBatchedStatements() {
3530                return this.rewriteBatchedStatements.getValueAsBoolean();
3531        }
3532 
3533        public void setRewriteBatchedStatements(boolean flag) {
3534                this.rewriteBatchedStatements.setValue(flag);
3535        }
3536        
3537        /*
3538         * "Aliases" which match the property names to make using 
3539         * from datasources easier.
3540         */
3541        
3542        public void setUseServerPrepStmts(boolean flag) {
3543                setUseServerPreparedStmts(flag);
3544        }
3545 
3546        public boolean getUseServerPrepStmts() {
3547                return getUseServerPreparedStmts();
3548        }
3549 
3550        public void setCacheCallableStmts(boolean flag) {
3551                setCacheCallableStatements(flag);
3552        }
3553 
3554        public boolean getCacheCallableStmts() {
3555                return getCacheCallableStatements();
3556        }
3557 
3558        public void setCachePrepStmts(boolean flag) {
3559                setCachePreparedStatements(flag);
3560        }
3561 
3562        public boolean getCachePrepStmts() {
3563                return getCachePreparedStatements();
3564        }
3565 
3566        public void setCallableStmtCacheSize(int cacheSize) {
3567                setCallableStatementCacheSize(cacheSize);
3568        }
3569 
3570        public int getCallableStmtCacheSize() {
3571                return getCallableStatementCacheSize();
3572        }
3573 
3574        public void setPrepStmtCacheSize(int cacheSize) {
3575                setPreparedStatementCacheSize(cacheSize);
3576        }
3577 
3578        public int getPrepStmtCacheSize() {
3579                return getPreparedStatementCacheSize();
3580        }
3581 
3582        public void setPrepStmtCacheSqlLimit(int sqlLimit) {
3583                setPreparedStatementCacheSqlLimit(sqlLimit);
3584        }
3585 
3586        public int getPrepStmtCacheSqlLimit() {
3587                return getPreparedStatementCacheSqlLimit();
3588        }
3589 
3590        protected boolean getJdbcCompliantTruncationForReads() {
3591                return this.jdbcCompliantTruncationForReads;
3592        }
3593 
3594        protected void setJdbcCompliantTruncationForReads(
3595                        boolean jdbcCompliantTruncationForReads) {
3596                this.jdbcCompliantTruncationForReads = jdbcCompliantTruncationForReads;
3597        }
3598}

[all classes][com.mysql.jdbc]
EMMA 2.0.4217 (C) Vladimir Roubtsov