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:
JnaParameterConverter,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 -
Method Summary
Modifier and TypeMethodDescriptionprotected DatabaseParameterBuffercreateDatabaseParameterBuffer(D connection) protected ServiceParameterBuffercreateServiceParameterBuffer(S connection) protected abstract voidPopulates the authentication properties of the parameter buffer.protected voidpopulateDefaultProperties(D connection, DatabaseParameterBuffer dpb) Populates the database parameter buffer with the standard Firebird properties explicitly supported throughIConnectionProperties.protected voidpopulateDefaultProperties(S connection, ServiceParameterBuffer spb) Populates the database parameter buffer with the standard Firebird properties explicitly supported throughIConnectionProperties.protected voidpopulateNonStandardProperties(D connection, DatabaseParameterBuffer dpb) Populates the database parameter buffer with the non-standard properties (inIConnectionProperties.getExtraDatabaseParameters()).final DatabaseParameterBuffertoDatabaseParameterBuffer(D connection) Builds aDatabaseParameterBufferfrom the supplied {code IConnectionProperties}.final ServiceParameterBuffertoServiceParameterBuffer(S connection) Builds aServiceParameterBufferfrom the supplied {code IServiceProperties}.
-
Constructor Details
-
AbstractParameterConverter
public AbstractParameterConverter()
-
-
Method Details
-
createDatabaseParameterBuffer
-
createServiceParameterBuffer
-
toDatabaseParameterBuffer
Description copied from interface:ParameterConverterBuilds aDatabaseParameterBufferfrom the supplied {code IConnectionProperties}.- Specified by:
toDatabaseParameterBufferin interfaceParameterConverter<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 throughIConnectionProperties.- Parameters:
connection- Database connectiondpb- 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 connectionpb- Parameter buffer to populate- Throws:
SQLException- For errors generating authentication information
-
populateNonStandardProperties
Populates the database parameter buffer with the non-standard properties (inIConnectionProperties.getExtraDatabaseParameters()).- Parameters:
connection- Database connectiondpb- Database parameter buffer to populate
-
toServiceParameterBuffer
Description copied from interface:ParameterConverterBuilds aServiceParameterBufferfrom the supplied {code IServiceProperties}.- Specified by:
toServiceParameterBufferin interfaceParameterConverter<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 throughIConnectionProperties.- Parameters:
connection- Service connectionspb- Service parameter buffer to populate- Throws:
SQLException- For errors generating authentication information
-