org.apache.calcite.avatica

## Class AvaticaJdbc41Factory

- java.lang.Object
- - org.apache.calcite.avatica.AvaticaJdbc41Factory

All Implemented Interfaces:
  AvaticaFactory

    class AvaticaJdbc41Factory
    extends Object
    implements AvaticaFactory

Implementation of `AvaticaFactory` for JDBC 4.1 (corresponds to JDK 1.7).

### Nested Class Summary

Nested Classes
`private static class` `AvaticaJdbc41Factory.AvaticaJdbc41Connection` Implementation of Connection for JDBC 4.1.
`private static class` `AvaticaJdbc41Factory.AvaticaJdbc41DatabaseMetaData` Implementation of DatabaseMetaData for JDBC 4.1.
`private static class` `AvaticaJdbc41Factory.AvaticaJdbc41PreparedStatement` Implementation of PreparedStatement for JDBC 4.1.
`private static class` `AvaticaJdbc41Factory.AvaticaJdbc41Statement` Implementation of Statement for JDBC 4.1.

### Field Summary

Fields
`private int` `major`
`private int` `minor`

### Constructor Summary

Constructors
`` `AvaticaJdbc41Factory()` Creates a JDBC factory.
`protected` `AvaticaJdbc41Factory(int major, int minor)` Creates a JDBC factory with given major/minor version number.

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `getJdbcMajorVersion()`
`int` `getJdbcMinorVersion()`
`AvaticaConnection` `newConnection(UnregisteredDriver driver, AvaticaFactory factory, String url, Properties info)`
`AvaticaSpecificDatabaseMetaData` `newDatabaseMetaData(AvaticaConnection connection)` Creates meta data for the database.
`AvaticaPreparedStatement` `newPreparedStatement(AvaticaConnection connection, Meta.StatementHandle h, Meta.Signature signature, int resultSetType, int resultSetConcurrency, int resultSetHoldability)`
`AvaticaResultSet` `newResultSet(AvaticaStatement statement, QueryState state, Meta.Signature signature, TimeZone timeZone, Meta.Frame firstFrame)` Creates a result set.
`AvaticaResultSetMetaData` `newResultSetMetaData(AvaticaStatement statement, Meta.Signature signature)` Creates meta data for a result set.
`AvaticaStatement` `newStatement(AvaticaConnection connection, Meta.StatementHandle h, int resultSetType, int resultSetConcurrency, int resultSetHoldability)`

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

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

### Field Detail

#### major

    private final int major

#### minor

    private final int minor

### Constructor Detail

#### AvaticaJdbc41Factory

    public AvaticaJdbc41Factory()

Creates a JDBC factory.

#### AvaticaJdbc41Factory

    protected AvaticaJdbc41Factory(int major,
                                   int minor)

Creates a JDBC factory with given major/minor version number.

### Method Detail

#### getJdbcMajorVersion

    public int getJdbcMajorVersion()

Specified by:
  `getJdbcMajorVersion` in interface `AvaticaFactory`

#### getJdbcMinorVersion

    public int getJdbcMinorVersion()

Specified by:
  `getJdbcMinorVersion` in interface `AvaticaFactory`

#### newConnection

    public AvaticaConnection newConnection(UnregisteredDriver driver,
                                           AvaticaFactory factory,
                                           String url,
                                           Properties info)

Specified by:
  `newConnection` in interface `AvaticaFactory`

#### newDatabaseMetaData

    public AvaticaSpecificDatabaseMetaData newDatabaseMetaData(AvaticaConnection connection)

Description copied from interface: `AvaticaFactory`
Creates meta data for the database.

Specified by:
  `newDatabaseMetaData` in interface `AvaticaFactory`
Returns:
  Database meta data

#### newStatement

    public AvaticaStatement newStatement(AvaticaConnection connection,
                                         Meta.StatementHandle h,
                                         int resultSetType,
                                         int resultSetConcurrency,
                                         int resultSetHoldability)

Specified by:
  `newStatement` in interface `AvaticaFactory`

#### newPreparedStatement

    public AvaticaPreparedStatement newPreparedStatement(AvaticaConnection connection,
                                                         Meta.StatementHandle h,
                                                         Meta.Signature signature,
                                                         int resultSetType,
                                                         int resultSetConcurrency,
                                                         int resultSetHoldability)
                                                  throws SQLException

Specified by:
  `newPreparedStatement` in interface `AvaticaFactory`
Throws:
  `SQLException`

#### newResultSet

    public AvaticaResultSet newResultSet(AvaticaStatement statement,
                                         QueryState state,
                                         Meta.Signature signature,
                                         TimeZone timeZone,
                                         Meta.Frame firstFrame)

Description copied from interface: `AvaticaFactory`
Creates a result set. You will then need to call `AvaticaResultSet.execute()` on it.

Specified by:
  `newResultSet` in interface `AvaticaFactory`
Parameters:
  `statement` - Statement
  `state` - The state used to create this result set
  `signature` - Prepared statement
  `timeZone` - Time zone
  `firstFrame` - Frame containing the first (or perhaps only) rows in the result, or null if an execute/fetch is required
Returns:
  Result set

#### newResultSetMetaData

    public AvaticaResultSetMetaData newResultSetMetaData(AvaticaStatement statement,
                                                         Meta.Signature signature)

Description copied from interface: `AvaticaFactory`
Creates meta data for a result set.

Specified by:
  `newResultSetMetaData` in interface `AvaticaFactory`
Parameters:
  `statement` - Statement
  `signature` - Prepared statement
Returns:
  Result set meta data