Klasse SourceProvider
java.lang.Object
org.apache.torque.generator.source.SourceProvider
- Bekannte direkte Unterklassen:
FileSourceProvider
,JdbcMetadataSourceProvider
The input for a generation process. It can contain several sources.
In order to use the sources, the init() method must be called. After
this method was called, no more setters may be called.
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungabstract SourceProvider
copy()
Returns a copy of this source provider in its initial state.abstract void
copyNotSetSettingsFrom
(SourceProvider sourceProvider) Copies settings which are not set in this source provider from another source provider.final void
init
(ConfigurationHandlers configurationHandlers, ControllerState controllerState) Initializes the source provider.protected abstract void
initInternal
(ConfigurationHandlers configurationHandlers, ControllerState controllerState) Initializes the sources provided by this SourceProvider.boolean
isInit()
Returns whetherinit()
was already called.final void
reset
(ConfigurationHandlers configurationHandlers, ControllerState controllerState) Resets the source provider.protected abstract void
resetInternal
(ConfigurationHandlers configurationHandlers, ControllerState controllerState) Resets the sources provided by this SourceProvider.Von Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Von Schnittstelle geerbte Methoden java.util.Iterator
forEachRemaining, hasNext, next, remove
-
Konstruktordetails
-
SourceProvider
public SourceProvider()
-
-
Methodendetails
-
init
public final void init(ConfigurationHandlers configurationHandlers, ControllerState controllerState) throws ConfigurationException Initializes the source provider. Must be called beforehasNext()
ornext()
is invoked.- Parameter:
configurationHandlers
- the configuration handlers, not null.controllerState
- the current controller state, not null.- Löst aus:
ConfigurationException
- if initializing fails.
-
reset
public final void reset(ConfigurationHandlers configurationHandlers, ControllerState controllerState) throws ConfigurationException Resets the source provider. After this method is called,init()
must be called again.- Parameter:
configurationHandlers
- the configuration handlers, not null.controllerState
- the current controller state, not null.- Löst aus:
ConfigurationException
- if resetting fails.
-
initInternal
protected abstract void initInternal(ConfigurationHandlers configurationHandlers, ControllerState controllerState) throws ConfigurationException Initializes the sources provided by this SourceProvider.- Parameter:
configurationHandlers
- the configuration handlers, not null.controllerState
- the current controller state, not null.- Löst aus:
ConfigurationException
- if initializing fails.
-
resetInternal
protected abstract void resetInternal(ConfigurationHandlers configurationHandlers, ControllerState controllerState) throws ConfigurationException Resets the sources provided by this SourceProvider.- Parameter:
configurationHandlers
- the configuration handlers, not null.controllerState
- the current controller state, not null.- Löst aus:
ConfigurationException
- if resetting fails.
-
isInit
public boolean isInit()Returns whetherinit()
was already called.- Gibt zurück:
- true if init() was already called, false otherwise.
-
copy
Returns a copy of this source provider in its initial state. This means theinit(ConfigurationHandlers, ControllerState)
method of the new source provider must be called before it can be used.- Gibt zurück:
- the SourceProvider
- Löst aus:
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.- Parameter:
sourceProvider
- the source provoder to copy the settings from.
-