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

📄 connectionjdbc2.java

📁 jtds的源码 是你学习java的好东西
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
    /**
     * Retrieves the maximum statement cache size.
     *
     * @return the maximum statement cache size
     */
    int getMaxStatements() {
        return maxStatements;
    }

    /**
     * Retrieves the server type.
     *
     * @return the server type as an <code>int</code> where 1 == SQLSERVER and
     *         2 == SYBASE.
     */
    public int getServerType() {
        return this.serverType;
    }

    /**
     * Sets the network packet size.
     *
     * @param size the new packet size
     */
    void setNetPacketSize(int size) {
        this.netPacketSize = size;
    }

    /**
     * Retrieves the network packet size.
     *
     * @return the packet size as an <code>int</code>
     */
    int getNetPacketSize() {
        return this.netPacketSize;
    }

    /**
     * Retrieves the current row count on this connection.
     *
     * @return the row count as an <code>int</code>
     */
    int getRowCount() {
        return this.rowCount;
    }

    /**
     * Sets the current row count on this connection.
     *
     * @param count the new row count
     */
    void setRowCount(int count) {
        rowCount = count;
    }

    /**
     * Retrieves the current maximum textsize on this connection.
     *
     * @return the maximum textsize as an <code>int</code>
     */
    public int getTextSize() {
        return textSize;
    }

    /**
     * Sets the current maximum textsize on this connection.
     *
     * @param textSize the new maximum textsize
     */
    public void setTextSize(int textSize) {
        this.textSize = textSize;
    }

    /**
     * Retrieves the status of the lastUpdateCount flag.
     *
     * @return the lastUpdateCount flag as a <code>boolean</code>
     */
    boolean getLastUpdateCount() {
        return this.lastUpdateCount;
    }

    /**
     * Retrieves the maximum decimal precision.
     *
     * @return the precision as an <code>int</code>
     */
    int getMaxPrecision() {
        return this.maxPrecision;
    }

    /**
     * Retrieves the LOB buffer size.
     *
     * @return the LOB buffer size as a <code>long</code>
     */
    long getLobBuffer() {
        return this.lobBuffer;
    }

    /**
     * Retrieves the Prepared SQL method.
     *
     * @return the Prepared SQL method
     */
    int getPrepareSql() {
        return this.prepareSql;
    }

    /**
     * Retrieves the batch size to be used internally.
     *
     * @return the batch size as an <code>int</code>
     */
    int getBatchSize() {
        return this.batchSize;
    }

    /**
     * Retrieves the boolean indicating whether metadata caching
     * is enabled.
     *
     * @return <code>true</code> if metadata caching is enabled,
     *         <code>false</code> if caching is disabled
     */
    boolean getUseMetadataCache() {
        return this.useMetadataCache;
    }

    /**
     * Indicates whether fast forward only cursors should be used for forward
     * only result sets.
     *
     * @return <code>true</code> if fast forward cursors are requested
     */
    boolean getUseCursors() {
        return this.useCursors;
    }

    /**
     * Indicates whether large types (IMAGE and TEXT/NTEXT) should be mapped by
     * default to LOB types or <code>String</code> and <code>byte[]</code>
     * respectively.
     *
     * @return <code>true</code> if the default mapping should be to LOBs,
     *         <code>false</code> otherwise
     */
    boolean getUseLOBs() {
        return this.useLOBs;
    }

    /**
     * Indicates whether, when doing Windows authentication to an MS SQL server,
     * NTLMv2 should be used. When this is set to "false", LM and NTLM responses
     * are sent to the server, which should work fine in most cases. However,
     * some servers are configured to require LMv2 and NTLMv2. In these rare
     * cases, this property should be set to "true".
     */
    boolean getUseNTLMv2() {
        return this.useNTLMv2;
    }

    /**
     * Retrieves the application name for this connection.
     *
     * @return the application name
     */
    String getAppName() {
        return this.appName;
    }

    /**
     * Retrieves the bind address for this connection.
     *
     * @return the bind address
     */
    String getBindAddress() {
        return this.bindAddress;
    }

    /**
     * Returns the directory where data should be buffered to.
     *
     * @return the directory where data should be buffered to.
     */
    File getBufferDir() {
        return this.bufferDir;
    }

    /**
     * Retrieves the maximum amount of memory in Kb to buffer for <em>all</em> connections.
     *
     * @return the maximum amount of memory in Kb to buffer for <em>all</em> connections
     */
    int getBufferMaxMemory() {
        return this.bufferMaxMemory;
    }

    /**
     * Retrieves the minimum number of packets to buffer per {@link Statement} for this connection.
     *
     * @return the minimum number of packets to buffer per {@link Statement}
     */
    int getBufferMinPackets() {
        return this.bufferMinPackets;
    }

    /**
     * Retrieves the database name for this connection.
     *
     * @return the database name
     */
    String getDatabaseName() {
        return this.databaseName;
    }

    /**
     * Retrieves the domain name for this connection.
     *
     * @return the domain name
     */
    String getDomainName() {
        return this.domainName;
    }

    /**
     * Retrieves the instance name for this connection.
     *
     * @return the instance name
     */
    String getInstanceName() {
        return this.instanceName;
    }

    /**
     * Retrieves the login timeout for this connection.
     *
     * @return the login timeout
     */
    int getLoginTimeout() {
        return this.loginTimeout;
    }

    /**
     * Retrieves the socket timeout for this connection.
     *
     * @return the socket timeout
     */
    int getSocketTimeout() {
        return this.socketTimeout;
    }

    /**
     * Retrieves the MAC (ethernet) address for this connection.
     *
     * @return the MAC (ethernet) address
     */
    String getMacAddress() {
        return this.macAddress;
    }

    /**
     * Retrieves the named pipe setting for this connection.
     *
     * @return the named pipe setting
     */
    boolean getNamedPipe() {
        return this.namedPipe;
    }

    /**
     * Retrieves the packet size for this connection.
     *
     * @return the packet size
     */
    int getPacketSize() {
        return this.packetSize;
    }

    /**
     * Retrieves the password for this connection.
     *
     * @return the password
     */
    String getPassword() {
        return this.password;
    }

    /**
     * Retrieves the port number for this connection.
     *
     * @return the port number
     */
    int getPortNumber() {
        return this.portNumber;
    }

    /**
     * Retrieves the program name for this connection.
     *
     * @return the program name
     */
    String getProgName() {
        return this.progName;
    }

    /**
     * Retrieves the server name for this connection.
     *
     * @return the server name
     */
    String getServerName() {
        return this.serverName;
    }

    /**
     * Retrieves the tcpNoDelay setting for this connection.
     *
     * @return the tcpNoDelay setting
     */
    boolean getTcpNoDelay() {
        return this.tcpNoDelay;
    }

    /**
     * Retrieves the useJCIFS setting for this connection.
     *
     * @return the useJCIFS setting
     */
    boolean getUseJCIFS() {
        return this.useJCIFS;
    }

    /**
     * Retrieves the user for this connection.
     *
     * @return the user
     */
    String getUser() {
        return this.user;
    }

    /**
     * Retrieves the workstation ID (WSID) for this connection.
     *
     * @return the workstation ID (WSID)
     */
    String getWsid() {
        return this.wsid;
    }

    /**
     * Transfers the properties to the local instance variables.
     *
     * @param info The connection properties Object.
     * @throws SQLException If an invalid property value is found.
     */
    protected void unpackProperties(Properties info)
            throws SQLException {

        serverName = info.getProperty(Messages.get(Driver.SERVERNAME));
        portNumber = parseIntegerProperty(info, Driver.PORTNUMBER);
        serverType = parseIntegerProperty(info, Driver.SERVERTYPE);
        databaseName = info.getProperty(Messages.get(Driver.DATABASENAME));
        instanceName = info.getProperty(Messages.get(Driver.INSTANCE));
        domainName = info.getProperty(Messages.get(Driver.DOMAIN));
        user = info.getProperty(Messages.get(Driver.USER));
        password = info.getProperty(Messages.get(Driver.PASSWORD));
        macAddress = info.getProperty(Messages.get(Driver.MACADDRESS));

⌨️ 快捷键说明

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