Module org.firebirdsql.jaybird
Package org.firebirdsql.gds.ng

# Class AbstractParameterConverter<D extends AbstractConnection<IConnectionProperties,?>,S extends AbstractConnection<IServiceProperties,?>>

java.lang.Object
org.firebirdsql.gds.ng.AbstractParameterConverter<D,S>

All Implemented Interfaces:
  `ParameterConverter<D,S>`

Direct Known Subclasses:
  `V10ParameterConverter`

public abstract class AbstractParameterConverter<D extends AbstractConnection<IConnectionProperties,?>,S extends AbstractConnection<IServiceProperties,?>> extends Object implements ParameterConverter<D,S>
Abstract class for behavior common to `ParameterConverter` implementations.

Since:
  3.0
Author:
  Mark Rotteveel

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AbstractParameterConverter()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected DatabaseParameterBuffer`
  `createDatabaseParameterBuffer(D connection)`
  `protected ServiceParameterBuffer`
  `createServiceParameterBuffer(S connection)`
  `protected abstract void`
  `populateAuthenticationProperties(AbstractConnection<?,?> connection, ConnectionParameterBuffer pb)`
  Populates the authentication properties of the parameter buffer.
  `protected void`
  `populateDefaultProperties(D connection, DatabaseParameterBuffer dpb)`
  Populates the database parameter buffer with the standard Firebird properties explicitly supported through `IConnectionProperties`.
  `protected void`
  `populateDefaultProperties(S connection, ServiceParameterBuffer spb)`
  Populates the database parameter buffer with the standard Firebird properties explicitly supported through `IConnectionProperties`.
  `final DatabaseParameterBuffer`
  `toDatabaseParameterBuffer(D connection)`
  Builds a `DatabaseParameterBuffer` from the supplied {code IConnectionProperties}.
  `final ServiceParameterBuffer`
  `toServiceParameterBuffer(S connection)`
  Builds a `ServiceParameterBuffer` from the supplied {code IServiceProperties}.

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

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

- ## Constructor Details

  - ### AbstractParameterConverter

    public AbstractParameterConverter()

- ## Method Details

  - ### createDatabaseParameterBuffer

    protected DatabaseParameterBuffer createDatabaseParameterBuffer(D connection)

  - ### createServiceParameterBuffer

    protected ServiceParameterBuffer createServiceParameterBuffer(S connection)

  - ### toDatabaseParameterBuffer

    public final DatabaseParameterBuffer toDatabaseParameterBuffer(D connection) throws SQLException
    Description copied from interface: `ParameterConverter`
    Builds a `DatabaseParameterBuffer` from the supplied {code IConnectionProperties}.
    Specified by:
      `toDatabaseParameterBuffer` in interface `ParameterConverter<D extends AbstractConnection<IConnectionProperties,?>,S extends AbstractConnection<IServiceProperties,?>>`
    Parameters:
      `connection` - Database connection
    Returns:
      Database parameter buffer populated based on the connection properties
    Throws:
      `SQLException` - For errors

  - ### populateDefaultProperties

    protected void populateDefaultProperties(D connection, DatabaseParameterBuffer dpb) throws SQLException
    Populates the database parameter buffer with the standard Firebird properties explicitly supported through `IConnectionProperties`.
    Parameters:
      `connection` - Database connection
      `dpb` - Database parameter buffer to populate
    Throws:
      `SQLException` - For errors generating authentication information

  - ### populateAuthenticationProperties

    protected abstract void populateAuthenticationProperties(AbstractConnection<?,?> connection, ConnectionParameterBuffer pb) throws SQLException
    Populates the authentication properties of the parameter buffer.
    Parameters:
      `connection` - Database connection
      `pb` - Parameter buffer to populate
    Throws:
      `SQLException` - For errors generating authentication information

  - ### toServiceParameterBuffer

    public final ServiceParameterBuffer toServiceParameterBuffer(S connection) throws SQLException
    Description copied from interface: `ParameterConverter`
    Builds a `ServiceParameterBuffer` from the supplied {code IServiceProperties}.
    Specified by:
      `toServiceParameterBuffer` in interface `ParameterConverter<D extends AbstractConnection<IConnectionProperties,?>,S extends AbstractConnection<IServiceProperties,?>>`
    Parameters:
      `connection` - Service connection
    Returns:
      Service parameter buffer populated based on the service properties
    Throws:
      `SQLException` - For errors

  - ### populateDefaultProperties

    protected void populateDefaultProperties(S connection, ServiceParameterBuffer spb) throws SQLException
    Populates the database parameter buffer with the standard Firebird properties explicitly supported through `IConnectionProperties`.
    Parameters:
      `connection` - Service connection
      `spb` - Service parameter buffer to populate
    Throws:
      `SQLException` - For errors generating authentication information