Container for default property constants.
This class also provides static utility methods for
Properties and Settings objects.
To add new properties to the jTDS driver, do the following:
Add prop.foo and prop.desc.foo
properties to Messages.properties.
Update Driver.createChoicesMap() and
DriverUnitTest.test_getPropertyInfo_Choices() if the property
has a specific set of inputs, e.g., "true" and "false", or "1" and "2".
Update Driver.createRequiredTrueMap() and
DriverUnitTest.test_getPropertyInfo_Required() if the property
is required.
Add a new test to DefaultPropertiesTestLibrary for the new
property.
author: David D. Kilzer version: $Id: DefaultProperties.java,v 1.32 2007/08/22 18:22:04 bheineman Exp $
Add default properties to the props properties object.
Parameters: props - The properties object. The updated props object, or nullif the serverType property is not set.
getNamedPipePath
public static String getNamedPipePath(int serverType)(Code)
Returns the default path for the named pipe for a given serverType.
Parameters: serverType - Driver.SQLSERVER or Driver.SYBASE or 0 (default) default named pipe path throws: IllegalArgumentException - if an invalid serverType is given
getServerType
public static String getServerType(int serverType)(Code)
Converts an integer server type to its string representation.
Parameters: serverType - the server type as an int the server type as a string if known, or null if unknown
Converts a string server type to its integer representation.
Parameters: serverType - the server type as a string the server type as an integer if known or null ifunknown
getServerTypeWithDefault
public static String getServerTypeWithDefault(int serverType)(Code)
Same as
DefaultProperties.getServerType(int) , only it returns the default server
type ("sqlserver") if serverType is 0.
Parameters: serverType - integer server type or 0 for default the server type as a string if known or "sqlserver"if unknown
Converts a string TDS version to its integer representation.
Parameters: tdsVersion - The TDS version as a string. The TDS version as an integer if known, or null if unknown.