Interface ConnectionSchemaInitializer
- All Superinterfaces:
org.springframework.core.Ordered
- All Known Implementing Classes:
MariaDBConnectionSchemaInitializer,MySqlConnectionSchemaInitializer,OracleConnectionSchemaInitializer,PostgresConnectionSchemaInitializer,YugabytedbConnectionSchemaInitializer
public interface ConnectionSchemaInitializer
extends org.springframework.core.Ordered
Initialize a connection pulled from a common datasource and establish the schema used during the
connection session. This functionality is primarily used during connection retrieval from
SchemaDelegatingDataSource.
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
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Method Summary
Modifier and TypeMethodDescriptiondefault intgetOrder()booleaninitialize(Connection toInitialize, String schema) Initialize the connection, setting the current schema for the connection session.
-
Method Details
-
getOrder
default int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
initialize
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
-