Class JdbcMetadataSourceProvider
java.lang.Object
org.apache.torque.generator.source.SourceProvider
org.apache.torque.generator.source.jdbc.JdbcMetadataSourceProvider
Creates a source from JDBC metadata.
- Version:
- $Id: JdbcMetadataSourceProvider.java 1917241 2024-04-21 13:29:41Z tv $
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()Returns a copy of this source provider in its initial state.voidcopyNotSetSettingsFrom(SourceProvider sourceProvider) Copies settings which are not set in this source provider from another source provider.getUrl()booleanhasNext()voidinitInternal(ConfigurationHandlers configurationHandlers, ControllerState controllerState) Initializes the sources provided by this SourceProvider.next()voidremove()protected voidresetInternal(ConfigurationHandlers configurationHandlers, ControllerState controllerState) Resets the sources provided by this SourceProvider.Methods inherited from class org.apache.torque.generator.source.SourceProvider
init, isInit, resetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
JdbcMetadataSourceProvider
public JdbcMetadataSourceProvider(String urlOption, String driverOption, String usernameOption, String passwordOption, String schemaOption) throws ConfigurationException - Throws:
ConfigurationException
-
-
Method Details
-
initInternal
public void initInternal(ConfigurationHandlers configurationHandlers, ControllerState controllerState) throws ConfigurationException Description copied from class:SourceProviderInitializes the sources provided by this SourceProvider.- Specified by:
initInternalin classSourceProvider- Parameters:
configurationHandlers- the configuration handlers, not null.controllerState- the current controller state, not null.- Throws:
ConfigurationException- if initializing fails.
-
hasNext
public boolean hasNext() -
next
-
resetInternal
protected void resetInternal(ConfigurationHandlers configurationHandlers, ControllerState controllerState) throws ConfigurationException Description copied from class:SourceProviderResets the sources provided by this SourceProvider.- Specified by:
resetInternalin classSourceProvider- Parameters:
configurationHandlers- the configuration handlers, not null.controllerState- the current controller state, not null.- Throws:
ConfigurationException- if resetting fails.
-
remove
public void remove() -
getUrlOption
-
getDriverOption
-
getUsernameOption
-
getPasswordOption
-
getSchemaOption
-
getUrl
-
getDriver
-
getUsername
-
getPassword
-
getSchema
-
copy
Returns a copy of this source provider in its initial state. This means theSourceProvider.init(ConfigurationHandlers, ControllerState)method of the new source provider must be called before it can be used.- Specified by:
copyin classSourceProvider- Returns:
- the SourceProvider
- Throws:
ConfigurationException- if the new SourceProvider cannot be initialized.
-
copyNotSetSettingsFrom
Copies settings which are not set in this source provider from another source provider. This only works if the type of the other source provider is known to this source provider. Only a subset of all properties are typically used for overwriting. No Properties which are already set are overwritten.- Specified by:
copyNotSetSettingsFromin classSourceProvider- Parameters:
sourceProvider- the source provoder to copy the settings from.
-