Class Trigger {Analysis} derived from: SQLObject

Documentation
Section 4.38:

A trigger is defined by a <trigger definition> . A <trigger definition> specifies a trigger that is described by a
trigger descriptor . A trigger descriptor includes:
- The name of the trigger.
- The name of the base table that is the subject table.
- The trigger action time (BEFORE or AFTER ).
- The trigger event (INSERT , DELETE , or UPDATE ).
- Whether the trigger is a statement-level trigger or a row-level trigger.
- Any old transition variable name, new transition variable name, old transition table name, new transition table name.
- The triggered action.
- The trigger column list (possibly empty) for the trigger event.
- The triggered action column set of the triggered action.
- The timestamp of creation of the trigger.

The order of execution of a set of triggers is ascending by value of their timestamp of creation in their descriptors, such that the oldest trigger executes first. If one or more triggers have the same timestamp value, then their relative order of execution is implementation-defined.

A schema might include one or more trigger descriptors, each of which includes the definition of a triggered action specifying a <triggered SQL statement> that is to be executed (either once for each affected row, in the case of a row-level trigger, or once for the whole triggering INSERT , DELETE , MERGE , or UPDATE statement, in the case of a statement-level trigger) before or after rows are inserted into a table, rows are deleted from a table, or one or more columns are updated in rows of a table. The execution of such a triggered action resulting from the insertion, deletion, or updating of a table may cause the triggering of further triggered actions.

The <triggered SQL statement> of a triggered action is effectively executed either immediately before or
immediately after the trigger event, as determined by the specified trigger action time.

Format of trigger definition and syntax rules are defined in section 11.39.

OCL rules are derived from these syntax rules:
4) The schema identified by the explicit or implicit <schema name> of a <trigger name> TRN shall not include a trigger descriptor whose trigger name is TRN.
5) T shall be a base table that is not a declared local temporary table.
6) If a <trigger column list> is specified, then:
a) No <column name> shall appear more than once in the <trigger column list> .
b) The <column name> s of the <trigger column list> shall identify columns of T.
9) If OR or NR is specified, then FOR EACH ROW shall be specified.
12) If BEFORE is specified, then:
b) Neither OLD TABLE nor NEW TABLE shall be specified.


Parent PackageTablesAbstractNo
Export ControlPublicAccessLink Class forNone
Class KindNormalClassCardinalityn
Space ConcurrencySequential
PersistenceNo  


Operations
NameSignatureClass
addEAnnotationEAnnotation addEAnnotation (String source)SQLObject
addEAnnotationDetailvoid addEAnnotationDetail (EAnnotation eAnnotation, String key, String value)SQLObject
getEAnnotationDetailString getEAnnotationDetail (EAnnotation eAnnotation, String key)SQLObject
setAnnotationDetailvoid setAnnotationDetail (EAnnotation eAnnotation, String key, String value)SQLObject
removeEAnnotationDetailvoid removeEAnnotationDetail (EAnnotation eAnnotation, String key)SQLObject
getEAnnotationEAnnotation getEAnnotation (String source)SQLObject
getEAnnotationEAnnotation getEAnnotation (String source)EModelElement
eClassEClass eClass ()EObject
eIsProxyboolean eIsProxy ()EObject
eResourceEResource eResource ()EObject
eContainerEObject eContainer ()EObject
eContainingFeatureEStructuralFeature eContainingFeature ()EObject
eContainmentFeatureEReference eContainmentFeature ()EObject
eContentsEEList eContents ()EObject
eAllContentsETreeIterator eAllContents ()EObject
eCrossReferencesEEList eCrossReferences ()EObject
eGetEJavaObject eGet (EStructuralFeature feature)EObject
eGetEJavaObject eGet (EStructuralFeature feature, boolean resolve)EObject
eSet eSet (EStructuralFeature feature, EJavaObject newValue)EObject
eIsSetboolean eIsSet (EStructuralFeature feature)EObject
eUnset eUnset (EStructuralFeature feature)EObject


Attributes
NameClassTypeInitial Value
actionGranularityTriggerActionGranularityTypeSTATEMENT
whenTriggerSearchCondition 
timeStampTriggerDate 
actionTimeTriggerActionTimeType 
updateTypeTriggerboolean 
insertTypeTriggerboolean 
deleteTypeTriggerboolean 
oldRowTriggerString 
newRowTriggerString 
oldTableTriggerString 
newTableTriggerString 
descriptionSQLObjectString 
labelSQLObjectString 
nameENamedElementString 


Associations
NameMy RoleMy ClassOther RoleOther Element
--Not Named----Not Named--TriggeractionStatementSQLStatement
--Not Named--triggersTriggerschemaSchema
--Not Named----Not Named--TriggertriggerColumnColumn
--Not Named--triggersTriggersubjectTableTable
=--Not Named--SQLObjectdependenciesDependency
--Not Named--objectSQLObject--Not Named--Privilege
--Not Named--object2SQLObject--Not Named--DoubleObjectPrivilege
--Not Named--eModelElementEModelElementeAnnotationsEAnnotation
--Not Named--contentsEObject--Not Named--EAnnotation
--Not Named--referencesEObject--Not Named--EAnnotation
--Not Named--targetEndEObject--Not Named--Dependency


Generalization Relationships
NameClassSupplier
--Not Named--TriggerSQLObject
--Not Named--SQLObjectENamedElement
--Not Named--ENamedElementEModelElement
--Not Named--EModelElementEObject