org.eclipse.wst.rdb.internal.models.sql.tables
Interface Trigger

All Superinterfaces:
org.eclipse.emf.ecore.EModelElement, org.eclipse.emf.ecore.ENamedElement, org.eclipse.emf.ecore.EObject, org.eclipse.emf.common.notify.Notifier, SQLObject
All Known Implementing Classes:
TriggerImpl

public interface Trigger
extends SQLObject

A representation of the model object 'Trigger'. Section 4.38: A trigger is defined by a . A 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 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 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 of a 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 is specified, then: a) No shall appear more than once in the . b) The s of the 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.

The following features are supported:

See Also:
SQLTablesPackage.getTrigger()

Method Summary
 ActionGranularityType getActionGranularity()
          Returns the value of the 'Action Granularity' attribute.
 org.eclipse.emf.common.util.EList getActionStatement()
          Returns the value of the 'Action Statement' reference list.
 ActionTimeType getActionTime()
          Returns the value of the 'Action Time' attribute.
 java.lang.String getNewRow()
          Returns the value of the 'New Row' attribute.
 java.lang.String getNewTable()
          Returns the value of the 'New Table' attribute.
 java.lang.String getOldRow()
          Returns the value of the 'Old Row' attribute.
 java.lang.String getOldTable()
          Returns the value of the 'Old Table' attribute.
 Schema getSchema()
          Returns the value of the 'Schema' reference.
 Table getSubjectTable()
          Returns the value of the 'Subject Table' reference.
 java.util.Date getTimeStamp()
          Returns the value of the 'Time Stamp' attribute.
 org.eclipse.emf.common.util.EList getTriggerColumn()
          Returns the value of the 'Trigger Column' reference list.
 SearchCondition getWhen()
          Returns the value of the 'When' containment reference.
 boolean isDeleteType()
          Returns the value of the 'Delete Type' attribute.
 boolean isInsertType()
          Returns the value of the 'Insert Type' attribute.
 boolean isUpdateType()
          Returns the value of the 'Update Type' attribute.
 void setActionGranularity(ActionGranularityType value)
          Sets the value of the 'Action Granularity' attribute.
 void setActionTime(ActionTimeType value)
          Sets the value of the 'Action Time' attribute.
 void setDeleteType(boolean value)
          Sets the value of the 'Delete Type' attribute.
 void setInsertType(boolean value)
          Sets the value of the 'Insert Type' attribute.
 void setNewRow(java.lang.String value)
          Sets the value of the 'New Row' attribute.
 void setNewTable(java.lang.String value)
          Sets the value of the 'New Table' attribute.
 void setOldRow(java.lang.String value)
          Sets the value of the 'Old Row' attribute.
 void setOldTable(java.lang.String value)
          Sets the value of the 'Old Table' attribute.
 void setSchema(Schema value)
          Sets the value of the 'Schema' reference.
 void setSubjectTable(Table value)
          Sets the value of the 'Subject Table' reference.
 void setUpdateType(boolean value)
          Sets the value of the 'Update Type' attribute.
 void setWhen(SearchCondition value)
          Sets the value of the 'When' containment reference.
 
Methods inherited from interface org.eclipse.wst.rdb.internal.models.sql.schema.SQLObject
addEAnnotation, addEAnnotationDetail, getDependencies, getDescription, getEAnnotation, getEAnnotationDetail, getLabel, removeEAnnotationDetail, setAnnotationDetail, setDescription, setLabel
 
Methods inherited from interface org.eclipse.emf.ecore.ENamedElement
getName, setName
 
Methods inherited from interface org.eclipse.emf.ecore.EModelElement
getEAnnotations
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 

Method Detail

getSchema

public Schema getSchema()
Returns the value of the 'Schema' reference. It is bidirectional and its opposite is 'Triggers'.

If the meaning of the 'Schema' reference isn't clear, there really should be more of a description here...

Returns:
the value of the 'Schema' reference.
See Also:
setSchema(Schema), SQLTablesPackage.getTrigger_Schema(), Schema.getTriggers()

setSchema

public void setSchema(Schema value)
Sets the value of the 'Schema' reference.
Parameters:
value - the new value of the 'Schema' reference.
See Also:
getSchema()

getSubjectTable

public Table getSubjectTable()
Returns the value of the 'Subject Table' reference. It is bidirectional and its opposite is 'Triggers'.

If the meaning of the 'Subject Table' reference isn't clear, there really should be more of a description here...

Returns:
the value of the 'Subject Table' reference.
See Also:
setSubjectTable(Table), SQLTablesPackage.getTrigger_SubjectTable(), Table.getTriggers()

setSubjectTable

public void setSubjectTable(Table value)
Sets the value of the 'Subject Table' reference.
Parameters:
value - the new value of the 'Subject Table' reference.
See Also:
getSubjectTable()

getActionStatement

public org.eclipse.emf.common.util.EList getActionStatement()
Returns the value of the 'Action Statement' reference list. The list contents are of type SQLStatement.

If the meaning of the 'Action Statement' reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Action Statement' reference list.
See Also:
SQLTablesPackage.getTrigger_ActionStatement()

getTriggerColumn

public org.eclipse.emf.common.util.EList getTriggerColumn()
Returns the value of the 'Trigger Column' reference list. The list contents are of type Column.

If the meaning of the 'Trigger Column' reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Trigger Column' reference list.
See Also:
SQLTablesPackage.getTrigger_TriggerColumn()

getActionGranularity

public ActionGranularityType getActionGranularity()
Returns the value of the 'Action Granularity' attribute. The default value is "STATEMENT". The literals are from the enumeration ActionGranularityType.

If the meaning of the 'Action Granularity' attribute isn't clear, there really should be more of a description here...

Returns:
the value of the 'Action Granularity' attribute.
See Also:
ActionGranularityType, setActionGranularity(ActionGranularityType), SQLTablesPackage.getTrigger_ActionGranularity()

setActionGranularity

public void setActionGranularity(ActionGranularityType value)
Sets the value of the 'Action Granularity' attribute.
Parameters:
value - the new value of the 'Action Granularity' attribute.
See Also:
ActionGranularityType, getActionGranularity()

getWhen

public SearchCondition getWhen()
Returns the value of the 'When' containment reference.

If the meaning of the 'When' containment reference isn't clear, there really should be more of a description here...

Returns:
the value of the 'When' containment reference.
See Also:
setWhen(SearchCondition), SQLTablesPackage.getTrigger_When()

setWhen

public void setWhen(SearchCondition value)
Sets the value of the 'When' containment reference.
Parameters:
value - the new value of the 'When' containment reference.
See Also:
getWhen()

getTimeStamp

public java.util.Date getTimeStamp()
Returns the value of the 'Time Stamp' attribute. Triggers on the same table with the same action time are executed in order of creation, i.e. the time stamp, such that older triggers have priority.
Returns:
the value of the 'Time Stamp' attribute.
See Also:
SQLTablesPackage.getTrigger_TimeStamp()

getActionTime

public ActionTimeType getActionTime()
Returns the value of the 'Action Time' attribute. The literals are from the enumeration ActionTimeType.

If the meaning of the 'Action Time' attribute isn't clear, there really should be more of a description here...

Returns:
the value of the 'Action Time' attribute.
See Also:
ActionTimeType, setActionTime(ActionTimeType), SQLTablesPackage.getTrigger_ActionTime()

setActionTime

public void setActionTime(ActionTimeType value)
Sets the value of the 'Action Time' attribute.
Parameters:
value - the new value of the 'Action Time' attribute.
See Also:
ActionTimeType, getActionTime()

isUpdateType

public boolean isUpdateType()
Returns the value of the 'Update Type' attribute.

If the meaning of the 'Update Type' attribute isn't clear, there really should be more of a description here...

Returns:
the value of the 'Update Type' attribute.
See Also:
setUpdateType(boolean), SQLTablesPackage.getTrigger_UpdateType()

setUpdateType

public void setUpdateType(boolean value)
Sets the value of the 'Update Type' attribute.
Parameters:
value - the new value of the 'Update Type' attribute.
See Also:
isUpdateType()

isInsertType

public boolean isInsertType()
Returns the value of the 'Insert Type' attribute.

If the meaning of the 'Insert Type' attribute isn't clear, there really should be more of a description here...

Returns:
the value of the 'Insert Type' attribute.
See Also:
setInsertType(boolean), SQLTablesPackage.getTrigger_InsertType()

setInsertType

public void setInsertType(boolean value)
Sets the value of the 'Insert Type' attribute.
Parameters:
value - the new value of the 'Insert Type' attribute.
See Also:
isInsertType()

isDeleteType

public boolean isDeleteType()
Returns the value of the 'Delete Type' attribute.

If the meaning of the 'Delete Type' attribute isn't clear, there really should be more of a description here...

Returns:
the value of the 'Delete Type' attribute.
See Also:
setDeleteType(boolean), SQLTablesPackage.getTrigger_DeleteType()

setDeleteType

public void setDeleteType(boolean value)
Sets the value of the 'Delete Type' attribute.
Parameters:
value - the new value of the 'Delete Type' attribute.
See Also:
isDeleteType()

getOldRow

public java.lang.String getOldRow()
Returns the value of the 'Old Row' attribute.

If the meaning of the 'Old Row' attribute isn't clear, there really should be more of a description here...

Returns:
the value of the 'Old Row' attribute.
See Also:
setOldRow(String), SQLTablesPackage.getTrigger_OldRow()

setOldRow

public void setOldRow(java.lang.String value)
Sets the value of the 'Old Row' attribute.
Parameters:
value - the new value of the 'Old Row' attribute.
See Also:
getOldRow()

getNewRow

public java.lang.String getNewRow()
Returns the value of the 'New Row' attribute.

If the meaning of the 'New Row' attribute isn't clear, there really should be more of a description here...

Returns:
the value of the 'New Row' attribute.
See Also:
setNewRow(String), SQLTablesPackage.getTrigger_NewRow()

setNewRow

public void setNewRow(java.lang.String value)
Sets the value of the 'New Row' attribute.
Parameters:
value - the new value of the 'New Row' attribute.
See Also:
getNewRow()

getOldTable

public java.lang.String getOldTable()
Returns the value of the 'Old Table' attribute.

If the meaning of the 'Old Table' attribute isn't clear, there really should be more of a description here...

Returns:
the value of the 'Old Table' attribute.
See Also:
setOldTable(String), SQLTablesPackage.getTrigger_OldTable()

setOldTable

public void setOldTable(java.lang.String value)
Sets the value of the 'Old Table' attribute.
Parameters:
value - the new value of the 'Old Table' attribute.
See Also:
getOldTable()

getNewTable

public java.lang.String getNewTable()
Returns the value of the 'New Table' attribute.

If the meaning of the 'New Table' attribute isn't clear, there really should be more of a description here...

Returns:
the value of the 'New Table' attribute.
See Also:
setNewTable(String), SQLTablesPackage.getTrigger_NewTable()

setNewTable

public void setNewTable(java.lang.String value)
Sets the value of the 'New Table' attribute.
Parameters:
value - the new value of the 'New Table' attribute.
See Also:
getNewTable()