Module org.firebirdsql.jaybird
Package org.firebirdsql.gds.impl

# Class BaseGDSFactoryPlugin

java.lang.Object
org.firebirdsql.gds.impl.BaseGDSFactoryPlugin

All Implemented Interfaces:
  `GDSFactoryPlugin`

Direct Known Subclasses:
  `WireGDSFactoryPlugin`

public abstract class BaseGDSFactoryPlugin extends Object implements GDSFactoryPlugin
Base class for `GDSFactoryPlugin` implementations.

Handles commonalities across existing implementations.

Since:
  3.0
Author:
  Mark Rotteveel

## Constructor Summary

Constructors
Constructor
Description
`BaseGDSFactoryPlugin()`

## Method Summary

Modifier and Type
Method
Description
`final boolean`
`equals(Object obj)`
`Class<?>`
`getConnectionClass()`
Class used for connection.
`String`
`getDatabasePath(String jdbcUrl)`
`String`
`getDatabasePath(String server, Integer port, String path)`
`String`
`getDefaultProtocol()`
The default protocol prefix for this type (for example, for PURE_JAVA, it's `"jdbc:firebirdsql:"`.
`final int`
`hashCode()`
`protected static void`
`requirePath(String path)`
Checks if `path` is not `null`.

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

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

### Methods inherited from interface org.firebirdsql.gds.impl.GDSFactoryPlugin

`getDatabaseFactory, getDatabasePath, getPluginName, getSupportedProtocolList, getSupportedProtocols, getTypeAliases, getTypeAliasList, getTypeName`

## Constructor Details

### BaseGDSFactoryPlugin

public BaseGDSFactoryPlugin()

## Method Details

### getConnectionClass

public Class<?> getConnectionClass()
Description copied from interface: `GDSFactoryPlugin`
Class used for connection.

The class must define a one-arg constructor accepting `FBManagedConnection`. Currently, the Jaybird implementation also requires that the class is `FBConnection` or a subclass. This may change in the future.

Specified by:
  `getConnectionClass` in interface `GDSFactoryPlugin`
Returns:
  class for connection

### getDefaultProtocol

public String getDefaultProtocol()
Description copied from interface: `GDSFactoryPlugin`
The default protocol prefix for this type (for example, for PURE_JAVA, it's `"jdbc:firebirdsql:"`.

The protocol prefix must be distinct from other plugins.

Specified by:
  `getDefaultProtocol` in interface `GDSFactoryPlugin`
Returns:
  default protocol name

### getDatabasePath

public String getDatabasePath(String jdbcUrl) throws SQLException

Specified by:
  `getDatabasePath` in interface `GDSFactoryPlugin`
Throws:
  `SQLException`

### requirePath

protected static void requirePath(String path) throws SQLException
Checks if `path` is not `null`.

Parameters:
  `path` - path to check
Throws:
  `SQLException` - if `path` is `null`
Since:
  6

### getDatabasePath

public String getDatabasePath(String server, Integer port, String path) throws SQLException

Specified by:
  `getDatabasePath` in interface `GDSFactoryPlugin`
Throws:
  `SQLException`

### hashCode

public final int hashCode()

Overrides:
  `hashCode` in class `Object`

### equals

public final boolean equals(Object obj)

Overrides:
  `equals` in class `Object`