com.orientechnologies.orient.jdbc

## Class OrientDataSource

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

All Implemented Interfaces:
  Wrapper, CommonDataSource, DataSource

    public class OrientDataSource
    extends Object
    implements DataSource

### Constructor Summary

Constructors
Constructor and Description
`OrientDataSource()`
`OrientDataSource(com.orientechnologies.orient.core.db.OrientDB orientDB)` Deprecated.
`OrientDataSource(com.orientechnologies.orient.core.db.OrientDB orientDB, String dbName)`
`OrientDataSource(String dbUrl, String username, String password, Properties info)` Creates a `DataSource`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `close()`
`Connection` `getConnection()`
`Connection` `getConnection(String username, String password)`
`int` `getLoginTimeout()`
`PrintWriter` `getLogWriter()`
`Logger` `getParentLogger()`
`boolean` `isWrapperFor(Class<?> iface)`
`void` `setDbUrl(String dbUrl)`
`void` `setInfo(Properties info)`
`void` `setLoginTimeout(int seconds)`
`void` `setLogWriter(PrintWriter out)`
`void` `setPassword(String password)`
`void` `setUsername(String username)`
`<T> T` `unwrap(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(String dbUrl,
                            String username,
                            String password,
                            Properties info)

Creates a `DataSource`

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

#### OrientDataSource

    @Deprecated
    public OrientDataSource(com.orientechnologies.orient.core.db.OrientDB orientDB)

Deprecated.

#### OrientDataSource

    public OrientDataSource(com.orientechnologies.orient.core.db.OrientDB orientDB,
                            String dbName)

### Method Detail

#### getLogWriter

    public PrintWriter getLogWriter()
                             throws SQLException

Specified by:
  `getLogWriter` in interface `CommonDataSource`
Throws:
  `SQLException`

#### setLogWriter

    public void setLogWriter(PrintWriter out)
                      throws SQLException

Specified by:
  `setLogWriter` in interface `CommonDataSource`
Throws:
  `SQLException`

#### unwrap

    public <T> T unwrap(Class<T> iface)
                 throws SQLException

Specified by:
  `unwrap` in interface `Wrapper`
Throws:
  `SQLException`

#### isWrapperFor

    public boolean isWrapperFor(Class<?> iface)
                         throws SQLException

Specified by:
  `isWrapperFor` in interface `Wrapper`
Throws:
  `SQLException`

#### getConnection

    public Connection getConnection()
                             throws SQLException

Specified by:
  `getConnection` in interface `DataSource`
Throws:
  `SQLException`

#### getConnection

    public Connection getConnection(String username,
                                    String password)
                             throws SQLException

Specified by:
  `getConnection` in interface `DataSource`
Throws:
  `SQLException`

#### setDbUrl

    public void setDbUrl(String dbUrl)

#### setUsername

    public void setUsername(String username)

#### setPassword

    public void setPassword(String password)

#### setInfo

    public void setInfo(Properties info)

#### getLoginTimeout

    public int getLoginTimeout()
                        throws SQLException

Specified by:
  `getLoginTimeout` in interface `CommonDataSource`
Throws:
  `SQLException`

#### setLoginTimeout

    public void setLoginTimeout(int seconds)
                         throws SQLException

Specified by:
  `setLoginTimeout` in interface `CommonDataSource`
Throws:
  `SQLException`

#### getParentLogger

    public Logger getParentLogger()
                           throws SQLFeatureNotSupportedException

Specified by:
  `getParentLogger` in interface `CommonDataSource`
Throws:
  `SQLFeatureNotSupportedException`

#### close

    public void close()