Package org.apache.derby.iapi.sql.depend

Examples of org.apache.derby.iapi.sql.depend.DependencyManager.invalidateFor()


    // invalidate any prepared statements that
    // depended on this table (including this one)
    DependencyManager dm = dd.getDependencyManager();

    dm.invalidateFor(td, DependencyManager.BULK_INSERT, lcc);

   
    // Update all indexes
    if (constants.irgs.length > 0)
    {
View Full Code Here


    boolean cascadeOnRefKey = (cascade &&
            conDesc instanceof ReferencedKeyConstraintDescriptor);
    if (!cascadeOnRefKey)
    {
      dm.invalidateFor(conDesc, DependencyManager.DROP_CONSTRAINT, lcc);
    }

    /*
    ** If we had a primary/unique key and it is drop cascade, 
    ** drop all the referencing keys now.  We MUST do this AFTER
View Full Code Here

      int cdlSize = cdl.size();

      for(int index = 0; index < cdlSize; index++)
      {
        fkcd = (ForeignKeyConstraintDescriptor) cdl.elementAt(index);
        dm.invalidateFor(fkcd, DependencyManager.DROP_CONSTRAINT, lcc);
        fkcd.drop(lcc, true);
      }
 
      /*
      ** We told dropConstraintAndIndex not to
View Full Code Here

      /*
      ** We told dropConstraintAndIndex not to
      ** remove our dependencies, so send an invalidate,
      ** and drop the dependencies.
      */
      dm.invalidateFor(conDesc, DependencyManager.DROP_CONSTRAINT, lcc);
      dm.clearDependencies(lcc, conDesc);
    }
  }
}
View Full Code Here

    // invalidate any prepared statements that
    // depended on this table (including this one)
    if (! forCreateTable)
    {
      dm.invalidateFor(td, DependencyManager.CREATE_INDEX, lcc);
    }

    // Translate the base column names to column positions
    baseColumnPositions = new int[columnNames.length];
    for (int i = 0; i < columnNames.length; i++)
View Full Code Here

    LanguageConnectionContext lcc = activation.getLanguageConnectionContext();
    DataDictionary dd = lcc.getDataDictionary();
    DependencyManager dm = dd.getDependencyManager();
    TransactionController tc = lcc.getTransactionExecute();
    dm.invalidateFor(td, DependencyManager.RENAME, lcc);

    /* look for foreign key dependency on the table. If found any,
    use dependency manager to pass the rename action to the
    dependents. */
    constraintDescriptorList = dd.getConstraintDescriptors(td);
View Full Code Here

    constraintDescriptorList = dd.getConstraintDescriptors(td);
    for(int index=0; index<constraintDescriptorList.size(); index++)
    {
      constraintDescriptor = constraintDescriptorList.elementAt(index);
      if (constraintDescriptor instanceof ReferencedKeyConstraintDescriptor)
        dm.invalidateFor(constraintDescriptor, DependencyManager.RENAME, lcc);
    }

    // Drop the table
    dd.dropTableDescriptor(td, sd, tc);
    // Change the table name of the table descriptor
View Full Code Here

    columnPosition = columnDescriptor.getPosition();
    FormatableBitSet toRename = new FormatableBitSet(td.getColumnDescriptorList().size() + 1);
    toRename.set(columnPosition);
    td.setReferencedColumnMap(toRename);
   
    dm.invalidateFor(td, DependencyManager.RENAME, lcc);

    //look for foreign key dependency on the column.
    constraintDescriptorList = dd.getConstraintDescriptors(td);
    for(int index=0; index<constraintDescriptorList.size(); index++)
    {
View Full Code Here

      int numRefCols = referencedColumns.length;
      for (int j = 0; j < numRefCols; j++)
      {
        if ((referencedColumns[j] == columnPosition) &&
          (constraintDescriptor instanceof ReferencedKeyConstraintDescriptor))
          dm.invalidateFor(constraintDescriptor, DependencyManager.RENAME, lcc);
      }
    }

    // Drop the column
    dd.dropColumnDescriptor(td.getUUID(), oldObjectName, tc);
View Full Code Here

    LanguageConnectionContext lcc = activation.getLanguageConnectionContext();
    DataDictionary dd = lcc.getDataDictionary();
    DependencyManager dm = dd.getDependencyManager();
    TransactionController tc = lcc.getTransactionExecute();
    //for indexes, we only invalidate sps, rest we ignore(ie views)
    dm.invalidateFor(td, DependencyManager.RENAME_INDEX, lcc);

    ConglomerateDescriptor conglomerateDescriptor =
      dd.getConglomerateDescriptor(oldObjectName, sd, true);

    if (conglomerateDescriptor == null)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.