APP_NAME
public static final String APP_NAME
Default appName property.
BATCH_SIZE_SQLSERVER
public static final String BATCH_SIZE_SQLSERVER
Default batchSize property for SQL Server.
BATCH_SIZE_SYBASE
public static final String BATCH_SIZE_SYBASE
Default batchSize property for Sybase.
BIND_ADDRESS
public static final String BIND_ADDRESS
Default bindAddress property.
BUFFER_DIR
public static final String BUFFER_DIR
Default tmpDir property.
BUFFER_MAX_MEMORY
public static final String BUFFER_MAX_MEMORY
Default bufferMaxMemory property.
BUFFER_MIN_PACKETS
public static final String BUFFER_MIN_PACKETS
Default bufferMinPackets property.
CACHEMETA
public static final String CACHEMETA
Default cacheMetaData property.
CHARSET
public static final String CHARSET
Default charset property.
DATABASE_NAME
public static final String DATABASE_NAME
Default databaseName property.
DOMAIN
public static final String DOMAIN
Default domain property.
INSTANCE
public static final String INSTANCE
Default instance property.
LANGUAGE
public static final String LANGUAGE
Default language property.
LAST_UPDATE_COUNT
public static final String LAST_UPDATE_COUNT
Default lastUpdateCount property.
LOB_BUFFER_SIZE
public static final String LOB_BUFFER_SIZE
Default lobBufferSize property.
LOGFILE
public static final String LOGFILE
Default logfile property.
LOGIN_TIMEOUT
public static final String LOGIN_TIMEOUT
Default loginTimeout property.
MAC_ADDRESS
public static final String MAC_ADDRESS
Default macAddress property.
MAX_STATEMENTS
public static final String MAX_STATEMENTS
Default maxStatements property.
NAMED_PIPE
public static final String NAMED_PIPE
Default namedPipe property.
NAMED_PIPE_PATH_SQLSERVER
public static final String NAMED_PIPE_PATH_SQLSERVER
Default namedPipePath property for SQL Server.
NAMED_PIPE_PATH_SYBASE
public static final String NAMED_PIPE_PATH_SYBASE
Default namedPipePath property for Sybase.
PACKET_SIZE_42
public static final String PACKET_SIZE_42
Default packetSize property for TDS 4.2.
PACKET_SIZE_50
public static final String PACKET_SIZE_50
Default packetSize property for TDS 5.0.
PACKET_SIZE_70_80
public static final String PACKET_SIZE_70_80
Default packetSize property for TDS 7.0 and TDS 8.0.
PASSWORD
public static final String PASSWORD
Default password property.
PORT_NUMBER_SQLSERVER
public static final String PORT_NUMBER_SQLSERVER
Default portNumber property for SQL Server.
PORT_NUMBER_SYBASE
public static final String PORT_NUMBER_SYBASE
Default portNumber property for Sybase.
PREPARE_SQLSERVER
public static final String PREPARE_SQLSERVER
Default prepareSql property for SQL Server.
PREPARE_SYBASE
public static final String PREPARE_SYBASE
Default prepareSql property for Sybase.
PROG_NAME
public static final String PROG_NAME
Default progName property.
SERVER_TYPE_SQLSERVER
public static final String SERVER_TYPE_SQLSERVER
Default serverType property for SQL Server.
SERVER_TYPE_SYBASE
public static final String SERVER_TYPE_SYBASE
Default serverType property for Sybase.
SOCKET_TIMEOUT
public static final String SOCKET_TIMEOUT
Default sockeTimeout property.
SSL
public static final String SSL
Default ssl property.
TCP_NODELAY
public static final String TCP_NODELAY
Default tcpNoDelay property.
TDS_VERSION_42
public static final String TDS_VERSION_42
Default tds property for TDS 4.2.
TDS_VERSION_50
public static final String TDS_VERSION_50
Default tds property for TDS 5.0.
TDS_VERSION_70
public static final String TDS_VERSION_70
Default tds property for TDS 7.0.
TDS_VERSION_80
public static final String TDS_VERSION_80
Default tds property for TDS 8.0.
USECURSORS
public static final String USECURSORS
Default useCursors property.
USEJCIFS
public static final String USEJCIFS
Default useJCIFS property.
USELOBS
public static final String USELOBS
Default useLOBs property.
USER
public static final String USER
Default user property.
USE_UNICODE
public static final String USE_UNICODE
Default sendStringParametersAsUnicode property.
WSID
public static final String WSID
Default wsid property.
XAEMULATION
public static final String XAEMULATION
Default XaEmulation property.
batchSizeDefaults
private static final HashMap batchSizeDefaults
Default max batch size based on server type
packetSizeDefaults
private static final HashMap packetSizeDefaults
Default packet size based on TDS version
portNumberDefaults
private static final HashMap portNumberDefaults
Default port number based on server type
prepareSQLDefaults
private static final HashMap prepareSQLDefaults
Default prepare SQL mode based on server type
tdsDefaults
private static final HashMap tdsDefaults
Default TDS version based on server type
addDefaultProperties
public static Properties addDefaultProperties(Properties props)
Add default properties to the props properties object.
props - The properties object.
- The updated
props object, or null
if the serverType property is not set.
addDefaultPropertyIfNotSet
private static void addDefaultPropertyIfNotSet(Properties props,
String key,
String defaultValue) Sets a default property if the property is not already set.
props - The properties object.key - The message key to set.defaultValue - The default value to set.
addDefaultPropertyIfNotSet
private static void addDefaultPropertyIfNotSet(Properties props,
String key,
String defaultKey,
Map defaults) Sets a default property if the property is not already set, using
the defaultKey and the defaults map to
determine the correct value.
props - The properties object.key - The message key to set.defaultKey - The key whose value determines which default
value to set from defaults.defaults - The mapping of defaultKey values to
the correct key value to set.
getNamedPipePath
public static String getNamedPipePath(int serverType)
Returns the default path for the named pipe for a given serverType.
getServerType
public static Integer getServerType(String serverType)
Converts a string server type to its integer representation.
serverType - the server type as a string
- the server type as an integer if known or
null if
unknown
getServerType
public static String getServerType(int serverType)
Converts an integer server type to its string representation.
serverType - the server type as an int
- the server type as a string if known, or
null if unknown
getServerTypeWithDefault
public static String getServerTypeWithDefault(int serverType)
Same as
getServerType(int), only it returns the default server
type (
"sqlserver") if
serverType is 0.
serverType - integer server type or 0 for default
- the server type as a string if known or
"sqlserver"
if unknown
getTdsVersion
public static Integer getTdsVersion(String tdsVersion)
Converts a string TDS version to its integer representation.
tdsVersion - The TDS version as a string.
- The TDS version as an integer if known, or
null if unknown.