• Topic
  • Discussion
  • UdaWikiWeb.ClassOPLDataSource(Last) -- Owiki? , 2016-08-19 14:59:42 Edit owiki 2016-08-19 14:59:42


    11.11.4. Class OPLDataSource
    OPLDataSource Classes OPLDataSource

    A DataSource object is a factory for Connection objects. An object that implements the DataSource interface will typically be registered with a JNDI service provider. A JDBC driver that is accessed via the DataSource API does not automatically register itself with the DriverManager.
    11.11.4.1. Synopsis

    public class OPLDataSource implements DataSource,Serializable,Referenceable {
    Public Constructors
    public OPLDataSource();
    Public Methods
    public Reference getReference() throws javax.naming.NamingException;
    public Connection getConnection() throws java.sql.SQLException;
    public Connection getConnection(java.lang.String user,
    java.lang.String password)
    throws java.sql.SQLException;
    public PrintWriter getLogWriter() throws java.sql.SQLException;
    public void setLogWriter(java.io.PrintWriter parm)
    throws java.sql.SQLException;
    public int getLoginTimeout() throws java.sql.SQLException;
    public void setLoginTimeout(int parm) throws java.sql.SQLException;
    public String getDataSourceName();
    public void setDataSourceName(java.lang.String parm);
    public String getDescription();
    public void setDescription(java.lang.String parm);
    public int getPortNumber();
    public void setPortNumber(int parm);
    public String getServerName();
    public void setServerName(java.lang.String parm);
    public String getDatabaseName();
    public void setDatabaseName(java.lang.String parm);
    public String getUser();
    public void setUser(java.lang.String parm);
    public String getPassword();
    public void setPassword(java.lang.String parm);
    public String getSVT();
    public void setSVT(java.lang.String parm);
    public boolean getReadOnly();
    public void setReadOnly(boolean parm);
    public String getDbOptions();
    public void setDbOptions(java.lang.String parm);
    public String getFBS();
    public void setFBS(java.lang.String parm);
    public String getCharSet();
    public void setCharSet(java.lang.String parm);
    public String getCursorModel();
    public void setCursorModel(java.lang.String parm);
    public String getConcurrencyType();
    public void setConcurrencyType(java.lang.String parm);
    public boolean getEncrypted();
    public void setEncrypted(boolean parm);
    public boolean getDeferLongFetch();
    public void setDeferLongFetch(boolean parm);
    public String getApplication();
    public void setApplication(java.lang.String parm);
    public boolean getUnicode();
    public void setUnicode(boolean parm);
    public String getURL();
    public void setURL(java.lang.String parm);
    }


    Inheritance Path
    java.lang.Object


    openlink.javax.OPLDataSource


    11.11.4.2. Members
    11.11.4.2.1. Method getApplication()
    getApplication Methods getApplication

    Synopsis: public String getApplication();


    Get the Application name set on this DataSource instance.

    11.11.4.2.2. Method getCharSet()
    getCharSet Methods getCharSet

    Synopsis: public String getCharSet();


    Get the charset of remote database set on this DataSource instance.

    11.11.4.2.3. Method getConcurrencyType()
    getConcurrencyType Methods getConcurrencyType

    Synopsis: public String getConcurrencyType();


    Get the default Concurrency Type for scrollable ResultSets set on this DataSource instance.

    11.11.4.2.4. Method getConnection()
    getConnection Methods getConnection

    Synopsis: public Connection getConnection() throws java.sql.SQLException;


    Exceptions

    java.sql.SQLException

    if a database-access error occurs

    Attempt to establish a database connection.

    11.11.4.2.5. Method getConnection(String, String)
    getConnection Methods getConnection

    Synopsis: public Connection getConnection(java.lang.String user,
    java.lang.String password)
    throws java.sql.SQLException;


    Parameters

    user - the database user on whose behalf the Connection is being made

    password - the user's password

    return - a Connection to the database

    Exceptions

    java.sql.SQLException

    if a database-access error occurs

    Attempt to establish a database connection.

    11.11.4.2.6. Method getCursorModel()
    getCursorModel Methods getCursorModel

    Synopsis: public String getCursorModel();


    Get the default Cursor Model for scrollable ResultSets set on this DataSource instance.

    11.11.4.2.7. Method getDatabaseName()
    getDatabaseName Methods getDatabaseName

    Synopsis: public String getDatabaseName();


    Get the name of the database set on this DataSource instance.

    11.11.4.2.8. Method getDataSourceName()
    getDataSourceName Methods getDataSourceName

    Synopsis: public String getDataSourceName();


    Get the datasource name for this instance if set. The default value is "OPLDataSourceName"

    11.11.4.2.9. Method getDbOptions()
    getDbOptions Methods getDbOptions

    Synopsis: public String getDbOptions();


    Get the Database Options set on this DataSource instance.

    11.11.4.2.10. Method getDeferLongFetch()
    getDeferLongFetch Methods getDeferLongFetch

    Synopsis: public boolean getDeferLongFetch();


    Get if the DataSource instance uses the deferLongFetch for long data.

    11.11.4.2.11. Method getDescription()
    getDescription Methods getDescription

    Synopsis: public String getDescription();


    Get the description of this data source.

    11.11.4.2.12. Method getEncrypted()
    getEncrypted Methods getEncrypted

    Synopsis: public boolean getEncrypted();


    Get if the outgoing packets are encrypted for this DataSource instance.

    11.11.4.2.13. Method getFBS()
    getFBS Methods getFBS

    Synopsis: public String getFBS();


    Get the Fetch Buffer Size set on this DataSource instance.

    11.11.4.2.14. Method getLoginTimeout()
    getLoginTimeout Methods getLoginTimeout

    Synopsis: public int getLoginTimeout() throws java.sql.SQLException;


    Exceptions

    java.sql.SQLException

    if a database-access error occurs

    Gets the maximum time in seconds that this data source can wait while attempting to connect to a database. A value of zero means that the timeout is the default system timeout if there is one; otherwise it means that there is no timeout. When a DataSource object is created the login timeout is initially zero.

    11.11.4.2.15. Method getLogWriter()
    getLogWriter Methods getLogWriter

    Synopsis: public PrintWriter getLogWriter() throws java.sql.SQLException;


    Exceptions

    java.sql.SQLException

    if a database-access error occurs

    The log writer is a character output stream to which all logging and tracing messages for this data source object instance will be printed. This includes messages printed by the methods of this object, messages printed by methods of other objects manufactured by this object, and so on. Messages printed to a data source specific log writer are not printed to the log writer associated with the java.sql.Drivermanager class. When a DataSource object is created the log writer is initially null, in other words, logging is disabled.

    11.11.4.2.16. Method getPassword()
    getPassword Methods getPassword

    Synopsis: public String getPassword();


    Get the password set on this DataSource instance.

    11.11.4.2.17. Method getPortNumber()
    getPortNumber Methods getPortNumber

    Synopsis: public int getPortNumber();


    Get the port number on which oplrqb is listening for requests. The default value is 5000

    11.11.4.2.18. Method getReadOnly()
    getReadOnly Methods getReadOnly

    Synopsis: public boolean getReadOnly();


    Get the ReadOnly attribute set on this DataSource instance.

    11.11.4.2.19. Method getServerName()
    getServerName Methods getServerName

    Synopsis: public String getServerName();


    Get the name of the host on which oplrqb is running. The default value is "localhost"

    11.11.4.2.20. Method getSVT()
    getSVT Methods getSVT

    Synopsis: public String getSVT();


    Get the ServerType set on this DataSource instance.

    11.11.4.2.21. Method getUnicode()
    getUnicode Methods getUnicode

    Synopsis: public boolean getUnicode();


    Get if the DataSource instance uses the Unicode connection with a DBMS agent.

    11.11.4.2.22. Method getURL()
    getURL Methods getURL

    Synopsis: public String getURL();


    Get the URL for this Datasource instance.

    11.11.4.2.23. Method getUser()
    getUser Methods getUser

    Synopsis: public String getUser();


    Get the user name set on this DataSource instance.

    11.11.4.2.24. Method setApplication(String)
    setApplication Methods setApplication

    Synopsis: public void setApplication(java.lang.String parm);


    Parameters

    parm - Application name to be set

    Set the Application name with which connections have to be obtained. Will be overwritten with value from URL, if URL is set.

    11.11.4.2.25. Method setCharSet(String)
    setCharSet Methods setCharSet

    Synopsis: public void setCharSet(java.lang.String parm);


    Parameters

    parm - CharSet to be set

    Set the charset of remote database with which connections have to be obtained. The default value is get from System.getProperty("fil... Will be overwritten with value from URL, if URL is set.

    11.11.4.2.26. Method setConcurrencyType(String)
    setConcurrencyType Methods setConcurrencyType

    Synopsis: public void setConcurrencyType(java.lang.String parm);


    Parameters

    parm - Concurrency Type to be set

    Set the default Concurrency Type for scrollable ResultSets with which connections have to be obtained. Will be overwritten with value from URL, if URL is set.

    11.11.4.2.27. Method setCursorModel(String)
    setCursorModel Methods setCursorModel

    Synopsis: public void setCursorModel(java.lang.String parm);


    Parameters

    parm - CursorModel to be set

    Set the default Cursor Model for scrollable ResultSets with which connections have to be obtained. Will be overwritten with value from URL, if URL is set.

    11.11.4.2.28. Method setDatabaseName(String)
    setDatabaseName Methods setDatabaseName

    Synopsis: public void setDatabaseName(java.lang.String parm);


    Parameters

    parm - database name to be set

    Set the name of a particular database on a server. Will be overwritten with value from URL, if URL is set.

    11.11.4.2.29. Method setDataSourceName(String)
    setDataSourceName Methods setDataSourceName

    Synopsis: public void setDataSourceName(java.lang.String parm);


    Parameters

    parm - DataSource name to be set

    Set the DataSource name. The default value is "OPLDataSourceName"

    11.11.4.2.30. Method setDbOptions(String)
    setDbOptions Methods setDbOptions

    Synopsis: public void setDbOptions(java.lang.String parm);


    Parameters

    parm - Database Options to be set

    Set the Database Options with which connections have to be obtained. Will be overwritten with value from URL, if URL is set.

    11.11.4.2.31. Method setDeferLongFetch(boolean)
    setDeferLongFetch Methods setDeferLongFetch

    Synopsis: public void setDeferLongFetch(boolean parm);


    Parameters

    parm - true for a DeferLongFetch connection

    Set the DeferLongFetch attribute with which connections have to be obtained. The default value is false . Will be overwritten with value from URL, if URL is set.

    11.11.4.2.32. Method setDescription(String)
    setDescription Methods setDescription

    Synopsis: public void setDescription(java.lang.String parm);


    Parameters

    parm - Description to be set.

    Set the description for this data source instance.

    11.11.4.2.33. Method setEncrypted(boolean)
    setEncrypted Methods setEncrypted

    Synopsis: public void setEncrypted(boolean parm);


    Parameters

    parm - true if outgoing packets must be encrypted

    Set the Encrypted flag for outgoing packets with which connections have to be obtained. Will be overwritten with value from URL, if URL is set.

    11.11.4.2.34. Method setFBS(String)
    setFBS Methods setFBS

    Synopsis: public void setFBS(java.lang.String parm);


    Parameters

    parm - FetchBufferSize to be set

    Sets number of JDBC resultset rows that get packed into a single network packet Will be overwritten with value from URL, if URL is set.

    11.11.4.2.35. Method setLoginTimeout(int)
    setLoginTimeout Methods setLoginTimeout

    Synopsis: public void setLoginTimeout(int parm) throws java.sql.SQLException;


    Parameters

    parm - the data source login time limit (in seconds)

    Exceptions

    java.sql.SQLException

    if a database-access error occurs

    Sets the maximum time in seconds that this data source will wait while attempting to connect to a database. A value of zero specifies that the timeout is the default system timeout if there is one; otherwise it specifies that there is no timeout. When a DataSource object is created the login timeout is initially zero.

    11.11.4.2.36. Method setLogWriter(PrintWriter)
    setLogWriter Methods setLogWriter

    Synopsis: public void setLogWriter(java.io.PrintWriter parm)
    throws java.sql.SQLException;


    Parameters

    parm - the new log writer; to disable, set to null

    Exceptions

    java.sql.SQLException

    if a database-access error occurs

    The log writer is a character output stream to which all logging and tracing messages for this data source object instance will be printed. This includes messages printed by the methods of this object, messages printed by methods of other objects manufactured by this object, and so on. Messages printed to a data source specific log writer are not printed to the log writer associated with the java.sql.Drivermanager class. When a DataSource object is created the log writer is initially null, in other words, logging is disabled.

    11.11.4.2.37. Method setPassword(String)
    setPassword Methods setPassword

    Synopsis: public void setPassword(java.lang.String parm);


    Parameters

    parm - password to be set

    Set the password with which connections have to be obtained. Will be overwritten with value from URL, if URL is set.

    11.11.4.2.38. Method setPortNumber(int)
    setPortNumber Methods setPortNumber

    Synopsis: public void setPortNumber(int parm);


    Parameters

    parm - port number on which oplrqb is listening

    Set the port number where the oplrqb is listening for requests. The default value is 5000 . Will be overwritten with value from URL, if URL is set.

    11.11.4.2.39. Method setReadOnly(boolean)
    setReadOnly Methods setReadOnly

    Synopsis: public void setReadOnly(boolean parm);


    Parameters

    parm - true for a readOnly connection

    Set the ReadOnly attribute with which connections have to be obtained. The default value is false . Will be overwritten with value from URL, if URL is set.

    11.11.4.2.40. Method setServerName(String)
    setServerName Methods setServerName

    Synopsis: public void setServerName(java.lang.String parm);


    Parameters

    parm - name of the host on which oplrqb is running

    Set the name of the host where the oplrqb is running. The default value is "localhost" . Will be overwritten with value from URL, if URL is set.

    11.11.4.2.41. Method setSVT(String)
    setSVT Methods setSVT

    Synopsis: public void setSVT(java.lang.String parm);


    Parameters

    parm - ServerType to be set

    Set the ServerType with which connections have to be obtained. Will be overwritten with value from URL, if URL is set.

    11.11.4.2.42. Method setUnicode(boolean)
    setUnicode Methods setUnicode

    Synopsis: public void setUnicode(boolean parm);


    Parameters

    parm - true for a Unicode connection

    Set the Unicode attribute with which connections have to be obtained. The default value is false . Will be overwritten with value from URL, if URL is set.

    11.11.4.2.43. Method setURL(String)
    setURL Methods setURL

    Synopsis: public void setURL(java.lang.String parm);


    Parameters

    parm - URL to be set

    Set the URL with which connections have to be obtained.

    11.11.4.2.44. Method setUser(String)
    setUser Methods setUser

    Synopsis: public void setUser(java.lang.String parm);


    Parameters

    parm - username to be set

    Set the user name with which connections have to be obtained. Will be overwritten with value from URL, if URL is set.


    Referenced by...