public abstract class BaseDataSource extends Object implements CommonDataSource, Referenceable
Constructor and Description |
---|
BaseDataSource() |
Modifier and Type | Method and Description |
---|---|
protected Reference |
createReference()
Generates a reference using the appropriate object factory.
|
boolean |
getAdaptiveFetch() |
int |
getAdaptiveFetchMaximum() |
int |
getAdaptiveFetchMinimum() |
boolean |
getAllowEncodingChanges() |
String |
getApplicationName() |
@Nullable String |
getAssumeMinServerVersion() |
AutoSave |
getAutosave() |
boolean |
getBinaryTransfer() |
String |
getBinaryTransferDisable() |
String |
getBinaryTransferEnable() |
int |
getCancelSignalTimeout() |
boolean |
getCleanupSavepoints()
see PGProperty#CLEANUP_SAVEPOINTS
|
Connection |
getConnection()
Gets a connection to the PostgreSQL database.
|
Connection |
getConnection(@Nullable String user,
@Nullable String password)
Gets a connection to the PostgreSQL database.
|
int |
getConnectTimeout() |
@Nullable String |
getCurrentSchema() |
int |
getDatabaseMetadataCacheFields() |
int |
getDatabaseMetadataCacheFieldsMiB() |
@Nullable String |
getDatabaseName()
Gets the name of the PostgreSQL database, running on the server identified by the serverName
property.
|
int |
getDefaultRowFetchSize() |
abstract String |
getDescription()
Gets a description of this DataSource-ish thing.
|
boolean |
getDisableColumnSanitiser() |
String |
getEscapeSyntaxCallMode() |
String |
getGssEncMode() |
@Nullable String |
getGssLib() |
boolean |
getHideUnprivilegedObjects() |
int |
getHostRecheckSeconds() |
@Nullable String |
getJaasApplicationName() |
boolean |
getJaasLogin() |
@Nullable String |
getKerberosServerName() |
boolean |
getLoadBalanceHosts() |
@Nullable String |
getLoggerFile() |
@Nullable String |
getLoggerLevel() |
int |
getLoginTimeout() |
boolean |
getLogServerErrorDetail() |
boolean |
getLogUnclosedConnections() |
@Nullable PrintWriter |
getLogWriter()
This implementation don't use a LogWriter.
|
@Nullable String |
getMaxResultBuffer() |
@Nullable String |
getOptions() |
Logger |
getParentLogger() |
@Nullable String |
getPassword()
Gets the password to connect with by default.
|
int |
getPortNumber()
Deprecated.
use
getPortNumbers() |
int[] |
getPortNumbers()
Gets the port(s) which the PostgreSQL server is listening on for TCP/IP connections.
|
PreferQueryMode |
getPreferQueryMode() |
int |
getPreparedStatementCacheQueries() |
int |
getPreparedStatementCacheSizeMiB() |
int |
getPrepareThreshold() |
@Nullable String |
getProperty(PGProperty property) |
@Nullable String |
getProperty(String name) |
int |
getProtocolVersion() |
boolean |
getQuoteReturningIdentifiers() |
boolean |
getReadOnly() |
String |
getReadOnlyMode() |
int |
getReceiveBufferSize() |
int |
getRecvBufferSize() |
Reference |
getReference() |
@Nullable String |
getReplication() |
boolean |
getReWriteBatchedInserts() |
int |
getSendBufferSize() |
String |
getServerName()
Deprecated.
use
getServerNames() |
String[] |
getServerNames()
Gets the name of the host(s) the PostgreSQL database is running on.
|
@Nullable String |
getSocketFactory() |
@Nullable String |
getSocketFactoryArg() |
int |
getSocketTimeout() |
boolean |
getSsl() |
@Nullable String |
getSslcert() |
@Nullable String |
getSslCert() |
@Nullable String |
getSslfactory() |
@Nullable String |
getSslfactoryarg() |
@Nullable String |
getSslFactoryArg() |
@Nullable String |
getSslhostnameverifier() |
@Nullable String |
getSslHostnameVerifier() |
@Nullable String |
getSslkey() |
@Nullable String |
getSslKey() |
@Nullable String |
getSslmode() |
@Nullable String |
getSslMode() |
@Nullable String |
getSslpassword() |
@Nullable String |
getSslPassword() |
@Nullable String |
getSslpasswordcallback() |
@Nullable String |
getSslPasswordCallback() |
@Nullable String |
getSslrootcert() |
@Nullable String |
getSslRootCert() |
@Nullable String |
getSspiServiceClass() |
@Nullable String |
getStringType() |
String |
getTargetServerType() |
boolean |
getTcpKeepAlive() |
int |
getUnknownLength() |
String |
getUrl()
Generates a
DriverManager URL from the other properties supplied. |
String |
getURL()
Generates a
DriverManager URL from the other properties supplied. |
@Nullable String |
getUser()
Gets the user to connect as by default.
|
boolean |
getUseSpNego() |
String |
getXmlFactoryFactory() |
void |
initializeFrom(BaseDataSource source) |
boolean |
isAllowEncodingChanges() |
boolean |
isCleanupSavePoints() |
boolean |
isColumnSanitiserDisabled() |
boolean |
isDisableColumnSanitiser() |
boolean |
isLoadBalanceHosts() |
boolean |
isLogUnclosedConnections() |
boolean |
isReadOnly() |
boolean |
isReWriteBatchedInserts() |
boolean |
isSsl() |
boolean |
isTcpKeepAlive() |
protected void |
readBaseObject(ObjectInputStream in) |
void |
setAdaptiveFetch(boolean adaptiveFetch) |
void |
setAdaptiveFetchMaximum(int adaptiveFetchMaximum) |
void |
setAdaptiveFetchMinimum(int adaptiveFetchMinimum) |
void |
setAllowEncodingChanges(boolean allow) |
void |
setApplicationName(@Nullable String applicationName) |
void |
setAssumeMinServerVersion(@Nullable String minVersion) |
void |
setAutosave(AutoSave autoSave) |
void |
setBinaryTransfer(boolean enabled) |
void |
setBinaryTransferDisable(@Nullable String oidList) |
void |
setBinaryTransferEnable(@Nullable String oidList) |
void |
setCancelSignalTimeout(int seconds) |
void |
setCleanupSavepoints(boolean cleanupSavepoints)
see PGProperty#CLEANUP_SAVEPOINTS
|
void |
setCleanupSavePoints(boolean cleanupSavepoints) |
void |
setConnectTimeout(int connectTimeout) |
void |
setCurrentSchema(@Nullable String currentSchema) |
void |
setDatabaseMetadataCacheFields(int cacheSize) |
void |
setDatabaseMetadataCacheFieldsMiB(int cacheSize) |
void |
setDatabaseName(@Nullable String databaseName)
Sets the name of the PostgreSQL database, running on the server identified by the serverName
property.
|
void |
setDefaultRowFetchSize(int fetchSize) |
void |
setDisableColumnSanitiser(boolean disableColumnSanitiser) |
void |
setEscapeSyntaxCallMode(@Nullable String callMode) |
void |
setFromReference(Reference ref) |
void |
setGssEncMode(@Nullable String mode) |
void |
setGssLib(@Nullable String lib) |
void |
setHideUnprivilegedObjects(boolean hideUnprivileged) |
void |
setHostRecheckSeconds(int hostRecheckSeconds) |
void |
setJaasApplicationName(@Nullable String name) |
void |
setJaasLogin(boolean doLogin) |
void |
setKerberosServerName(@Nullable String serverName) |
void |
setLoadBalanceHosts(boolean loadBalanceHosts) |
void |
setLoggerFile(@Nullable String loggerFile) |
void |
setLoggerLevel(@Nullable String loggerLevel) |
void |
setLoginTimeout(int loginTimeout) |
void |
setLogServerErrorDetail(boolean enabled) |
void |
setLogUnclosedConnections(boolean enabled) |
void |
setLogWriter(@Nullable PrintWriter printWriter)
This implementation don't use a LogWriter.
|
void |
setMaxResultBuffer(@Nullable String maxResultBuffer) |
void |
setOptions(@Nullable String options)
Set command line options for this connection
|
void |
setPassword(@Nullable String password)
Sets the password to connect with by default.
|
void |
setPortNumber(int portNumber)
Deprecated.
|
void |
setPortNumbers(int[] portNumbers)
Sets the port(s) which the PostgreSQL server is listening on for TCP/IP connections.
|
void |
setPreferQueryMode(PreferQueryMode preferQueryMode) |
void |
setPreparedStatementCacheQueries(int cacheSize) |
void |
setPreparedStatementCacheSizeMiB(int cacheSize) |
void |
setPrepareThreshold(int count) |
void |
setProperty(PGProperty property,
@Nullable String value) |
void |
setProperty(String name,
@Nullable String value) |
void |
setProtocolVersion(int protocolVersion) |
void |
setQuoteReturningIdentifiers(boolean quoteIdentifiers) |
void |
setReadOnly(boolean readOnly) |
void |
setReadOnlyMode(@Nullable String mode) |
void |
setReceiveBufferSize(int nbytes) |
void |
setRecvBufferSize(int nbytes) |
void |
setReplication(@Nullable String replication) |
void |
setReWriteBatchedInserts(boolean reWrite) |
void |
setSendBufferSize(int nbytes) |
void |
setServerName(String serverName)
Deprecated.
|
void |
setServerNames(@Nullable String[] serverNames)
Sets the name of the host(s) the PostgreSQL database is running on.
|
void |
setSocketFactory(@Nullable String socketFactoryClassName) |
void |
setSocketFactoryArg(@Nullable String socketFactoryArg) |
void |
setSocketTimeout(int seconds) |
void |
setSsl(boolean enabled) |
void |
setSslcert(@Nullable String file) |
void |
setSslCert(@Nullable String file) |
void |
setSslfactory(String classname) |
void |
setSslfactoryarg(@Nullable String arg) |
void |
setSslFactoryArg(@Nullable String arg) |
void |
setSslhostnameverifier(@Nullable String className) |
void |
setSslHostnameVerifier(@Nullable String className) |
void |
setSslkey(@Nullable String file) |
void |
setSslKey(@Nullable String file) |
void |
setSslmode(@Nullable String mode) |
void |
setSslMode(@Nullable String mode) |
void |
setSslpassword(String sslpassword) |
void |
setSslPassword(@Nullable String password) |
void |
setSslpasswordcallback(@Nullable String className) |
void |
setSslPasswordCallback(@Nullable String className) |
void |
setSslrootcert(@Nullable String file) |
void |
setSslRootCert(@Nullable String file) |
void |
setSspiServiceClass(@Nullable String serviceClass) |
void |
setStringType(@Nullable String stringType) |
void |
setTargetServerType(@Nullable String targetServerType) |
void |
setTcpKeepAlive(boolean enabled) |
void |
setUnknownLength(int unknownLength) |
void |
setUrl(String url)
Sets properties from a
DriverManager URL. |
void |
setURL(String url)
Sets properties from a
DriverManager URL. |
void |
setUser(@Nullable String user)
Sets the user to connect as by default.
|
void |
setUseSpNego(boolean use) |
void |
setXmlFactoryFactory(@Nullable String xmlFactoryFactory) |
protected void |
writeBaseObject(ObjectOutputStream out) |
public Connection getConnection() throws SQLException
SQLException
- Occurs when the database connection cannot be established.public Connection getConnection(@Nullable String user, @Nullable String password) throws SQLException
user
- userpassword
- passwordSQLException
- Occurs when the database connection cannot be established.public @Nullable PrintWriter getLogWriter()
getLogWriter
in interface CommonDataSource
public void setLogWriter(@Nullable PrintWriter printWriter)
setLogWriter
in interface CommonDataSource
printWriter
- Not used@Deprecated public String getServerName()
getServerNames()
public String[] getServerNames()
@Deprecated public void setServerName(String serverName)
setServerNames(String[])
localhost
.serverName
- name of the host the PostgreSQL database is running onpublic void setServerNames(@Nullable String[] serverNames)
localhost
.serverNames
- name of the host(s) the PostgreSQL database is running onpublic @Nullable String getDatabaseName()
public void setDatabaseName(@Nullable String databaseName)
databaseName
- name of the PostgreSQL databasepublic abstract String getDescription()
public @Nullable String getUser()
public void setUser(@Nullable String user)
user
- user to connect as by defaultpublic @Nullable String getPassword()
public void setPassword(@Nullable String password)
password
- password to connect with by default@Deprecated public int getPortNumber()
getPortNumbers()
public int[] getPortNumbers()
@Deprecated public void setPortNumber(int portNumber)
setPortNumbers(int[])
portNumber
- port which the PostgreSQL server is listening on for TCP/IPpublic void setPortNumbers(int[] portNumbers)
portNumbers
- port(s) which the PostgreSQL server is listening on for TCP/IPpublic @Nullable String getOptions()
public void setOptions(@Nullable String options)
options
- string to set options topublic int getLoginTimeout()
getLoginTimeout
in interface CommonDataSource
PGProperty.LOGIN_TIMEOUT
public void setLoginTimeout(int loginTimeout)
setLoginTimeout
in interface CommonDataSource
loginTimeout
- login timeoutPGProperty.LOGIN_TIMEOUT
public int getConnectTimeout()
PGProperty.CONNECT_TIMEOUT
public void setConnectTimeout(int connectTimeout)
connectTimeout
- connect timeoutPGProperty.CONNECT_TIMEOUT
public int getProtocolVersion()
PGProperty.PROTOCOL_VERSION
public void setProtocolVersion(int protocolVersion)
protocolVersion
- protocol versionPGProperty.PROTOCOL_VERSION
public boolean getQuoteReturningIdentifiers()
PGProperty.QUOTE_RETURNING_IDENTIFIERS
public void setQuoteReturningIdentifiers(boolean quoteIdentifiers)
quoteIdentifiers
- indicate whether to quote identifiersPGProperty.QUOTE_RETURNING_IDENTIFIERS
public int getReceiveBufferSize()
PGProperty.RECEIVE_BUFFER_SIZE
public void setReceiveBufferSize(int nbytes)
nbytes
- receive buffer sizePGProperty.RECEIVE_BUFFER_SIZE
public int getSendBufferSize()
PGProperty.SEND_BUFFER_SIZE
public void setSendBufferSize(int nbytes)
nbytes
- send buffer sizePGProperty.SEND_BUFFER_SIZE
public void setPrepareThreshold(int count)
count
- prepare thresholdPGProperty.PREPARE_THRESHOLD
public int getPrepareThreshold()
PGProperty.PREPARE_THRESHOLD
public int getPreparedStatementCacheQueries()
PGProperty.PREPARED_STATEMENT_CACHE_QUERIES
public void setPreparedStatementCacheQueries(int cacheSize)
cacheSize
- prepared statement cache size (number of statements per connection)PGProperty.PREPARED_STATEMENT_CACHE_QUERIES
public int getPreparedStatementCacheSizeMiB()
PGProperty.PREPARED_STATEMENT_CACHE_SIZE_MIB
public void setPreparedStatementCacheSizeMiB(int cacheSize)
cacheSize
- statement cache size (number of megabytes per connection)PGProperty.PREPARED_STATEMENT_CACHE_SIZE_MIB
public int getDatabaseMetadataCacheFields()
PGProperty.DATABASE_METADATA_CACHE_FIELDS
public void setDatabaseMetadataCacheFields(int cacheSize)
cacheSize
- database metadata cache fields size (number of fields cached per connection)PGProperty.DATABASE_METADATA_CACHE_FIELDS
public int getDatabaseMetadataCacheFieldsMiB()
PGProperty.DATABASE_METADATA_CACHE_FIELDS_MIB
public void setDatabaseMetadataCacheFieldsMiB(int cacheSize)
cacheSize
- database metadata cache fields size (number of megabytes per connection)PGProperty.DATABASE_METADATA_CACHE_FIELDS_MIB
public void setDefaultRowFetchSize(int fetchSize)
fetchSize
- default fetch sizePGProperty.DEFAULT_ROW_FETCH_SIZE
public int getDefaultRowFetchSize()
PGProperty.DEFAULT_ROW_FETCH_SIZE
public void setUnknownLength(int unknownLength)
unknownLength
- unknown lengthPGProperty.UNKNOWN_LENGTH
public int getUnknownLength()
PGProperty.UNKNOWN_LENGTH
public void setSocketTimeout(int seconds)
seconds
- socket timeoutPGProperty.SOCKET_TIMEOUT
public int getSocketTimeout()
PGProperty.SOCKET_TIMEOUT
public void setCancelSignalTimeout(int seconds)
seconds
- timeout that is used for sending cancel commandPGProperty.CANCEL_SIGNAL_TIMEOUT
public int getCancelSignalTimeout()
PGProperty.CANCEL_SIGNAL_TIMEOUT
public void setSsl(boolean enabled)
enabled
- if SSL is enabledPGProperty.SSL
public boolean getSsl()
PGProperty.SSL
public void setSslfactory(String classname)
classname
- SSL factory class namePGProperty.SSL_FACTORY
public @Nullable String getSslfactory()
PGProperty.SSL_FACTORY
public @Nullable String getSslMode()
PGProperty.SSL_MODE
public void setSslMode(@Nullable String mode)
mode
- SSL modePGProperty.SSL_MODE
public @Nullable String getSslFactoryArg()
PGProperty.SSL_FACTORY_ARG
public void setSslFactoryArg(@Nullable String arg)
arg
- argument forwarded to SSL factoryPGProperty.SSL_FACTORY_ARG
public @Nullable String getSslHostnameVerifier()
PGProperty.SSL_HOSTNAME_VERIFIER
public void setSslHostnameVerifier(@Nullable String className)
className
- SSL hostname verifierPGProperty.SSL_HOSTNAME_VERIFIER
public @Nullable String getSslCert()
PGProperty.SSL_CERT
public void setSslCert(@Nullable String file)
file
- SSL certificatePGProperty.SSL_CERT
public @Nullable String getSslKey()
PGProperty.SSL_KEY
public void setSslKey(@Nullable String file)
file
- SSL keyPGProperty.SSL_KEY
public @Nullable String getSslRootCert()
PGProperty.SSL_ROOT_CERT
public void setSslRootCert(@Nullable String file)
file
- SSL root certificatePGProperty.SSL_ROOT_CERT
public @Nullable String getSslPassword()
PGProperty.SSL_PASSWORD
public void setSslPassword(@Nullable String password)
password
- SSL passwordPGProperty.SSL_PASSWORD
public @Nullable String getSslPasswordCallback()
PGProperty.SSL_PASSWORD_CALLBACK
public void setSslPasswordCallback(@Nullable String className)
className
- SSL password callback class namePGProperty.SSL_PASSWORD_CALLBACK
public void setApplicationName(@Nullable String applicationName)
applicationName
- application namePGProperty.APPLICATION_NAME
public String getApplicationName()
PGProperty.APPLICATION_NAME
public void setTargetServerType(@Nullable String targetServerType)
targetServerType
- target server typePGProperty.TARGET_SERVER_TYPE
public String getTargetServerType()
PGProperty.TARGET_SERVER_TYPE
public void setLoadBalanceHosts(boolean loadBalanceHosts)
loadBalanceHosts
- load balance hostsPGProperty.LOAD_BALANCE_HOSTS
public boolean getLoadBalanceHosts()
PGProperty.LOAD_BALANCE_HOSTS
public void setHostRecheckSeconds(int hostRecheckSeconds)
hostRecheckSeconds
- host recheck secondsPGProperty.HOST_RECHECK_SECONDS
public int getHostRecheckSeconds()
PGProperty.HOST_RECHECK_SECONDS
public void setTcpKeepAlive(boolean enabled)
enabled
- if TCP keep alive should be enabledPGProperty.TCP_KEEP_ALIVE
public boolean getTcpKeepAlive()
PGProperty.TCP_KEEP_ALIVE
public void setBinaryTransfer(boolean enabled)
enabled
- if binary transfer should be enabledPGProperty.BINARY_TRANSFER
public boolean getBinaryTransfer()
PGProperty.BINARY_TRANSFER
public void setBinaryTransferEnable(@Nullable String oidList)
oidList
- list of OIDs that are allowed to use binary transferPGProperty.BINARY_TRANSFER_ENABLE
public String getBinaryTransferEnable()
PGProperty.BINARY_TRANSFER_ENABLE
public void setBinaryTransferDisable(@Nullable String oidList)
oidList
- list of OIDs that are not allowed to use binary transferPGProperty.BINARY_TRANSFER_DISABLE
public String getBinaryTransferDisable()
PGProperty.BINARY_TRANSFER_DISABLE
public @Nullable String getStringType()
PGProperty.STRING_TYPE
public void setStringType(@Nullable String stringType)
stringType
- string typePGProperty.STRING_TYPE
public boolean isColumnSanitiserDisabled()
PGProperty.DISABLE_COLUMN_SANITISER
public boolean getDisableColumnSanitiser()
PGProperty.DISABLE_COLUMN_SANITISER
public void setDisableColumnSanitiser(boolean disableColumnSanitiser)
disableColumnSanitiser
- if column sanitizer should be disabledPGProperty.DISABLE_COLUMN_SANITISER
public @Nullable String getCurrentSchema()
PGProperty.CURRENT_SCHEMA
public void setCurrentSchema(@Nullable String currentSchema)
currentSchema
- current schemaPGProperty.CURRENT_SCHEMA
public boolean getReadOnly()
PGProperty.READ_ONLY
public void setReadOnly(boolean readOnly)
readOnly
- if connection should be readonlyPGProperty.READ_ONLY
public String getReadOnlyMode()
PGProperty.READ_ONLY_MODE
public void setReadOnlyMode(@Nullable String mode)
mode
- the behavior when set read onlyPGProperty.READ_ONLY_MODE
public boolean getLogUnclosedConnections()
PGProperty.LOG_UNCLOSED_CONNECTIONS
public void setLogUnclosedConnections(boolean enabled)
enabled
- true if driver should log unclosed connectionsPGProperty.LOG_UNCLOSED_CONNECTIONS
public boolean getLogServerErrorDetail()
PGProperty.LOG_SERVER_ERROR_DETAIL
public void setLogServerErrorDetail(boolean enabled)
enabled
- true if driver should include detail in server error messagesPGProperty.LOG_SERVER_ERROR_DETAIL
public @Nullable String getAssumeMinServerVersion()
PGProperty.ASSUME_MIN_SERVER_VERSION
public void setAssumeMinServerVersion(@Nullable String minVersion)
minVersion
- assumed minimal server versionPGProperty.ASSUME_MIN_SERVER_VERSION
public @Nullable String getJaasApplicationName()
PGProperty.JAAS_APPLICATION_NAME
public void setJaasApplicationName(@Nullable String name)
name
- JAAS application namePGProperty.JAAS_APPLICATION_NAME
public boolean getJaasLogin()
PGProperty.JAAS_LOGIN
public void setJaasLogin(boolean doLogin)
doLogin
- true if perform JAAS login before GSS authenticationPGProperty.JAAS_LOGIN
public @Nullable String getKerberosServerName()
PGProperty.KERBEROS_SERVER_NAME
public void setKerberosServerName(@Nullable String serverName)
serverName
- Kerberos server namePGProperty.KERBEROS_SERVER_NAME
public boolean getUseSpNego()
PGProperty.USE_SPNEGO
public void setUseSpNego(boolean use)
use
- true if use SPNEGOPGProperty.USE_SPNEGO
public @Nullable String getGssLib()
PGProperty.GSS_LIB
public void setGssLib(@Nullable String lib)
lib
- GSS mode: auto, sspi, or gssapiPGProperty.GSS_LIB
public String getGssEncMode()
public void setGssEncMode(@Nullable String mode)
mode
- encryption mode: disable, prefer or requirepublic @Nullable String getSspiServiceClass()
PGProperty.SSPI_SERVICE_CLASS
public void setSspiServiceClass(@Nullable String serviceClass)
serviceClass
- SSPI service classPGProperty.SSPI_SERVICE_CLASS
public boolean getAllowEncodingChanges()
PGProperty.ALLOW_ENCODING_CHANGES
public void setAllowEncodingChanges(boolean allow)
allow
- if connection allows encoding changesPGProperty.ALLOW_ENCODING_CHANGES
public @Nullable String getSocketFactory()
PGProperty.SOCKET_FACTORY
public void setSocketFactory(@Nullable String socketFactoryClassName)
socketFactoryClassName
- socket factory class namePGProperty.SOCKET_FACTORY
public @Nullable String getSocketFactoryArg()
PGProperty.SOCKET_FACTORY_ARG
public void setSocketFactoryArg(@Nullable String socketFactoryArg)
socketFactoryArg
- socket factory argumentPGProperty.SOCKET_FACTORY_ARG
public void setReplication(@Nullable String replication)
replication
- set to 'database' for logical replication or 'true' for physical replicationPGProperty.REPLICATION
public String getEscapeSyntaxCallMode()
PGProperty.ESCAPE_SYNTAX_CALL_MODE
public void setEscapeSyntaxCallMode(@Nullable String callMode)
callMode
- the call mode to use for JDBC escape call syntaxPGProperty.ESCAPE_SYNTAX_CALL_MODE
public @Nullable String getReplication()
PGProperty.REPLICATION
public @Nullable String getLoggerLevel()
PGProperty.LOGGER_LEVEL
public void setLoggerLevel(@Nullable String loggerLevel)
loggerLevel
- of the JDBC DriverPGProperty.LOGGER_LEVEL
public @Nullable String getLoggerFile()
PGProperty.LOGGER_FILE
public void setLoggerFile(@Nullable String loggerFile)
loggerFile
- File output of the Logger.PGProperty.LOGGER_LEVEL
public String getUrl()
DriverManager
URL from the other properties supplied.DriverManager
URL from the other properties suppliedpublic String getURL()
DriverManager
URL from the other properties supplied.DriverManager
URL from the other properties suppliedpublic void setUrl(String url)
DriverManager
URL.url
- properties to setpublic void setURL(String url)
DriverManager
URL.
Added to follow convention used in other DBMS.url
- properties to setpublic @Nullable String getProperty(String name) throws SQLException
SQLException
public void setProperty(String name, @Nullable String value) throws SQLException
SQLException
public @Nullable String getProperty(PGProperty property)
public void setProperty(PGProperty property, @Nullable String value)
protected Reference createReference()
public Reference getReference() throws NamingException
getReference
in interface Referenceable
NamingException
public void setFromReference(Reference ref)
protected void writeBaseObject(ObjectOutputStream out) throws IOException
IOException
protected void readBaseObject(ObjectInputStream in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public void initializeFrom(BaseDataSource source) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public PreferQueryMode getPreferQueryMode()
PGProperty.PREFER_QUERY_MODE
public void setPreferQueryMode(PreferQueryMode preferQueryMode)
preferQueryMode
- extended, simple, extendedForPrepared, or extendedCacheEverythingPGProperty.PREFER_QUERY_MODE
public AutoSave getAutosave()
PGProperty.AUTOSAVE
public void setAutosave(AutoSave autoSave)
autoSave
- connection configuration regarding automatic per-query savepointsPGProperty.AUTOSAVE
public boolean getCleanupSavepoints()
public void setCleanupSavepoints(boolean cleanupSavepoints)
cleanupSavepoints
- will cleanup savepoints after a successful transactionpublic boolean getReWriteBatchedInserts()
PGProperty.REWRITE_BATCHED_INSERTS
public void setReWriteBatchedInserts(boolean reWrite)
reWrite
- boolean value to set the property in the properties collectionPGProperty.REWRITE_BATCHED_INSERTS
public boolean getHideUnprivilegedObjects()
PGProperty.HIDE_UNPRIVILEGED_OBJECTS
public void setHideUnprivilegedObjects(boolean hideUnprivileged)
hideUnprivileged
- boolean value to set the property in the properties collectionPGProperty.HIDE_UNPRIVILEGED_OBJECTS
public @Nullable String getMaxResultBuffer()
public void setMaxResultBuffer(@Nullable String maxResultBuffer)
public boolean getAdaptiveFetch()
public void setAdaptiveFetch(boolean adaptiveFetch)
public int getAdaptiveFetchMaximum()
public void setAdaptiveFetchMaximum(int adaptiveFetchMaximum)
public int getAdaptiveFetchMinimum()
public void setAdaptiveFetchMinimum(int adaptiveFetchMinimum)
public Logger getParentLogger()
getParentLogger
in interface CommonDataSource
public String getXmlFactoryFactory()
public void setXmlFactoryFactory(@Nullable String xmlFactoryFactory)
public boolean isSsl()
public @Nullable String getSslfactoryarg()
public void setSslfactoryarg(@Nullable String arg)
public @Nullable String getSslcert()
public void setSslcert(@Nullable String file)
public @Nullable String getSslmode()
public void setSslmode(@Nullable String mode)
public @Nullable String getSslhostnameverifier()
public void setSslhostnameverifier(@Nullable String className)
public @Nullable String getSslkey()
public void setSslkey(@Nullable String file)
public @Nullable String getSslrootcert()
public void setSslrootcert(@Nullable String file)
public @Nullable String getSslpasswordcallback()
public void setSslpasswordcallback(@Nullable String className)
public @Nullable String getSslpassword()
public void setSslpassword(String sslpassword)
public int getRecvBufferSize()
public void setRecvBufferSize(int nbytes)
public boolean isAllowEncodingChanges()
public boolean isLogUnclosedConnections()
public boolean isTcpKeepAlive()
public boolean isReadOnly()
public boolean isDisableColumnSanitiser()
public boolean isLoadBalanceHosts()
public boolean isCleanupSavePoints()
public void setCleanupSavePoints(boolean cleanupSavepoints)
public boolean isReWriteBatchedInserts()
Copyright © 1997-2020 PostgreSQL Global Development Group. All Rights Reserved.