public final class TheStoreDataSource extends StoreDataSource
CUSTOM_PROPERTIES, DRIVER_CLASS_PROPERTY, PASSWORD_PROPERTY, SHARED_PROPERTY, URL_PROPERTY, USER_PROPERTY
Constructor and Description |
---|
TheStoreDataSource(DialectSupport support)
Constructs an instance.
|
Modifier and Type | Method and Description |
---|---|
TheStoreConnection |
getConnection()
Gets a connection.
|
protected String |
getDefaultConnectionOptions()
Gets the default connection options.
|
protected Optional<String> |
getDefaultConnectionPassword()
Gets the default connection password.
|
protected boolean |
getDefaultConnectionShared()
Gets the default connection shared indicator.
|
protected String |
getDefaultConnectionURL(File storeDataDir,
String storeEntityName)
Gets the default connection URL.
|
protected String |
getDefaultConnectionUser()
Gets the default connection user.
|
protected TheStoreConnection |
newStoreConnection(Connection connection,
boolean shared)
Creates a new store connection.
|
protected void |
onFirstConnection(StoreConnection storeConnection)
Called on the first connection.
|
protected Class<? extends Driver> |
registerDriver(ClassDef driverClassDef)
Registers the JDBC driver.
|
getThisLogger, setUp, tearDown
public TheStoreDataSource(@Nonnull DialectSupport support)
support
- The dialect support.public TheStoreConnection getConnection() throws SQLException
getConnection
in class StoreDataSource
SQLException
- From the actual data source.protected String getDefaultConnectionOptions()
getDefaultConnectionOptions
in class StoreDataSource
protected Optional<String> getDefaultConnectionPassword()
getDefaultConnectionPassword
in class StoreDataSource
protected boolean getDefaultConnectionShared()
getDefaultConnectionShared
in class StoreDataSource
protected String getDefaultConnectionURL(File storeDataDir, String storeEntityName)
getDefaultConnectionURL
in class StoreDataSource
storeDataDir
- The store data directory.storeEntityName
- The store entity name.protected String getDefaultConnectionUser()
getDefaultConnectionUser
in class StoreDataSource
protected TheStoreConnection newStoreConnection(Connection connection, boolean shared)
newStoreConnection
in class StoreDataSource
connection
- The wrapped Connection
.shared
- Specifies if the Connection
is shared.protected void onFirstConnection(StoreConnection storeConnection)
onFirstConnection
in class StoreDataSource
storeConnection
- The newly established connection.protected Class<? extends Driver> registerDriver(ClassDef driverClassDef)
registerDriver
in class StoreDataSource
driverClassDef
- The driver class definition.Copyright © 2003-2019 Serge Brisson. All Rights Reserved.