it = database.schemaManager.databaseObjectIterator(
SchemaObject.TRIGGER);
while (it.hasNext()) {
TriggerDef trigger = (TriggerDef) it.next();
if (!session.getGrantee().isAccessible(trigger)) {
continue;
}
row = t.getEmptyRowData();
row[trigger_catalog] = database.getCatalogName().name;
row[trigger_schema] = trigger.getSchemaName().name;
row[trigger_name] = trigger.getName().name;
row[event_manipulation] = trigger.getEventTypeString();
row[event_object_catalog] = database.getCatalogName().name;
row[event_object_schema] = trigger.getTable().getSchemaName().name;
row[event_object_table] = trigger.getTable().getName().name;
row[action_order] =
trigger.getTable().getTriggerIndex(trigger.getName().name);
row[action_condition] = trigger.getConditionSQL();
row[action_statement] = trigger.getProcedureSQL();
row[action_orientation] = trigger.getActionOrientationString();
row[action_timing] = trigger.getActionTimingString();
row[action_reference_old_table] =
trigger.getOldTransitionTableName();
row[action_reference_new_table] =
trigger.getNewTransitionTableName();
row[action_reference_old_row] = trigger.getOldTransitionRowName();
row[action_reference_new_row] = trigger.getNewTransitionRowName();
row[created] = null;
t.insertSys(store, row);
}