Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

oracle.javatools.db.plsql
Class Trigger

java.lang.Object
  extended by oracle.javatools.db.AbstractDBObject
      extended by oracle.javatools.db.AbstractBuildableObject
          extended by oracle.javatools.db.plsql.DBObjectPlSqlFragment
              extended by oracle.javatools.db.plsql.PlSqlBlock
                  extended by oracle.javatools.db.plsql.PlSqlSchemaObject
                      extended by oracle.javatools.db.plsql.Trigger
All Implemented Interfaces:
ChildDBObject, DBObject, SchemaObject, SourceObject, SystemObject, Copyable, DynamicPropertySet

public class Trigger
extends PlSqlSchemaObject

Representation of a Database Trigger


Nested Class Summary
static class Trigger.BaseType
          Base type for the Trigger (i.e.
static class Trigger.Timing
          Timing of a trigger - at what point relative to the trigger event the trigger's code will be executed.
 
Nested classes/interfaces inherited from class oracle.javatools.db.AbstractDBObject
AbstractDBObject.ChildSupport, AbstractDBObject.ListenerSupport
 
Field Summary
static java.lang.String ALTER_EVENT
           
static java.lang.String ANALYZE_EVENT
           
static java.lang.String ASSOCIATE_STATISTICS_EVENT
           
static java.lang.String AUDIT_EVENT
           
static java.lang.String COMMENT_EVENT
           
static java.lang.String CREATE_EVENT
           
static java.lang.String DB_ROLE_CHANGE_EVENT
           
static java.lang.String DDL_EVENT
           
static java.lang.String DELETE_EVENT
           
static java.lang.String DISASSOCIATE_STATISTICS_EVENT
           
static java.lang.String DROP_EVENT
           
static java.lang.String GRANT_EVENT
           
static java.lang.String INSERT_EVENT
           
static java.lang.String LOGOFF_EVENT
           
static java.lang.String LOGON_EVENT
           
static java.lang.String NOAUDIT_EVENT
           
static java.lang.String RENAME_EVENT
           
static java.lang.String REVOKE_EVENT
           
static java.lang.String SERVERERROR_EVENT
           
static java.lang.String SHUTDOWN_EVENT
           
static java.lang.String STARTUP_EVENT
           
static java.lang.String SUSPEND_EVENT
           
static java.lang.String TRUNCATE_EVENT
           
static java.lang.String TYPE
           
static java.lang.String UPDATE_EVENT
           
 
Fields inherited from interface oracle.javatools.db.DBObject
COMMENT
 
Constructor Summary
Trigger()
           
 
Method Summary
 DBObjectID getBaseObjectID()
          Get method for the ID of the SchemaObject this is a Trigger for
 java.lang.String getBaseSchemaName()
          Deprecated. - use getBaseObjectID
 Trigger.BaseType getBaseType()
          Get method for the BaseType property
 java.lang.String getCode()
          Get method for the Code property
 DBObjectID[] getColumnIDs()
           
 java.lang.String[] getEvents()
          Get method for the Events property
static java.util.List getEvents(Trigger.BaseType type, Trigger.Timing timing)
          Returns the valid events for the given BaseType and Timing.
 java.lang.String getReferencingNewAs()
          Get method for the ReferencingNewAs property
 java.lang.String getReferencingOldAs()
          Get method for the ReferencingOldAs property
 DBObjectID getTableID()
          Deprecated. - use getBaseObjectID
 Trigger.Timing getTiming()
          Get method for the Timing property
 java.lang.String getType()
          Returns the type of this object.
 java.lang.String getWhenClause()
          Get method for the WhenClause property
static boolean isDatabaseOnlyEvent(java.lang.String event)
          Returns true if the given event String is only applicable to databases (i.e.
 boolean isEnabled()
          Get method for the Enabled property
 boolean isStatementLevel()
          Get method for the StatementLevel property
 void setBaseObjectID(DBObjectID baseObjectID)
          Get method for the ID of the SchemaObject this is a Trigger for
 void setBaseSchemaName(java.lang.String baseSchemaName)
          Deprecated. - use setBaseObjectID
 void setBaseType(Trigger.BaseType baseType)
          Set method for the BaseType property
 void setCode(java.lang.String code)
          Set method for the Code property
 void setColumnIDs(DBObjectID[] columnIDs)
          Set method for the ColumnIDs property
 void setEnabled(boolean enabled)
          Set method for the Enabled property
 void setEvents(java.lang.String[] events)
          Set method for the Events property
 void setReferencingNewAs(java.lang.String refNewAs)
          Set method for the ReferencingNewAs property
 void setReferencingOldAs(java.lang.String refOldAs)
          Set method for the ReferencingOldAs property
 void setStatementLevel(boolean statementLevel)
          Set method for the StatementLevel property
 void setTableID(DBObjectID tableID)
          Deprecated. - use setBaseObjectID
 void setTiming(Trigger.Timing timing)
          Set method for the Timing property
 void setWhenClause(java.lang.String whenClause)
          Set method for the WhenClause property
 
Methods inherited from class oracle.javatools.db.plsql.PlSqlSchemaObject
addObjectListener, addObjectListener, addObjectListener, fireObjectUpdated, getSchema, getSource, removeObjectListener, removeObjectListener, removeObjectListener, setSchema, setSource
 
Methods inherited from class oracle.javatools.db.plsql.PlSqlBlock
addBlock, addDatatype, addReference, addSubProgram, addVariable, getBlocks, getDatatypes, getReferences, getSubProgram, getSubPrograms, getVariable, getVariables, setBlocks, setDatatypes, setReferences, setSubPrograms, setVariables
 
Methods inherited from class oracle.javatools.db.plsql.DBObjectPlSqlFragment
clearSourceID, copyToImpl, getChildAtOffset, getEndOffset, getParent, getSourceID, getStartOffset, setEndOffset, setParent, setStartOffset
 
Methods inherited from class oracle.javatools.db.AbstractBuildableObject
checkInit, checkInit, equalsImpl, getOwnedObjectsImpl, getProperties, getProperty, getReferenceIDsImpl, needsInitialization, setProperty
 
Methods inherited from class oracle.javatools.db.AbstractDBObject
changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyTo, equals, findOwnedObject, findOwnedObject, findOwnedObject, getChildSupport, getID, getName, getOwnedObjects, getOwnedObjects, getProperty, getReferenceIDs, hashCode, includeOwnedObject, includesType, includesType, removeThisAsParent, replaceReferenceIDs, setID, setName, setProperties, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.javatools.db.DBObject
copyTo, copyTo, copyTo, findOwnedObject, findOwnedObject, getID, getName, getOwnedObjects, getOwnedObjects, getParent, getReferenceIDs, replaceReferenceIDs, setID, setName
 
Methods inherited from interface oracle.javatools.util.DynamicPropertySet
getProperties, getProperty, getProperty, setProperties, setProperty
 

Field Detail

TYPE

public static final java.lang.String TYPE
See Also:
Constant Field Values

INSERT_EVENT

public static final java.lang.String INSERT_EVENT
See Also:
Constant Field Values

DELETE_EVENT

public static final java.lang.String DELETE_EVENT
See Also:
Constant Field Values

UPDATE_EVENT

public static final java.lang.String UPDATE_EVENT
See Also:
Constant Field Values

ALTER_EVENT

public static final java.lang.String ALTER_EVENT
See Also:
Constant Field Values

ANALYZE_EVENT

public static final java.lang.String ANALYZE_EVENT
See Also:
Constant Field Values

ASSOCIATE_STATISTICS_EVENT

public static final java.lang.String ASSOCIATE_STATISTICS_EVENT
See Also:
Constant Field Values

AUDIT_EVENT

public static final java.lang.String AUDIT_EVENT
See Also:
Constant Field Values

COMMENT_EVENT

public static final java.lang.String COMMENT_EVENT
See Also:
Constant Field Values

CREATE_EVENT

public static final java.lang.String CREATE_EVENT
See Also:
Constant Field Values

DISASSOCIATE_STATISTICS_EVENT

public static final java.lang.String DISASSOCIATE_STATISTICS_EVENT
See Also:
Constant Field Values

DB_ROLE_CHANGE_EVENT

public static final java.lang.String DB_ROLE_CHANGE_EVENT
See Also:
Constant Field Values

DROP_EVENT

public static final java.lang.String DROP_EVENT
See Also:
Constant Field Values

GRANT_EVENT

public static final java.lang.String GRANT_EVENT
See Also:
Constant Field Values

NOAUDIT_EVENT

public static final java.lang.String NOAUDIT_EVENT
See Also:
Constant Field Values

RENAME_EVENT

public static final java.lang.String RENAME_EVENT
See Also:
Constant Field Values

REVOKE_EVENT

public static final java.lang.String REVOKE_EVENT
See Also:
Constant Field Values

TRUNCATE_EVENT

public static final java.lang.String TRUNCATE_EVENT
See Also:
Constant Field Values

DDL_EVENT

public static final java.lang.String DDL_EVENT
See Also:
Constant Field Values

SERVERERROR_EVENT

public static final java.lang.String SERVERERROR_EVENT
See Also:
Constant Field Values

LOGON_EVENT

public static final java.lang.String LOGON_EVENT
See Also:
Constant Field Values

LOGOFF_EVENT

public static final java.lang.String LOGOFF_EVENT
See Also:
Constant Field Values

STARTUP_EVENT

public static final java.lang.String STARTUP_EVENT
See Also:
Constant Field Values

SHUTDOWN_EVENT

public static final java.lang.String SHUTDOWN_EVENT
See Also:
Constant Field Values

SUSPEND_EVENT

public static final java.lang.String SUSPEND_EVENT
See Also:
Constant Field Values
Constructor Detail

Trigger

public Trigger()
Method Detail

isDatabaseOnlyEvent

public static boolean isDatabaseOnlyEvent(java.lang.String event)
Returns true if the given event String is only applicable to databases (i.e. isn't a DDL event that can be applied to a schema as well as a database).

Parameters:
event - the event string to query
Returns:
false if the event is DDL or DML

getEvents

public static java.util.List getEvents(Trigger.BaseType type,
                                       Trigger.Timing timing)
Returns the valid events for the given BaseType and Timing.


getType

public java.lang.String getType()
Description copied from interface: DBObject
Returns the type of this object. Valid types include things like tables, views, synonyms, and columns.

Specified by:
getType in interface DBObject
Overrides:
getType in class PlSqlBlock
Returns:
a string describing the type of object.

isEnabled

public boolean isEnabled()
Get method for the Enabled property

Returns:
Since:
11.1.2.0.0

setEnabled

public void setEnabled(boolean enabled)
Set method for the Enabled property

Parameters:
enabled -
Since:
11.1.2.0.0

getTiming

public Trigger.Timing getTiming()
Get method for the Timing property

Returns:
Since:
11.1.2.0.0

setTiming

public void setTiming(Trigger.Timing timing)
Set method for the Timing property

Parameters:
timing -
Since:
11.1.2.0.0

isStatementLevel

public boolean isStatementLevel()
Get method for the StatementLevel property

Returns:
Since:
11.1.2.0.0

setStatementLevel

public void setStatementLevel(boolean statementLevel)
Set method for the StatementLevel property

Parameters:
statementLevel -
Since:
11.1.2.0.0

getEvents

public java.lang.String[] getEvents()
Get method for the Events property

Returns:
Since:
11.1.2.0.0

setEvents

public void setEvents(java.lang.String[] events)
Set method for the Events property

Parameters:
events -
Since:
11.1.2.0.0

getBaseObjectID

public DBObjectID getBaseObjectID()
Get method for the ID of the SchemaObject this is a Trigger for

Returns:
Since:
11.1.2.0.0

setBaseObjectID

public void setBaseObjectID(DBObjectID baseObjectID)
Get method for the ID of the SchemaObject this is a Trigger for

Parameters:
baseObjectID -
Since:
11.1.2.0.0

getBaseSchemaName

@Deprecated
public java.lang.String getBaseSchemaName()
Deprecated. - use getBaseObjectID


setBaseSchemaName

@Deprecated
public void setBaseSchemaName(java.lang.String baseSchemaName)
Deprecated. - use setBaseObjectID


getTableID

@Deprecated
public DBObjectID getTableID()
Deprecated. - use getBaseObjectID


setTableID

@Deprecated
public void setTableID(DBObjectID tableID)
Deprecated. - use setBaseObjectID


getBaseType

public Trigger.BaseType getBaseType()
Get method for the BaseType property

Returns:
Since:
11.1.2.0.0

setBaseType

public void setBaseType(Trigger.BaseType baseType)
Set method for the BaseType property

Parameters:
baseType -
Since:
11.1.2.0.0

getWhenClause

public java.lang.String getWhenClause()
Get method for the WhenClause property

Returns:
Since:
11.1.2.0.0

setWhenClause

public void setWhenClause(java.lang.String whenClause)
Set method for the WhenClause property

Parameters:
whenClause -
Since:
11.1.2.0.0

getColumnIDs

public DBObjectID[] getColumnIDs()

setColumnIDs

public void setColumnIDs(DBObjectID[] columnIDs)
Set method for the ColumnIDs property

Parameters:
columnIDs -
Since:
11.1.2.0.0

getCode

public java.lang.String getCode()
Get method for the Code property

Returns:
Since:
11.1.2.0.0

setCode

public void setCode(java.lang.String code)
Set method for the Code property

Parameters:
code -
Since:
11.1.2.0.0

setReferencingNewAs

public void setReferencingNewAs(java.lang.String refNewAs)
Set method for the ReferencingNewAs property

Parameters:
refNewAs -
Since:
11.1.2.0.0

getReferencingNewAs

public java.lang.String getReferencingNewAs()
Get method for the ReferencingNewAs property

Returns:
Since:
11.1.2.0.0

setReferencingOldAs

public void setReferencingOldAs(java.lang.String refOldAs)
Set method for the ReferencingOldAs property

Parameters:
refOldAs -
Since:
11.1.2.0.0

getReferencingOldAs

public java.lang.String getReferencingOldAs()
Get method for the ReferencingOldAs property

Returns:
Since:
11.1.2.0.0

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

Copyright © 1997, 2011, Oracle. All rights reserved.