Trigger
instead@Deprecated public class Trigger extends PlSql
Modifier and Type | Class and Description |
---|---|
static class |
Trigger.BaseType
Deprecated.
Base type for the Trigger (i.e.
|
static class |
Trigger.Timing
Deprecated.
Timing of a trigger - at what point relative to the trigger event the trigger's code will be executed.
|
AbstractDBObject.ChildSupport, AbstractDBObject.ListenerSupport
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ALTER_EVENT
Deprecated.
|
static java.lang.String |
ANALYZE_EVENT
Deprecated.
|
static java.lang.String |
ASSOCIATE_STATISTICS_EVENT
Deprecated.
|
static java.lang.String |
AUDIT_EVENT
Deprecated.
|
static java.lang.String |
COMMENT_EVENT
Deprecated.
|
static java.lang.String |
CREATE_EVENT
Deprecated.
|
static java.lang.String |
DB_ROLE_CHANGE_EVENT
Deprecated.
|
static java.lang.String |
DDL_EVENT
Deprecated.
|
static java.lang.String |
DELETE_EVENT
Deprecated.
|
static java.lang.String |
DISASSOCIATE_STATISTICS_EVENT
Deprecated.
|
static java.lang.String |
DROP_EVENT
Deprecated.
|
static java.lang.String |
GRANT_EVENT
Deprecated.
|
static java.lang.String |
INSERT_EVENT
Deprecated.
|
static java.lang.String |
LOGOFF_EVENT
Deprecated.
|
static java.lang.String |
LOGON_EVENT
Deprecated.
|
static java.lang.String |
NOAUDIT_EVENT
Deprecated.
|
static java.lang.String |
RENAME_EVENT
Deprecated.
|
static java.lang.String |
REVOKE_EVENT
Deprecated.
|
static java.lang.String |
SERVERERROR_EVENT
Deprecated.
|
static java.lang.String |
SHUTDOWN_EVENT
Deprecated.
|
static java.lang.String |
STARTUP_EVENT
Deprecated.
|
static java.lang.String |
SUSPEND_EVENT
Deprecated.
|
static java.lang.String |
TRUNCATE_EVENT
Deprecated.
|
static java.lang.String |
TYPE
Deprecated.
|
static java.lang.String |
UPDATE_EVENT
Deprecated.
|
BLOCK_TYPE
Constructor and Description |
---|
Trigger()
Deprecated.
|
Trigger(Schema schema, java.lang.String name)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBaseSchemaName()
Deprecated.
Gets the schema name for this trigger.
|
Trigger.BaseType |
getBaseType()
Deprecated.
Gets the base type of the trigger.
|
java.lang.String |
getCode()
Deprecated.
Gets the list of PL/SQL code of the trigger, ie from the BEGIN or DECLARE, to the matching END statement.
|
DBObjectID[] |
getColumnIDs()
Deprecated.
|
java.lang.String[] |
getEvents()
Deprecated.
Gets the list of events for the trigger.
|
static java.util.List |
getEvents(Trigger.BaseType type, Trigger.Timing timing)
Deprecated.
Returns the valie events for the given BaseType and Timing.
|
java.lang.String[] |
getReferenceNames()
Deprecated.
- see
getReferencingOldAs() and getReferencingNewAs() |
java.lang.String |
getReferencingNewAs()
Deprecated.
Gets the name used in the REFERENCING AS NEW clause of the trigger.
|
java.lang.String |
getReferencingOldAs()
Deprecated.
Gets the name used in the REFERENCING AS OLD clause of the trigger.
|
java.lang.String |
getSource()
Deprecated.
Gets the source to create the trigger.
|
DBObjectID |
getTableID()
Deprecated.
Gets the table name for the trigger.
|
Schema |
getTableOwner()
Deprecated.
- use
getBaseSchemaName() |
Trigger.Timing |
getTiming()
Deprecated.
Gets the timing (before/after) of the trigger.
|
java.lang.String |
getType()
Deprecated.
Returns the type of this object.
|
java.lang.String |
getWhenClause()
Deprecated.
Gets the WHEN clause of the trigger.
|
static boolean |
isDatabaseOnlyEvent(java.lang.String event)
Deprecated.
Returns true if the given event String is only applicable to databases (i.e.
|
boolean |
isEnabled()
Deprecated.
Gets whether this Trigger is enabled.
|
boolean |
isStatementLevel()
Deprecated.
Gets whether or not the trigger is statement level.
|
void |
setBaseSchema(Schema schema)
Deprecated.
Convenience method that calls
setBaseSchemaName(String) with the given schema's name. |
void |
setBaseSchemaName(java.lang.String baseSchemaName)
Deprecated.
Sets the schema name that this trigger has as its base.
|
void |
setBaseType(Trigger.BaseType baseType)
Deprecated.
Sets the base type of the trigger.
|
void |
setCode(java.lang.String code)
Deprecated.
Sets the list of PL/SQL code of the trigger, ie from the BEGIN or DECLARE, to the matching END statement.
|
void |
setColumnIDs(DBObjectID[] ids)
Deprecated.
|
void |
setEnabled(boolean enabled)
Deprecated.
Sets whether this Trigger is enabled.
|
void |
setEvents(java.lang.String[] events)
Deprecated.
Sets the list of events for the trigger.
|
void |
setReferenceNames(java.lang.String[] names)
Deprecated.
|
void |
setReferencingNewAs(java.lang.String referencingNewAs)
Deprecated.
Sets the name used in the REFERENCING AS NEW clause of the trigger.
|
void |
setReferencingOldAs(java.lang.String referencingOldAs)
Deprecated.
Sets the name used in the REFERENCING AS OLD clause of the trigger.
|
void |
setSource(java.lang.String source)
Deprecated.
Sets the source to create the trigger.
|
void |
setStatementLevel(boolean statementLevel)
Deprecated.
Sets whether or not the trigger is statement level.
|
void |
setTableID(DBObjectID tableID)
Deprecated.
Sets the table name for the trigger.
|
void |
setTableOwner(Schema owner)
Deprecated.
- see information on
getTableOwner() . |
void |
setTiming(Trigger.Timing timing)
Deprecated.
Sets the timing (before/after) of the trigger.
|
void |
setWhenClause(java.lang.String whenClause)
Deprecated.
Sets the WHEN clause of the trigger.
|
copyToImpl, equalsImpl, getSourceInterrogator, isPlSql
getSchema, setSchema
fireObjectUpdated
checkInit, checkInit, getOwnedObjectsImpl, getProperties, getReferenceIDsImpl, needsInitialization
addObjectListener, addObjectListener, addObjectListener, changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyTo, equals, findOwnedObject, findOwnedObject, findOwnedObject, findOwnedObject, findParent, firePropertyChanged, getChildSupport, getID, getName, getOwnedObjects, getOwnedObjects, getParent, getProperty, getProperty, getReferenceIDs, hashCode, includeOwnedObject, includesType, includesType, removeObjectListener, removeObjectListener, removeObjectListener, removeOwnedObject, removeThisAsParent, replaceReferenceIDs, setID, setName, setProperties, setProperty, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addObjectListener, getSchema, removeObjectListener, setSchema
addObjectListener, fireObjectUpdated, removeObjectListener
addObjectListener, copyTo, copyTo, copyTo, findOwnedObject, findOwnedObject, findOwnedObject, getID, getName, getOwnedObjects, getOwnedObjects, getParent, getProperties, getReferenceIDs, removeObjectListener, removeOwnedObject, replaceReferenceIDs, setID, setName
getProperty, getProperty, setProperties, setProperty
public static final java.lang.String TYPE
public static final java.lang.String INSERT_EVENT
public static final java.lang.String DELETE_EVENT
public static final java.lang.String UPDATE_EVENT
public static final java.lang.String ALTER_EVENT
public static final java.lang.String ANALYZE_EVENT
public static final java.lang.String ASSOCIATE_STATISTICS_EVENT
public static final java.lang.String AUDIT_EVENT
public static final java.lang.String COMMENT_EVENT
public static final java.lang.String CREATE_EVENT
public static final java.lang.String DISASSOCIATE_STATISTICS_EVENT
public static final java.lang.String DB_ROLE_CHANGE_EVENT
public static final java.lang.String DROP_EVENT
public static final java.lang.String GRANT_EVENT
public static final java.lang.String NOAUDIT_EVENT
public static final java.lang.String RENAME_EVENT
public static final java.lang.String REVOKE_EVENT
public static final java.lang.String TRUNCATE_EVENT
public static final java.lang.String DDL_EVENT
public static final java.lang.String SERVERERROR_EVENT
public static final java.lang.String LOGON_EVENT
public static final java.lang.String LOGOFF_EVENT
public static final java.lang.String STARTUP_EVENT
public static final java.lang.String SHUTDOWN_EVENT
public static final java.lang.String SUSPEND_EVENT
public Trigger()
public Trigger(Schema schema, java.lang.String name)
public static boolean isDatabaseOnlyEvent(java.lang.String event)
event
- the event string to querypublic static java.util.List getEvents(Trigger.BaseType type, Trigger.Timing timing)
public java.lang.String getType()
DBObject
public boolean isEnabled()
public void setEnabled(boolean enabled)
public Trigger.Timing getTiming()
setSource(java.lang.String)
for limitations on the use of getSource(), setSource() and the other get/set methods of this class.public void setTiming(Trigger.Timing timing)
setSource(java.lang.String)
for limitations on the use of getSource(), setSource() and the other get/set methods of this class.public boolean isStatementLevel()
setSource(java.lang.String)
for limitations on the use of getSource(), setSource() and the other get/set methods of this class.public void setStatementLevel(boolean statementLevel)
setSource(java.lang.String)
for limitations on the use of getSource(), setSource() and the other get/set methods of this class.public java.lang.String[] getEvents()
setSource(java.lang.String)
for limitations on the use of getSource(), setSource() and the other get/set methods of this class.public void setEvents(java.lang.String[] events)
setSource(java.lang.String)
for limitations on the use of getSource(), setSource() and the other get/set methods of this class.public java.lang.String getBaseSchemaName()
base type
of the trigger is Trigger.BaseType.SCHEMA
.
See setSource(java.lang.String)
for limitations on the use of getSource(), setSource() and the other get/set methods of this class.
public void setBaseSchemaName(java.lang.String baseSchemaName)
Trigger.BaseType.SCHEMA
triggers.
See setSource(java.lang.String)
for limitations on the use of getSource(), setSource() and the other get/set methods of this class.
public void setBaseSchema(Schema schema)
setBaseSchemaName(String)
with the given schema's name.schema
- the schema whose name is to be used as the baseSchemaName property. If null, the baseSchemaName is set to null.setBaseSchemaName(String)
@Deprecated public Schema getTableOwner()
getBaseSchemaName()
getTableID()
, resolve it and get the schema. If you want the base schema for a Trigger.BaseType.SCHEMA
trigger use getBaseSchemaName().@Deprecated public void setTableOwner(Schema owner)
getTableOwner()
.setSource(java.lang.String)
for limitations on the use of getSource(), setSource() and the other get/set methods of this class.public DBObjectID getTableID()
setSource(java.lang.String)
for limitations on the use of getSource(), setSource() and the other get/set methods of this class.public void setTableID(DBObjectID tableID)
setSource(java.lang.String)
for limitations on the use of getSource(), setSource() and the other get/set methods of this class.public Trigger.BaseType getBaseType()
setSource(java.lang.String)
for limitations on the use of getSource(), setSource() and the other get/set methods of this class.public void setBaseType(Trigger.BaseType baseType)
setSource(java.lang.String)
for limitations on the use of getSource(), setSource() and the other get/set methods of this class.type
-public java.lang.String getWhenClause()
setSource(java.lang.String)
for limitations on the use of getSource(), setSource() and the other get/set methods of this class.public void setWhenClause(java.lang.String whenClause)
setSource(java.lang.String)
for limitations on the use of getSource(), setSource() and the other get/set methods of this class.public DBObjectID[] getColumnIDs()
public void setColumnIDs(DBObjectID[] ids)
public java.lang.String getCode()
setSource(java.lang.String)
for limitations on the use of getSource(), setSource() and the other get/set methods of this class.public void setCode(java.lang.String code)
setSource(java.lang.String)
for limitations on the use of getSource(), setSource() and the other get/set methods of this class.public void setReferencingNewAs(java.lang.String referencingNewAs)
setSource(java.lang.String)
for limitations on the use of getSource(), setSource() and the other get/set methods of this class.public java.lang.String getReferencingNewAs()
setSource(java.lang.String)
for limitations on the use of getSource(), setSource() and the other get/set methods of this class.public void setReferencingOldAs(java.lang.String referencingOldAs)
setSource(java.lang.String)
for limitations on the use of getSource(), setSource() and the other get/set methods of this class.public java.lang.String getReferencingOldAs()
setSource(java.lang.String)
for limitations on the use of getSource(), setSource() and the other get/set methods of this class.@Deprecated public java.lang.String[] getReferenceNames()
@Deprecated public void setReferenceNames(java.lang.String[] names)
public java.lang.String getSource()
setSource(java.lang.String)
for limitations on the use of getSource(), setSource() and the other get/set methods of this class.getSource
in interface SourceObject
getSource
in class PlSql
public void setSource(java.lang.String source)
The source is the entire Trigger definition as it would appear in the USER_SOURCE view. This source by definition covers all the other attributes of a Trigger listed in this class, and which have their own get and set methods. However, as the ALTER TRIGGER statement is very limited in its capabilities, a modification to a trigger is usually made by resubmitting the enitire source (typically with CREATE OR REPLACE).
The trigger class itself however, is not responsible for keeping its internal representation of the source and the other declarative properties in step.
If changes are made via the setTiming(oracle.javatools.db.Trigger.Timing)
, setEvents(java.lang.String[])
, setCode(java.lang.String)
methods etc, it will be necessary to use the DDLGenerator
to construct the full source, and then set this using this method.
If changes are made to the source via this method, it will be necessary to use the PlSqlDeclarator
to set the other attributes correctly.
setSource
in interface SourceObject
setSource
in class PlSql