public class FBConnectionProperties extends java.lang.Object implements FirebirdConnectionProperties, java.io.Serializable, java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BLOB_BUFFER_SIZE_PROPERTY |
static java.lang.String |
BUFFERS_NUMBER_PROPERTY |
static java.lang.String |
CONNECT_TIMEOUT |
static java.lang.String |
DATABASE_PROPERTY |
static java.lang.String |
DEFAULT_HOLDABLE_RS_PROPERTY |
static java.lang.String |
DEFAULT_ISOLATION_PROPERTY |
static java.lang.String |
ENCODING_PROPERTY |
static java.lang.String |
ISOLATION_PROPERTY |
static java.lang.String |
LOCAL_ENCODING_PROPERTY |
static java.lang.String |
PASSWORD_PROPERTY |
static java.lang.String |
ROLE_NAME_PROPERTY |
static java.lang.String |
SO_TIMEOUT |
static java.lang.String |
SOCKET_BUFFER_SIZE_PROPERTY |
static java.lang.String |
SQL_DIALECT_PROPERTY |
static java.lang.String |
TIMESTAMP_USES_LOCAL_TIMEZONE_PROPERTY |
static java.lang.String |
TYPE_PROPERTY |
static java.lang.String |
USE_FIREBIRD_AUTOCOMMIT |
static java.lang.String |
USE_STANDARD_UDF_PROPERTY |
static java.lang.String |
USE_STREAM_BLOBS_PROPERTY |
static java.lang.String |
USE_TRANSLATION_PROPERTY |
static java.lang.String |
USER_NAME_PROPERTY |
Constructor and Description |
---|
FBConnectionProperties() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
boolean |
equals(java.lang.Object obj) |
int |
getBlobBufferSize() |
int |
getBuffersNumber() |
java.lang.String |
getCharSet() |
int |
getConnectTimeout()
Get the current connect timeout.
|
java.lang.String |
getDatabase() |
DatabaseParameterBuffer |
getDatabaseParameterBuffer()
Get the database parameter buffer corresponding to the current connection
request information.
|
java.lang.String |
getDefaultIsolation()
Get the default transaction isolation level as string.
|
int |
getDefaultTransactionIsolation()
Get the default transaction isolation level.
|
java.lang.String |
getEncoding() |
FBTpbMapper |
getMapper() |
java.lang.String |
getNonStandardProperty(java.lang.String key)
Get the property that does not have corresponding getter method by its
name.
|
java.lang.String |
getPassword() |
java.lang.String |
getRoleName() |
int |
getSocketBufferSize() |
int |
getSoTimeout()
Get the current Socket blocking timeout (SoTimeout).
|
java.lang.String |
getSqlDialect() |
java.lang.String |
getTpbMapping()
Get the used TPB mapping.
|
TransactionParameterBuffer |
getTransactionParameters(int isolation)
Get the transaction parameter buffer corresponding to the current
connection request information.
|
java.lang.String |
getType() |
java.lang.String |
getUserName() |
java.lang.String |
getUseTranslation() |
int |
hashCode() |
boolean |
isDefaultResultSetHoldable()
Get the default ResultSet holdability.
|
boolean |
isTimestampUsesLocalTimezone() |
boolean |
isUseFirebirdAutocommit()
Get whether to use Firebird autocommit (experimental).
|
boolean |
isUseStandardUdf() |
boolean |
isUseStreamBlobs() |
void |
setBlobBufferSize(int bufferSize) |
void |
setBuffersNumber(int buffersNumber) |
void |
setCharSet(java.lang.String charSet) |
void |
setConnectTimeout(int connectTimeout)
Set the connect timeout.
|
void |
setDatabase(java.lang.String database) |
void |
setDefaultIsolation(java.lang.String isolation)
Set the default transaction isolation level as string.
|
void |
setDefaultResultSetHoldable(boolean isHoldable)
Sets the default ResultSet holdability.
|
void |
setDefaultTransactionIsolation(int defaultIsolationLevel)
Set the default transaction isolation level.
|
void |
setEncoding(java.lang.String encoding) |
void |
setNonStandardProperty(java.lang.String propertyMapping)
Set the property that does not have corresponding setter method.
|
void |
setNonStandardProperty(java.lang.String key,
java.lang.String value)
Set the property that does not have corresponding setter method.
|
void |
setPassword(java.lang.String password) |
void |
setRoleName(java.lang.String roleName) |
void |
setSocketBufferSize(int socketBufferSize) |
void |
setSoTimeout(int soTimeout)
Set the Socket blocking timeout (SoTimeout).
|
void |
setSqlDialect(java.lang.String sqlDialect) |
void |
setTimestampUsesLocalTimezone(boolean timestampUsesLocalTimezone) |
void |
setTpbMapping(java.lang.String tpbMapping)
Set path to the properties file with the TPB mapping.
|
void |
setTransactionParameters(int isolation,
TransactionParameterBuffer tpb)
Set transaction parameters for the specified transaction isolation level.
|
void |
setType(java.lang.String type) |
void |
setUseFirebirdAutocommit(boolean useFirebirdAutocommit)
Set whether to use Firebird autocommit (experimental).
|
void |
setUserName(java.lang.String userName) |
void |
setUseStandardUdf(boolean useStandardUdf) |
void |
setUseStreamBlobs(boolean useStreamBlobs) |
void |
setUseTranslation(java.lang.String translationPath) |
public static final java.lang.String DATABASE_PROPERTY
public static final java.lang.String TYPE_PROPERTY
public static final java.lang.String ISOLATION_PROPERTY
public static final java.lang.String DEFAULT_ISOLATION_PROPERTY
public static final java.lang.String BLOB_BUFFER_SIZE_PROPERTY
public static final java.lang.String LOCAL_ENCODING_PROPERTY
public static final java.lang.String ENCODING_PROPERTY
public static final java.lang.String ROLE_NAME_PROPERTY
public static final java.lang.String SQL_DIALECT_PROPERTY
public static final java.lang.String USE_TRANSLATION_PROPERTY
public static final java.lang.String USE_STREAM_BLOBS_PROPERTY
public static final java.lang.String USE_STANDARD_UDF_PROPERTY
public static final java.lang.String SOCKET_BUFFER_SIZE_PROPERTY
public static final java.lang.String TIMESTAMP_USES_LOCAL_TIMEZONE_PROPERTY
public static final java.lang.String USER_NAME_PROPERTY
public static final java.lang.String PASSWORD_PROPERTY
public static final java.lang.String BUFFERS_NUMBER_PROPERTY
public static final java.lang.String DEFAULT_HOLDABLE_RS_PROPERTY
public static final java.lang.String SO_TIMEOUT
public static final java.lang.String CONNECT_TIMEOUT
public static final java.lang.String USE_FIREBIRD_AUTOCOMMIT
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String getDatabase()
getDatabase
in interface FirebirdConnectionProperties
public void setDatabase(java.lang.String database)
setDatabase
in interface FirebirdConnectionProperties
database
- path to the database including the server name and the
port, if needed.public java.lang.String getType()
getType
in interface FirebirdConnectionProperties
public void setType(java.lang.String type)
setType
in interface FirebirdConnectionProperties
type
- type of the connection, for example, "PURE_JAVA", "LOCAL",
"EMBEDDED", depends on the GDS implementations installed in the system.public int getBlobBufferSize()
getBlobBufferSize
in interface FirebirdConnectionProperties
public void setBlobBufferSize(int bufferSize)
setBlobBufferSize
in interface FirebirdConnectionProperties
bufferSize
- size of the BLOB buffer in bytes.public java.lang.String getCharSet()
getCharSet
in interface FirebirdConnectionProperties
FirebirdConnectionProperties.setCharSet(String)
public void setCharSet(java.lang.String charSet)
setCharSet
in interface FirebirdConnectionProperties
charSet
- Character set for the connection. Similar to
encoding
property, but accepts Java names
instead of Firebird ones.public java.lang.String getEncoding()
getEncoding
in interface FirebirdConnectionProperties
FirebirdConnectionProperties.setEncoding(String)
public void setEncoding(java.lang.String encoding)
setEncoding
in interface FirebirdConnectionProperties
encoding
- Character encoding for the connection. See Firebird
documentation for more information.public java.lang.String getRoleName()
getRoleName
in interface FirebirdConnectionProperties
public void setRoleName(java.lang.String roleName)
setRoleName
in interface FirebirdConnectionProperties
roleName
- SQL role to use.public java.lang.String getSqlDialect()
getSqlDialect
in interface FirebirdConnectionProperties
public void setSqlDialect(java.lang.String sqlDialect)
setSqlDialect
in interface FirebirdConnectionProperties
sqlDialect
- SQL dialect of the client.public java.lang.String getUseTranslation()
getUseTranslation
in interface FirebirdConnectionProperties
public void setUseTranslation(java.lang.String translationPath)
setUseTranslation
in interface FirebirdConnectionProperties
translationPath
- path to the character translation table.public boolean isUseStreamBlobs()
isUseStreamBlobs
in interface FirebirdConnectionProperties
true
if stream blobs should be created, otherwise
false
.public void setUseStreamBlobs(boolean useStreamBlobs)
setUseStreamBlobs
in interface FirebirdConnectionProperties
useStreamBlobs
- true
if stream blobs should be created,
otherwise false
.public boolean isUseStandardUdf()
isUseStandardUdf
in interface FirebirdConnectionProperties
true
if driver should assume that standard UDF are
installed.public void setUseStandardUdf(boolean useStandardUdf)
setUseStandardUdf
in interface FirebirdConnectionProperties
useStandardUdf
- true
if driver should assume that standard UDF
are installed.public int getSocketBufferSize()
getSocketBufferSize
in interface FirebirdConnectionProperties
public void setSocketBufferSize(int socketBufferSize)
setSocketBufferSize
in interface FirebirdConnectionProperties
socketBufferSize
- socket buffer size in bytes.public boolean isTimestampUsesLocalTimezone()
isTimestampUsesLocalTimezone
in interface FirebirdConnectionProperties
true
if the Jaybird 1.0 handling of the calendar
in corresponding setters. This is also compatible with MySQL
calendar treatment.public void setTimestampUsesLocalTimezone(boolean timestampUsesLocalTimezone)
setTimestampUsesLocalTimezone
in interface FirebirdConnectionProperties
timestampUsesLocalTimezone
- true
if the Jaybird 1.0 handling of the
calendar in corresponding setters. This is also compatible
with MySQL calendar treatment.public java.lang.String getUserName()
getUserName
in interface FirebirdConnectionProperties
public void setUserName(java.lang.String userName)
setUserName
in interface FirebirdConnectionProperties
userName
- name of the user that will be used when connecting to the
database.public java.lang.String getPassword()
getPassword
in interface FirebirdConnectionProperties
public void setPassword(java.lang.String password)
setPassword
in interface FirebirdConnectionProperties
password
- password corresponding to the specified user name.public int getBuffersNumber()
getBuffersNumber
in interface FirebirdConnectionProperties
public void setBuffersNumber(int buffersNumber)
setBuffersNumber
in interface FirebirdConnectionProperties
buffersNumber
- number of cache buffers that should be allocated for this
connection, should be specified for ClassicServer instances,
SuperServer has a server-wide configuration parameter.public java.lang.String getNonStandardProperty(java.lang.String key)
FirebirdConnectionProperties
getNonStandardProperty
in interface FirebirdConnectionProperties
key
- name of the property to get.public void setNonStandardProperty(java.lang.String key, java.lang.String value)
FirebirdConnectionProperties
setNonStandardProperty
in interface FirebirdConnectionProperties
key
- name of the property to set.value
- value of the property.public boolean isDefaultResultSetHoldable()
FirebirdConnectionProperties
isDefaultResultSetHoldable
in interface FirebirdConnectionProperties
true
when ResultSets are holdable by default, false
not holdable.public void setDefaultResultSetHoldable(boolean isHoldable)
FirebirdConnectionProperties
setDefaultResultSetHoldable
in interface FirebirdConnectionProperties
isHoldable
- true
when ResultSets are holdable by default, false
not holdable.public int getSoTimeout()
FirebirdConnectionProperties
getSoTimeout
in interface FirebirdConnectionProperties
public void setSoTimeout(int soTimeout)
FirebirdConnectionProperties
setSoTimeout
in interface FirebirdConnectionProperties
soTimeout
- Timeout in milliseconds (0 is 'infinite')public int getConnectTimeout()
FirebirdConnectionProperties
getConnectTimeout
in interface FirebirdConnectionProperties
public void setConnectTimeout(int connectTimeout)
FirebirdConnectionProperties
setConnectTimeout
in interface FirebirdConnectionProperties
connectTimeout
- Connect timeout in seconds (0 is 'infinite', or better: OS specific timeout)public boolean isUseFirebirdAutocommit()
FirebirdConnectionProperties
isUseFirebirdAutocommit
in interface FirebirdConnectionProperties
public void setUseFirebirdAutocommit(boolean useFirebirdAutocommit)
FirebirdConnectionProperties
setUseFirebirdAutocommit
in interface FirebirdConnectionProperties
useFirebirdAutocommit
- true
Use Firebird autocommitpublic void setNonStandardProperty(java.lang.String propertyMapping)
FirebirdConnectionProperties
setNonStandardProperty
in interface FirebirdConnectionProperties
propertyMapping
- parameter value in the ?propertyName[=propertyValue]? form,
this allows setting non-standard parameters using
configuration files.public DatabaseParameterBuffer getDatabaseParameterBuffer() throws java.sql.SQLException
FirebirdConnectionProperties
getDatabaseParameterBuffer
in interface FirebirdConnectionProperties
DatabaseParameterBuffer
.java.sql.SQLException
- if database parameter buffer cannot be created.public java.lang.String getTpbMapping()
FirebirdConnectionProperties
getTpbMapping
in interface FirebirdConnectionProperties
FirebirdConnectionProperties.setTpbMapping(String)
public void setTpbMapping(java.lang.String tpbMapping)
FirebirdConnectionProperties
"res:"
should be used to specify resource
in the classpath.
For the compatibility reasons, if no protocol is specified, classpath is used by default.
Properties file contains a mapping between the transaction isolation
level (name of the constant in the Connection
interface
and a comma-separated list of TPB parameters.
setTpbMapping
in interface FirebirdConnectionProperties
tpbMapping
- path to the properties file.public int getDefaultTransactionIsolation()
FirebirdConnectionProperties
getDefaultTransactionIsolation
in interface FirebirdConnectionProperties
public void setDefaultTransactionIsolation(int defaultIsolationLevel)
FirebirdConnectionProperties
setDefaultTransactionIsolation
in interface FirebirdConnectionProperties
defaultIsolationLevel
- default transaction isolation level.public java.lang.String getDefaultIsolation()
FirebirdConnectionProperties
FirebirdConnectionProperties.getDefaultTransactionIsolation()
, however
it takes a string as parameter instead of a numeric constant.getDefaultIsolation
in interface FirebirdConnectionProperties
FirebirdConnectionProperties.setDefaultIsolation(String)
public void setDefaultIsolation(java.lang.String isolation)
FirebirdConnectionProperties
FirebirdConnectionProperties.setDefaultTransactionIsolation(int)
,
however it takes a string as parameter instead of a numeric constant.
Following strings are allowed:
"TRANSACTION_READ_COMMITTED"
for a READ COMMITTED
isolation level.
"TRANSACTION_REPEATABLE_READ"
for a REPEATABLE READ
isolation level.
"TRANSACTION_SERIALIZABLE"
for a SERIALIZABLE
isolation level.
setDefaultIsolation
in interface FirebirdConnectionProperties
isolation
- string constant representing a default isolation level.public TransactionParameterBuffer getTransactionParameters(int isolation)
FirebirdConnectionProperties
getTransactionParameters
in interface FirebirdConnectionProperties
isolation
- transaction isolation level for which TPB should be returned.TransactionParameterBuffer
.public void setTransactionParameters(int isolation, TransactionParameterBuffer tpb)
FirebirdConnectionProperties
setTransactionParameters
in interface FirebirdConnectionProperties
isolation
- transaction isolation level.tpb
- instance of TransactionParameterBuffer
containing
transaction parameters.public FBTpbMapper getMapper() throws FBResourceException
FBResourceException
Copyright © 2001-2019 Jaybird (Firebird JDBC/JCA) team. All rights reserved.