com.orientechnologies.orient.jdbc

## Class OrientDataSource

- java.lang.Object
- - com.orientechnologies.orient.jdbc.OrientDataSource

All Implemented Interfaces:
  java.sql.Wrapper, javax.sql.CommonDataSource, javax.sql.DataSource

    public class OrientDataSource
    extends java.lang.Object
    implements javax.sql.DataSource

### Constructor Summary

Constructors
Constructor and Description
`OrientDataSource()`
`OrientDataSource(OrientDB orientDB)` Deprecated.
`OrientDataSource(OrientDB orientDB, java.lang.String dbName)`
`OrientDataSource(java.lang.String dbUrl, java.lang.String username, java.lang.String password, java.util.Properties info)` Creates a `DataSource`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `close()`
`java.sql.Connection` `getConnection()`
`java.sql.Connection` `getConnection(java.lang.String username, java.lang.String password)`
`int` `getLoginTimeout()`
`java.io.PrintWriter` `getLogWriter()`
`java.util.logging.Logger` `getParentLogger()`
`boolean` `isWrapperFor(java.lang.Class<?> iface)`
`void` `setDbUrl(java.lang.String dbUrl)`
`void` `setInfo(java.util.Properties info)`
`void` `setLoginTimeout(int seconds)`
`void` `setLogWriter(java.io.PrintWriter out)`
`void` `setPassword(java.lang.String password)`
`void` `setUsername(java.lang.String username)`
`<T> T` `unwrap(java.lang.Class<T> iface)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### OrientDataSource

    public OrientDataSource()

#### OrientDataSource

    public OrientDataSource(java.lang.String dbUrl,
                            java.lang.String username,
                            java.lang.String password,
                            java.util.Properties info)

Creates a `DataSource`

Parameters:
  `dbUrl` -
  `username` -
  `password` -
  `info` -

#### OrientDataSource

    @Deprecated
    public OrientDataSource(OrientDB orientDB)

Deprecated.

#### OrientDataSource

    public OrientDataSource(OrientDB orientDB,
                            java.lang.String dbName)

### Method Detail

#### getLogWriter

    public java.io.PrintWriter getLogWriter()
                                     throws java.sql.SQLException

Specified by:
  `getLogWriter` in interface `javax.sql.CommonDataSource`
Throws:
  `java.sql.SQLException`

#### setLogWriter

    public void setLogWriter(java.io.PrintWriter out)
                      throws java.sql.SQLException

Specified by:
  `setLogWriter` in interface `javax.sql.CommonDataSource`
Throws:
  `java.sql.SQLException`

#### unwrap

    public <T> T unwrap(java.lang.Class<T> iface)
                 throws java.sql.SQLException

Specified by:
  `unwrap` in interface `java.sql.Wrapper`
Throws:
  `java.sql.SQLException`

#### isWrapperFor

    public boolean isWrapperFor(java.lang.Class<?> iface)
                         throws java.sql.SQLException

Specified by:
  `isWrapperFor` in interface `java.sql.Wrapper`
Throws:
  `java.sql.SQLException`

#### getConnection

    public java.sql.Connection getConnection()
                                      throws java.sql.SQLException

Specified by:
  `getConnection` in interface `javax.sql.DataSource`
Throws:
  `java.sql.SQLException`

#### getConnection

    public java.sql.Connection getConnection(java.lang.String username,
                                             java.lang.String password)
                                      throws java.sql.SQLException

Specified by:
  `getConnection` in interface `javax.sql.DataSource`
Throws:
  `java.sql.SQLException`

#### setDbUrl

    public void setDbUrl(java.lang.String dbUrl)

#### setUsername

    public void setUsername(java.lang.String username)

#### setPassword

    public void setPassword(java.lang.String password)

#### setInfo

    public void setInfo(java.util.Properties info)

#### getLoginTimeout

    public int getLoginTimeout()
                        throws java.sql.SQLException

Specified by:
  `getLoginTimeout` in interface `javax.sql.CommonDataSource`
Throws:
  `java.sql.SQLException`

#### setLoginTimeout

    public void setLoginTimeout(int seconds)
                         throws java.sql.SQLException

Specified by:
  `setLoginTimeout` in interface `javax.sql.CommonDataSource`
Throws:
  `java.sql.SQLException`

#### getParentLogger

    public java.util.logging.Logger getParentLogger()
                                             throws java.sql.SQLFeatureNotSupportedException

Specified by:
  `getParentLogger` in interface `javax.sql.CommonDataSource`
Throws:
  `java.sql.SQLFeatureNotSupportedException`

#### close

    public void close()