Top Description Fields Constructors Methods
org.apache.derby.impl.sql.execute

public final Class TriggerInfo

extends Object
implements Formatable
Class Inheritance
All Implemented Interfaces
org.apache.derby.iapi.services.io.Formatable, org.apache.derby.iapi.services.io.TypedFormat, java.io.Externalizable, java.io.Serializable
Imports
org.apache.derby.iapi.sql.dictionary.TriggerDescriptorList, .TriggerDescriptor, org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.iapi.services.io.StoredFormatIds, .Formatable, org.apache.derby.shared.common.util.ArrayUtil, java.io.ObjectOutput, .ObjectInput, .IOException

This is a simple class used to store the run time information about a foreign key. Used by DML to figure out what to check.

Field Summary

Modifier and TypeField and Description
pack-priv TriggerDescriptor[]
triggerArray

This class implements Formatable.

Constructor Summary

AccessConstructor and Description
public
TriggerInfo()

Niladic constructor for Formattable

public
TriggerInfo(TriggerDescriptorList
the list of trigger descriptors
triggers
)

Constructor for TriggerInfo

Method Summary

Modifier and TypeMethod and Description
pack-priv TriggerDescriptor[]
public int

Returns:

the formatID of this class
getTypeFormatId
()

Implements org.apache.derby.iapi.services.io.TypedFormat.getTypeFormatId.

Get the formatID which corresponds to this class.

pack-priv boolean

Returns:

true if we have a trigger that meets the criteria
hasTrigger
(boolean
true for a before trigger, false for after trigger, null for either
isBefore
,
boolean
true for a row trigger, false for statement trigger, null for either
isRow
)

Do we have a trigger or triggers that meet the criteria

public void
readExternal(ObjectInput
read this.
in
)

Implements java.io.Externalizable.readExternal.

Read this object from a stream of stored objects.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public void
writeExternal(ObjectOutput
write bytes here
out
)

Implements java.io.Externalizable.writeExternal.

Write this object out

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

triggerArrayback to summary
pack-priv TriggerDescriptor[] triggerArray

This class implements Formatable. That means that it can write itself to and from a formatted stream. If you add more fields to this class, make sure that you also write/read them with the writeExternal()/readExternal() methods. If, inbetween releases, you add more fields to this class, then you should bump the version number emitted by the getTypeFormatId() method. OR, since this is something that is used in stored prepared statements, it is ok to change it if you make sure that stored prepared statements are invalidated across releases.

Constructor Detail

TriggerInfoback to summary
public TriggerInfo()

Niladic constructor for Formattable

TriggerInfoback to summary
public TriggerInfo(TriggerDescriptorList triggers)

Constructor for TriggerInfo

Parameters
triggers:TriggerDescriptorList

the list of trigger descriptors

Method Detail

getTriggerArrayback to summary
pack-priv TriggerDescriptor[] getTriggerArray()
getTypeFormatIdback to summary
public int getTypeFormatId()

Implements org.apache.derby.iapi.services.io.TypedFormat.getTypeFormatId.

Get the formatID which corresponds to this class.

Returns:int

the formatID of this class

hasTriggerback to summary
pack-priv boolean hasTrigger(boolean isBefore, boolean isRow)

Do we have a trigger or triggers that meet the criteria

Parameters
isBefore:boolean

true for a before trigger, false for after trigger, null for either

isRow:boolean

true for a row trigger, false for statement trigger, null for either

Returns:boolean

true if we have a trigger that meets the criteria

readExternalback to summary
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException

Implements java.io.Externalizable.readExternal.

Read this object from a stream of stored objects.

Parameters
in:ObjectInput

read this.

Exceptions
IOException:
thrown on error
ClassNotFoundException:
thrown on error
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
writeExternalback to summary
public void writeExternal(ObjectOutput out) throws IOException

Implements java.io.Externalizable.writeExternal.

Write this object out

Parameters
out:ObjectOutput

write bytes here

Exceptions
IOException:
thrown on error