Interface ConnectionSchemaInitializer
-
- All Superinterfaces:
org.springframework.core.Ordered
- All Known Implementing Classes:
MariaDBConnectionSchemaInitializer,MySqlConnectionSchemaInitializer,OracleConnectionSchemaInitializer,PostgresConnectionSchemaInitializer,YugabytedbConnectionSchemaInitializer
public interface ConnectionSchemaInitializer extends org.springframework.core.OrderedInitialize a connection pulled from a common datasource and establish the schema used during the connection session. This functionality is primarily used during connection retrieval fromSchemaDelegatingDataSource.
Customization for this component is generally achieved by declaring a custom instance of ConnectionSchemaInitializer as a Bean with a higher precedence order. That custom bean will be used preferably over already existing initializer beans in Broadleaf.- Author:
- Jeff Fischer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default intgetOrder()booleaninitialize(Connection toInitialize, String schema)Initialize the connection, setting the current schema for the connection session.
-
-
-
Method Detail
-
getOrder
default int getOrder()
- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
initialize
boolean initialize(Connection toInitialize, String schema)
Initialize the connection, setting the current schema for the connection session.- Parameters:
toInitialize- The connection from the datasource to initializeschema- The schema to set as the default for the connection session- Returns:
- whether or not the initializer was qualified to operate on the connection and did indeed perform the initialization
-
-