Package org.apache.derby.iapi.sql.dictionary

Examples of org.apache.derby.iapi.sql.dictionary.GenericDescriptorList


    this.lockGranularity = lockGranularity;

    this.conglomerateDescriptorList = new ConglomerateDescriptorList();
    this.columnDescriptorList = new ColumnDescriptorList();
    this.constraintDescriptorList = new ConstraintDescriptorList();
    this.triggerDescriptorList = new GenericDescriptorList();
  }
View Full Code Here


   */
  public void emptyTriggerDescriptorList()
    throws StandardException
  {
    // Easier just to get a new CDL then to clean out the current one
    this.triggerDescriptorList = new GenericDescriptorList();
  }
View Full Code Here

    boolean[]  needsDeferredProcessing = new boolean[1];
    needsDeferredProcessing[0] = requiresDeferredProcessing();

    Vector    conglomVector = new Vector();
    relevantCdl = new ConstraintDescriptorList();
    relevantTriggers =  new GenericDescriptorList();

    FormatableBitSet  columnMap = UpdateNode.getUpdateReadMap(baseTable,
      updateColumnList, conglomVector, relevantCdl, relevantTriggers, needsDeferredProcessing );

    markAffectedIndexes( conglomVector );
View Full Code Here

  private GenericDescriptorList getAllTriggerDescriptors()
    throws StandardException
  {
    TabInfo          ti = getNonCoreTI(SYSTRIGGERS_CATALOG_NUM);

    GenericDescriptorList list = new GenericDescriptorList();

    getDescriptorViaHeap(
            (ScanQualifier[][]) null,
            ti,
            (TupleDescriptor) null,
View Full Code Here

   * @exception StandardException    Thrown on failure
   */
  public GenericDescriptorList getTriggerDescriptors(TableDescriptor td)
    throws StandardException
  {
    GenericDescriptorList  gdl;

    if (td == null)
    {
      return getAllTriggerDescriptors();
    }

    /* Build the TableDescriptor's TDL if it is currently empty */
    gdl = td.getTriggerDescriptorList();

    /*
    ** Synchronize the building of the TDL.  The TDL itself is created
    ** empty when the TD is created, so there is no need to synchronize
    ** the getting of the TDL.
    */
    synchronized(gdl)
    {
      if (!gdl.getScanned())
      {
        getTriggerDescriptorsScan(td, false);
      }
    }

View Full Code Here

   * @exception StandardException    Thrown on failure
   */
   private void getTriggerDescriptorsScan(TableDescriptor td, boolean forUpdate)
      throws StandardException
  {
    GenericDescriptorList    gdl = (td).getTriggerDescriptorList();
    DataValueDescriptor    tableIDOrderable = null;
    TabInfo          ti = getNonCoreTI(SYSTRIGGERS_CATALOG_NUM);

    /* Use tableIDOrderable in both start and stop positions for scan */
    tableIDOrderable = getValueAsDVD(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,
          forUpdate);
    gdl.setScanned(true);
  }
View Full Code Here

    /* Get an exclusive table lock on the table. */
    long heapId = td.getHeapConglomerateId();
    lockTableForDDL(tc, heapId, true);

    /* Drop the triggers */
    GenericDescriptorList tdl = dd.getTriggerDescriptors(td);
    Enumeration descs = tdl.elements();
    while (descs.hasMoreElements())
    {
      TriggerDescriptor trd = (TriggerDescriptor) descs.nextElement();
            trd.drop(lcc);
    }
View Full Code Here

    )
    throws StandardException
  {
    if ( relevantTriggers !=  null ) { return relevantTriggers; }

    relevantTriggers =  new GenericDescriptorList();

    if(!includeTriggers)
      return relevantTriggers;

    td.getAllRelevantTriggers( statementType, changedColumnIds, relevantTriggers );
View Full Code Here

      DefaultDescriptor defaultDesc = columnDescriptor.getDefaultDescriptor(dd);
      dm.clearDependencies(lcc, defaultDesc);
    }

    // need to deal with triggers if has referencedColumns
    GenericDescriptorList tdl = dd.getTriggerDescriptors(td);
    Enumeration descs = tdl.elements();
    while (descs.hasMoreElements())
    {
      TriggerDescriptor trd = (TriggerDescriptor) descs.nextElement();
      int[] referencedCols = trd.getReferencedCols();
      if (referencedCols == null)
View Full Code Here

        }
      }
    }

    //truncate is not allowed when there are enabled DELETE triggers
    GenericDescriptorList tdl = dd.getTriggerDescriptors(td);
    Enumeration descs = tdl.elements();
    while (descs.hasMoreElements())
    {
      TriggerDescriptor trd = (TriggerDescriptor) descs.nextElement();
      if (trd.listensForEvent(TriggerDescriptor.TRIGGER_EVENT_DELETE) &&
        trd.isEnabled())
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.sql.dictionary.GenericDescriptorList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.