Package adams.flow.transformer
Interface DataContainerDbWriter<T extends DataContainer & DatabaseIDHandler>
-
- Type Parameters:
T
- the type of data to write to the database
- All Superinterfaces:
Actor
,AdditionalInformationHandler
,CleanUpHandler
,Comparable
,DatabaseConnectionUser
,Destroyable
,ErrorHandler
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,Serializable
,ShallowCopySupporter<Actor>
,Stoppable
,StoppableWithFeedback
,VariableChangeListener
,VariablesInspectionHandler
- All Known Implementing Classes:
AbstractDataContainerDbWriter
public interface DataContainerDbWriter<T extends DataContainer & DatabaseIDHandler> extends Actor, DatabaseConnectionUser
Interface for actors that import data containers into the database.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
-
Fields inherited from interface adams.flow.core.Actor
FILE_EXTENSION, FILE_EXTENSION_GZ
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Integer
add(DataProvider provider, T cont)
Adds the container to the database.boolean
exists(DataProvider provider, T cont)
Returns whether the container already exists in the database.DataProvider<T>
getDataProvider(T cont)
Returns the data provider to use for storing the container in the database.T
load(DataProvider provider, T cont)
Loads the container from the database.boolean
remove(DataProvider provider, T cont)
Removes the container from the database.-
Methods inherited from interface adams.flow.core.Actor
cleanUp, compareTo, destroy, equals, execute, findVariables, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowExecutionListeningSupporter, getFullName, getName, getNextSibling, getParent, getParentComponent, getPreviousSibling, getQuickInfo, getRoot, getScopeHandler, getSilent, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, getVariables, handleError, hasErrorHandler, hasStopMessage, index, isExecuted, isFinished, isHeadless, isStopped, setAnnotations, setErrorHandler, setName, setParent, setSilent, setSkip, setStopFlowOnError, setUp, setVariables, shallowCopy, shallowCopy, sizeOf, stopExecution, stopExecution, toCommandLine, variableChanged, wrapUp
-
Methods inherited from interface adams.core.AdditionalInformationHandler
getAdditionalInformation
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel, setLoggingLevel
-
Methods inherited from interface adams.core.logging.LoggingSupporter
getLogger, isLoggingEnabled
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, defineOptions, getOptionManager
-
Methods inherited from interface adams.core.VariablesInspectionHandler
canInspectOptions
-
-
-
-
Method Detail
-
getDataProvider
DataProvider<T> getDataProvider(T cont)
Returns the data provider to use for storing the container in the database.- Parameters:
cont
- the current container- Returns:
- the data provider
-
exists
boolean exists(DataProvider provider, T cont)
Returns whether the container already exists in the database.- Parameters:
provider
- the provider to use for checkingcont
- the container to look for- Returns:
- true if already stored in database
-
remove
boolean remove(DataProvider provider, T cont)
Removes the container from the database.- Parameters:
provider
- the provider to use for removingcont
- the container to remove- Returns:
- true if successfully removed
-
add
Integer add(DataProvider provider, T cont)
Adds the container to the database.- Parameters:
provider
- the provider to usecont
- the container to store- Returns:
- the database ID,
Constants.NO_ID
if failed
-
load
T load(DataProvider provider, T cont)
Loads the container from the database.- Parameters:
provider
- the provider to usecont
- the container to store- Returns:
- the container, null if failed to load
-
-