Search in sources :

Example 6 with TriggerDescriptorList

use of org.apache.derby.iapi.sql.dictionary.TriggerDescriptorList in project derby by apache.

the class DataDictionaryImpl method getTriggerDescriptorsScan.

/**
 * Populate the TriggerDescriptorList for the specified TableDescriptor.
 *
 * MT synchronization: it is assumed that the caller has synchronized
 * on the CDL in the given TD.
 *
 * @param td				The TableDescriptor.
 * @param forUpdate			Whether or not to open scan for update
 *
 * @exception StandardException		Thrown on failure
 */
private void getTriggerDescriptorsScan(TableDescriptor td, boolean forUpdate) throws StandardException {
    TriggerDescriptorList gdl = (td).getTriggerDescriptorList();
    DataValueDescriptor tableIDOrderable = null;
    TabInfoImpl ti = getNonCoreTI(SYSTRIGGERS_CATALOG_NUM);
    /* Use tableIDOrderable in both start and stop positions for scan */
    tableIDOrderable = getIDValueAsCHAR(td.getUUID());
    /* Set up the start/stop position for the scan */
    ExecIndexRow keyRow = (ExecIndexRow) exFactory.getIndexableRow(1);
    keyRow.setColumn(1, tableIDOrderable);
    getDescriptorViaIndex(SYSTRIGGERSRowFactory.SYSTRIGGERS_INDEX3_ID, keyRow, (ScanQualifier[][]) null, ti, (TupleDescriptor) null, gdl, TriggerDescriptor.class, forUpdate);
    gdl.setScanned(true);
}
Also used : DataValueDescriptor(org.apache.derby.iapi.types.DataValueDescriptor) ExecIndexRow(org.apache.derby.iapi.sql.execute.ExecIndexRow) TriggerDescriptorList(org.apache.derby.iapi.sql.dictionary.TriggerDescriptorList)

Aggregations

TriggerDescriptorList (org.apache.derby.iapi.sql.dictionary.TriggerDescriptorList)6 ArrayList (java.util.ArrayList)2 FormatableBitSet (org.apache.derby.iapi.services.io.FormatableBitSet)2 ConglomerateDescriptor (org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor)2 Timestamp (java.sql.Timestamp)1 ConstraintDescriptorList (org.apache.derby.iapi.sql.dictionary.ConstraintDescriptorList)1 ExecIndexRow (org.apache.derby.iapi.sql.execute.ExecIndexRow)1 DataValueDescriptor (org.apache.derby.iapi.types.DataValueDescriptor)1