Class TriggerInfo
java.lang.Object
org.apache.derby.impl.sql.execute.TriggerInfo
- All Implemented Interfaces:
Externalizable
,Serializable
,Formatable
,TypedFormat
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.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) TriggerDescriptor[]
This class implements Formatable. -
Constructor Summary
ConstructorsConstructorDescriptionNiladic constructor for FormattableTriggerInfo
(TriggerDescriptorList triggers) Constructor for TriggerInfo -
Method Summary
Modifier and TypeMethodDescription(package private) TriggerDescriptor[]
int
Get the formatID which corresponds to this class.(package private) boolean
hasTrigger
(boolean isBefore, boolean isRow) Do we have a trigger or triggers that meet the criteriavoid
Read this object from a stream of stored objects.toString()
void
Write this object out
-
Field Details
-
triggerArray
TriggerDescriptor[] triggerArrayThis 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 Details
-
TriggerInfo
public TriggerInfo()Niladic constructor for Formattable -
TriggerInfo
Constructor for TriggerInfo- Parameters:
triggers
- the list of trigger descriptors
-
-
Method Details
-
hasTrigger
boolean hasTrigger(boolean isBefore, boolean isRow) Do we have a trigger or triggers that meet the criteria- Parameters:
isBefore
- true for a before trigger, false for after trigger, null for eitherisRow
- true for a row trigger, false for statement trigger, null for either- Returns:
- true if we have a trigger that meets the criteria
-
getTriggerArray
TriggerDescriptor[] getTriggerArray() -
writeExternal
Write this object out- Specified by:
writeExternal
in interfaceExternalizable
- Parameters:
out
- write bytes here- Throws:
IOException
- thrown on error
-
readExternal
Read this object from a stream of stored objects.- Specified by:
readExternal
in interfaceExternalizable
- Parameters:
in
- read this.- Throws:
IOException
- thrown on errorClassNotFoundException
- thrown on error
-
getTypeFormatId
public int getTypeFormatId()Get the formatID which corresponds to this class.- Specified by:
getTypeFormatId
in interfaceTypedFormat
- Returns:
- the formatID of this class
-
toString
-