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

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


      /*
      ** Now that we got rid of the fks (if we were cascading), it is
      ** ok to do an invalidate for.
      */
      dm.invalidateFor(cd, DependencyManager.DROP_CONSTRAINT, lcc);
      dm.clearDependencies(lcc, cd);
    }
  }

}
View Full Code Here


    /* invalidate all SPS's on the table-- bad plan on SPS, so user drops
     * statistics and would want SPS's invalidated so that recompile would
     * give good plans; thats the theory anyways....
     */
    dm.invalidateFor(td, DependencyManager.DROP_STATISTICS, lcc);

    dd.dropStatisticsDescriptors(td.getUUID(), ((cd != null) ? cd.getUUID() :
                   null), tc);
  }
 
View Full Code Here

      case AliasInfo.ALIAS_TYPE_SYNONYM_AS_CHAR:
        invalidationType = DependencyManager.DROP_SYNONYM;
        break;
    }

    dm.invalidateFor(ad, invalidationType, lcc);

    if (ad.getAliasType() == AliasInfo.ALIAS_TYPE_SYNONYM_AS_CHAR)
    {
      // Drop the entry from SYSTABLES as well.
      DataDescriptorGenerator ddg = dd.getDataDescriptorGenerator();
View Full Code Here

        ** the invalidation on the underlying table rather than
        ** the constraint we are enabling.  This is because
        ** stmts that were compiled against a disabled constraint
        ** have no depedency on that disabled constriant.
        */
        dm.invalidateFor(cd.getTableDescriptor(),
                  DependencyManager.SET_CONSTRAINTS_ENABLE, lcc);
        cd.setEnabled();
        dd.updateConstraintDescriptor(cd,
                      cd.getUUID(),
                      enabledCol,
View Full Code Here

        for (int inner = 0; inner < fkcdlSize; inner++)
        {
          fkcd = (ForeignKeyConstraintDescriptor) fkcdl.elementAt(inner)
          if (enable && !fkcd.isEnabled())
          {
            dm.invalidateFor(fkcd.getTableDescriptor(),
                  DependencyManager.SET_CONSTRAINTS_ENABLE, lcc);
            validateFKConstraint(fkcd, dd, tc, lcc.getContextManager());
            fkcd.setEnabled();
            dd.updateConstraintDescriptor(fkcd,
                fkcd.getUUID(),
View Full Code Here

                enabledCol,
                tc);
          }
          else if (!enable && fkcd.isEnabled())
          {
            dm.invalidateFor(fkcd, DependencyManager.SET_CONSTRAINTS_DISABLE,
                     lcc);
            fkcd.setDisabled();
            dd.updateConstraintDescriptor(fkcd,
                fkcd.getUUID(),
                enabledCol,
View Full Code Here

        }
      }
 
      if (!enable && cd.isEnabled())
      {
        dm.invalidateFor(cd, DependencyManager.SET_CONSTRAINTS_DISABLE,
                 lcc);
        cd.setDisabled();
        dd.updateConstraintDescriptor(cd,
                        cd.getUUID(),
                        enabledCol,
View Full Code Here

      try {
        TempTableInfo tempTableInfo = (TempTableInfo)allDeclaredGlobalTempTables.get(i);
        TableDescriptor td = tempTableInfo.getTableDescriptor();
        //the following 2 lines of code has been copied from DropTableConstantAction. If there are any changes made there in future,
        //we should check if they need to be made here too.
        dm.invalidateFor(td, DependencyManager.DROP_TABLE, this);
        tran.dropConglomerate(td.getHeapConglomerateId());
      } catch (StandardException e) {
        if (topLevelStandardException == null) {
          // always keep the first exception unchanged
          topLevelStandardException = e;
View Full Code Here

    try {
   
      notifyLoader(false);
      dd.invalidateAllSPSPlans();
      DependencyManager dm = dd.getDependencyManager();
      dm.invalidateFor(fid, DependencyManager.DROP_JAR, lcc);

      dd.dropFileInfoDescriptor(fid);

      fr.remove(JarUtil.mkExternalName(schemaName, sqlName, fr.getSeparatorChar()),
        fid.getGenerationId());
View Full Code Here

      throw StandardException.newException(
        SQLState.LANG_TABLE_NOT_FOUND_DURING_EXECUTION, tableName);
    }

    if (truncateTable)
      dm.invalidateFor(td, DependencyManager.TRUNCATE_TABLE, lcc);
    else
      dm.invalidateFor(td, DependencyManager.ALTER_TABLE, lcc);

    // Save the TableDescriptor off in the Activation
    activation.setDDLTableDescriptor(td);
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.