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 java.lang.Object implements ParameterConverter<D,S>
Abstract class for behavior common toParameterConverter
implementations.- Since:
- 3.0
- Author:
- Mark Rotteveel
-
-
Constructor Summary
Constructors Constructor Description AbstractParameterConverter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods 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 throughIConnectionProperties
.protected void
populateDefaultProperties(S connection, ServiceParameterBuffer spb)
Populates the database parameter buffer with the standard Firebird properties explicitly supported throughIConnectionProperties
.protected void
populateNonStandardProperties(D connection, DatabaseParameterBuffer dpb)
Populates the database parameter buffer with the non-standard properties (inIConnectionProperties.getExtraDatabaseParameters()
).DatabaseParameterBuffer
toDatabaseParameterBuffer(D connection)
Builds aDatabaseParameterBuffer
from the supplied {code IConnectionProperties}.ServiceParameterBuffer
toServiceParameterBuffer(S connection)
Builds aServiceParameterBuffer
from the supplied {code IServiceProperties}.
-
-
-
Method Detail
-
createDatabaseParameterBuffer
protected DatabaseParameterBuffer createDatabaseParameterBuffer(D connection)
-
createServiceParameterBuffer
protected ServiceParameterBuffer createServiceParameterBuffer(S connection)
-
toDatabaseParameterBuffer
public final DatabaseParameterBuffer toDatabaseParameterBuffer(D connection) throws java.sql.SQLException
Description copied from interface:ParameterConverter
Builds aDatabaseParameterBuffer
from the supplied {code IConnectionProperties}.- Specified by:
toDatabaseParameterBuffer
in interfaceParameterConverter<D extends AbstractConnection<IConnectionProperties,?>,S extends AbstractConnection<IServiceProperties,?>>
- Parameters:
connection
- Database connection- Returns:
- Database parameter buffer populated based on the connection properties
- Throws:
java.sql.SQLException
- For errors
-
populateDefaultProperties
protected void populateDefaultProperties(D connection, DatabaseParameterBuffer dpb) throws java.sql.SQLException
Populates the database parameter buffer with the standard Firebird properties explicitly supported throughIConnectionProperties
.- Parameters:
connection
- Database connectiondpb
- Database parameter buffer to populate- Throws:
java.sql.SQLException
- For errors generating authentication information
-
populateAuthenticationProperties
protected abstract void populateAuthenticationProperties(AbstractConnection connection, ConnectionParameterBuffer pb) throws java.sql.SQLException
Populates the authentication properties of the parameter buffer.- Parameters:
connection
- Database connectionpb
- Parameter buffer to populate- Throws:
java.sql.SQLException
- For errors generating authentication information
-
populateNonStandardProperties
protected void populateNonStandardProperties(D connection, DatabaseParameterBuffer dpb)
Populates the database parameter buffer with the non-standard properties (inIConnectionProperties.getExtraDatabaseParameters()
).- Parameters:
connection
- Database connectiondpb
- Database parameter buffer to populate
-
toServiceParameterBuffer
public final ServiceParameterBuffer toServiceParameterBuffer(S connection) throws java.sql.SQLException
Description copied from interface:ParameterConverter
Builds aServiceParameterBuffer
from the supplied {code IServiceProperties}.- Specified by:
toServiceParameterBuffer
in interfaceParameterConverter<D extends AbstractConnection<IConnectionProperties,?>,S extends AbstractConnection<IServiceProperties,?>>
- Parameters:
connection
- Service connection- Returns:
- Service parameter buffer populated based on the service properties
- Throws:
java.sql.SQLException
- For errors
-
populateDefaultProperties
protected void populateDefaultProperties(S connection, ServiceParameterBuffer spb) throws java.sql.SQLException
Populates the database parameter buffer with the standard Firebird properties explicitly supported throughIConnectionProperties
.- Parameters:
connection
- Service connectionspb
- Service parameter buffer to populate- Throws:
java.sql.SQLException
- For errors generating authentication information
-
-