public class DatabaseTableCreator extends LimitedFiringSource
Entity.ContainedObjectsIterator| Modifier and Type | Field and Description |
|---|---|
protected java.sql.Connection |
_db
A JDBC database connection.
|
protected boolean |
createTableIfNotExisted |
PortParameter |
createTableIfNotExistParam
Flag indicates to create the table if the table doesn't exist
|
PortParameter |
dbParams
Parameter to access a database.
|
protected java.lang.String |
sqlScript |
PortParameter |
sqlScriptParam
A sql script to create the table
|
TypedIOPort |
statusPort
Output of this actor.
|
protected java.lang.String |
tableName |
PortParameter |
tableNameParam
The name of the table which will be created
|
_firingCountLimit, _iterationCount, firingCountLimit_triggered, output, trigger_typesValid_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKSCOMPLETED, NOT_READY, STOP_ITERATING| Constructor and Description |
|---|
DatabaseTableCreator(CompositeEntity container,
java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
attributeChanged(Attribute attribute)
Reconfigure actor when certain attributes change.
|
void |
fire()
If connection is closed, open a new one.
|
protected void |
getConnection()
Get the database connection.
|
void |
initialize()
Close the connection if open.
|
void |
wrapup()
Close the connection if open.
|
postfire_customTypeConstraints, prefire_containedTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, preinitialize, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, setContainer, stop, stopFire, terminate_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName_addPort, _description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspaceequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortListisFireFunctional, isStrict, iterate, stop, stopFire, terminateaddInitializable, preinitialize, removeInitializabledescription, getContainer, getDisplayName, getFullName, getName, getName, setNamegetDerivedLevel, getDerivedList, propagateValuepublic TypedIOPort statusPort
public PortParameter tableNameParam
public PortParameter createTableIfNotExistParam
public PortParameter sqlScriptParam
public PortParameter dbParams
protected java.sql.Connection _db
protected java.lang.String tableName
protected boolean createTableIfNotExisted
protected java.lang.String sqlScript
public DatabaseTableCreator(CompositeEntity container, java.lang.String name) throws NameDuplicationException, IllegalActionException
public void initialize() throws IllegalActionException
initialize in interface Initializableinitialize in class LimitedFiringSourceIllegalActionException - If the parent class throws it,
which could occur if, for example, the director will not accept
sequence actors.public void attributeChanged(Attribute attribute) throws IllegalActionException
attributeChanged in class LimitedFiringSourceattribute - The changed Attribute.IllegalActionExceptionpublic void fire() throws IllegalActionException
fire in interface Executablefire in class SourceIllegalActionException - Not thrown in this base class.public void wrapup() throws IllegalActionException
wrapup in interface Initializablewrapup in class AtomicActor<TypedIOPort>IllegalActionException - Not thrown in this base class.protected void getConnection() throws IllegalActionException
IllegalActionException