⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 defaultproperties.java

📁 第三方的SQL Server and Sybase的jdbc dirver,速度更快
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
// jTDS JDBC Driver for Microsoft SQL Server and Sybase// Copyright (C) 2004 The jTDS Project//// This library is free software; you can redistribute it and/or// modify it under the terms of the GNU Lesser General Public// License as published by the Free Software Foundation; either// version 2.1 of the License, or (at your option) any later version.//// This library is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU// Lesser General Public License for more details.//// You should have received a copy of the GNU Lesser General Public// License along with this library; if not, write to the Free Software// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA//package net.sourceforge.jtds.jdbc;import java.util.Properties;import java.util.Map;import java.util.HashMap;import net.sourceforge.jtds.ssl.Ssl;/** * Container for default property constants. * <p/> * This class also provides static utility methods for * {@link Properties} and <code>Settings</code> objects. * <p/> * To add new properties to the jTDS driver, do the following: * <ol> * <li>Add <code>prop.<em>foo</em></code> and <code>prop.desc.<em>foo</em></code> *     properties to <code>Messages.properties</code>.</li> * <li>Add a <code>static final</code> default field to {@link DefaultProperties}.</li> * <li>Update {@link #addDefaultProperties(java.util.Properties)} to set the default.</li> * <li>Update {@link Driver#createChoicesMap()} and *     <code>DriverUnitTest.test_getPropertyInfo_Choices()</code> if the property *     has a specific set of inputs, e.g., "true" and "false", or "1" and "2".</li> * <li>Update {@link Driver#createRequiredTrueMap()} and *     <code>DriverUnitTest.test_getPropertyInfo_Required()</code> if the property *     is required.</li> * <li>Add a new test to <code>DefaultPropertiesTestLibrary</code> for the new *     property.</li> * </ol> * * @author David D. Kilzer * @version $Id: DefaultProperties.java,v 1.24 2005/06/16 09:32:27 alin_sinpalean Exp $ */public final class DefaultProperties {    /** Default <code>appName</code> property. */    public static final String APP_NAME = "jTDS";    /** Default <code>batchSize</code> property for SQL Server. */    public static final String BATCH_SIZE_SQLSERVER = "0";    /** Default <code>batchSize</code> property for Sybase. */    public static final String BATCH_SIZE_SYBASE = "1000";    /** Default <code>bufferMaxMemory</code> property. */    public static final String BUFFER_MAX_MEMORY = "1024";    /** Default <code>bufferMinPackets</code> property. */    public static final String BUFFER_MIN_PACKETS = "8";    /** Default <code>cacheMetaData</code> property. */    public static final String CACHEMETA = "false";    /** Default <code>charset</code> property. */    public static final String CHARSET = "";    /** Default <code>databaseName</code> property. */    public static final String DATABASE_NAME = "";    /** Default <code>instance</code> property. */    public static final String INSTANCE = "";    /** Default <code>domain</code> property. */    public static final String DOMAIN = "";    /** Default <code>lastUpdateCount</code> property. */    public static final String LAST_UPDATE_COUNT = "true";    /** Default <code>lobBufferSize</code> property. */    public static final String LOB_BUFFER_SIZE = "32768";    /** Default <code>loginTimeout</code> property. */    public static final String LOGIN_TIMEOUT = "0";    /** Default <code>macAddress</code> property. */    public static final String MAC_ADDRESS = "000000000000";    /** Default <code>maxStatements</code> property. */    public static final String MAX_STATEMENTS = "500";    /** Default <code>namedPipe</code> property. */    public static final String NAMED_PIPE = "false";    /** Default <code>namedPipePath</code> property for SQL Server. */    public static final String NAMED_PIPE_PATH_SQLSERVER = "/sql/query";    /** Default <code>namedPipePath</code> property for Sybase. */    public static final String NAMED_PIPE_PATH_SYBASE = "/sybase/query";    /** Default <code>packetSize</code> property for TDS 4.2 and TDS 5.0. */    public static final String PACKET_SIZE_42_50 = String.valueOf(TdsCore.MIN_PKT_SIZE);    /** Default <code>packetSize</code> property for TDS 7.0 and TDS 8.0. */    public static final String PACKET_SIZE_70_80 = "0"; // server sets packet size    /** Default <code>password</code> property. */    public static final String PASSWORD = "";    /** Default <code>portNumber</code> property for SQL Server. */    public static final String PORT_NUMBER_SQLSERVER = "1433";    /** Default <code>portNumber</code> property for Sybase. */    public static final String PORT_NUMBER_SYBASE = "7100";    /** Default <code>language</code> property. */    public static final String LANGUAGE = "";    /** Default <code>prepareSql</code> property for SQL Server. */    public static final String PREPARE_SQLSERVER = String.valueOf(TdsCore.PREPARE);    /** Default <code>prepareSql</code> property for Sybase. */    public static final String PREPARE_SYBASE = String.valueOf(TdsCore.TEMPORARY_STORED_PROCEDURES);    /** Default <code>progName</code> property. */    public static final String PROG_NAME = "jTDS";    /** Default <code>tcpNoDelay</code> property. */    public static final String TCP_NODELAY = "true";    /** Default <code>sendStringParametersAsUnicode</code> property. */    public static final String USE_UNICODE = "true";    /** Default <code>useCursors</code> property. */    public static final String USECURSORS = "false";    /** Default <code>useLOBs</code> property. */    public static final String USELOBS = "true";    /** Default <code>user</code> property. */    public static final String USER = "";    /** Default <code>wsid</code> property. */    public static final String WSID = "";    /** Default <code>XaEmulation</code> property. */    public static final String XAEMULATION = "true";    /** Default <code>logfile</code> property. */    public static final String LOGFILE = "";    /** Default <code>serverType</code> property for SQL Server. */    public static final String SERVER_TYPE_SQLSERVER = "sqlserver";    /** Default <code>serverType</code> property for Sybase. */    public static final String SERVER_TYPE_SYBASE = "sybase";    /** Default <code>tds</code> property for TDS 4.2. */    public static final String TDS_VERSION_42 = "4.2";    /** Default <code>tds</code> property for TDS 5.0. */    public static final String TDS_VERSION_50 = "5.0";    /** Default <code>tds</code> property for TDS 7.0. */    public static final String TDS_VERSION_70 = "7.0";    /** Default <code>tds</code> property for TDS 8.0. */    public static final String TDS_VERSION_80 = "8.0";    /** Default <code>ssl</code> property. */    public static final String SSL = Ssl.SSL_OFF;    /** Default TDS version based on server type */    private static final HashMap tdsDefaults;    /** Default port number based on server type */    private static final HashMap portNumberDefaults;    /** Default packet size based on TDS version */    private static final HashMap packetSizeDefaults;    /** Default max batch size based on server type */    private static final HashMap batchSizeDefaults;    /** Default prepare SQL mode based on server type */    private static final HashMap prepareSQLDefaults;    static {        tdsDefaults = new HashMap(2);        tdsDefaults.put(String.valueOf(Driver.SQLSERVER), TDS_VERSION_80);        tdsDefaults.put(String.valueOf(Driver.SYBASE), TDS_VERSION_50);        portNumberDefaults = new HashMap(2);        portNumberDefaults.put(String.valueOf(Driver.SQLSERVER), PORT_NUMBER_SQLSERVER);        portNumberDefaults.put(String.valueOf(Driver.SYBASE), PORT_NUMBER_SYBASE);        packetSizeDefaults = new HashMap(4);        packetSizeDefaults.put(TDS_VERSION_42, PACKET_SIZE_42_50);        packetSizeDefaults.put(TDS_VERSION_50, PACKET_SIZE_42_50);        packetSizeDefaults.put(TDS_VERSION_70, PACKET_SIZE_70_80);        packetSizeDefaults.put(TDS_VERSION_80, PACKET_SIZE_70_80);        batchSizeDefaults = new HashMap(2);        batchSizeDefaults.put(String.valueOf(Driver.SQLSERVER),                BATCH_SIZE_SQLSERVER);        batchSizeDefaults.put(String.valueOf(Driver.SYBASE),                BATCH_SIZE_SYBASE);        prepareSQLDefaults = new HashMap(2);        prepareSQLDefaults.put(String.valueOf(Driver.SQLSERVER),                PREPARE_SQLSERVER);        prepareSQLDefaults.put(String.valueOf(Driver.SYBASE),

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -