org.firebirdsql.gds.ng.jna

## Class AbstractNativeDatabaseFactory

- java.lang.Object
- - org.firebirdsql.gds.ng.jna.AbstractNativeDatabaseFactory

- All Implemented Interfaces:
    FbDatabaseFactory
  Direct Known Subclasses:
    FbClientDatabaseFactory, FbEmbeddedDatabaseFactory, FbLocalDatabaseFactory

      public abstract class AbstractNativeDatabaseFactory
      extends java.lang.Object
      implements FbDatabaseFactory

  Common implementation for client library and embedded database factory.
  Since:
    3.0
  Author:
    Mark Rotteveel

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractNativeDatabaseFactory()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `JnaDatabase` | `connect(IConnectionProperties connectionProperties)` Connects to a Firebird server based on the supplied connection properties.
    `protected <T extends IAttachProperties<T>> T` | `filterProperties(T attachProperties)` Allows the database factory to perform modification of the attach properties before use.
    `protected abstract FbClientLibrary` | `getClientLibrary()`
    `JnaService` | `serviceConnect(IServiceProperties serviceProperties)` Connects to the service manager of a Firebird server with the supplied service properties.

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

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

- - ### Constructor Detail

    - #### AbstractNativeDatabaseFactory

          public AbstractNativeDatabaseFactory()

  - ### Method Detail

    - #### connect

          public JnaDatabase connect(IConnectionProperties connectionProperties)
                              throws java.sql.SQLException

      Description copied from interface: `FbDatabaseFactory`
      Connects to a Firebird server based on the supplied connection properties.

      The `FbDatabase` instance will be connected to the server, but is not yet attached.

      Specified by:
        `connect` in interface `FbDatabaseFactory`
      Parameters:
        `connectionProperties` - Connection properties
      Returns:
        Database instance
      Throws:
        `java.sql.SQLException`

    - #### serviceConnect

          public JnaService serviceConnect(IServiceProperties serviceProperties)
                                    throws java.sql.SQLException

      Description copied from interface: `FbDatabaseFactory`
      Connects to the service manager of a Firebird server with the supplied service properties.
      Specified by:
        `serviceConnect` in interface `FbDatabaseFactory`
      Parameters:
        `serviceProperties` - Service properties
      Returns:
        Service instance
      Throws:
        `java.sql.SQLException`

    - #### getClientLibrary

          protected abstract FbClientLibrary getClientLibrary()

    - #### filterProperties

          protected <T extends IAttachProperties<T>> T filterProperties(T attachProperties)

      Allows the database factory to perform modification of the attach properties before use.

      Implementations should be prepared to handle immutable attach properties. Implementations are strongly advised to copy the attach properties before modification and return this copy.

      Type Parameters:
        `T` - Type of attach properties
      Parameters:
        `attachProperties` - Attach properties
      Returns:
        Filtered properties

Copyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.