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

Examples of org.apache.derby.iapi.sql.depend.Dependency


    {
      DependencyManager dmgr = lcc.getDataDictionary().getDependencyManager();

      for (Iterator iterator = dependencies.iterator(); iterator.hasNext(); )
      {
        Dependency dy = (Dependency) iterator.next();
        dmgr.clearInMemoryDependency(dy);
      }

      dependencies = null;
    }
View Full Code Here


  private void addDependency(Dependent d, Provider p, ContextManager cm,
      TransactionController tc) throws StandardException {

    synchronized(this)
    {
      Dependency dy = new BasicDependency(d, p);

      /* Dependencies are either in-memory or stored, but not both */
      if (! d.isPersistent() || ! p.isPersistent())
      {
        /* Duplicate dependencies are not added to the lists.
View Full Code Here

      // entries from this list.
      for (int ei = list.size() - 1; ei >= 0; ei--)
      {
        if (ei >= list.size())
          continue;
        Dependency dependency = (Dependency) list.get(ei);

        Dependent dep = dependency.getDependent();

        if (affectedCols != null)
        {
          TableDescriptor td = (TableDescriptor) dependency.getProvider();
          FormatableBitSet providingCols = td.getReferencedColumnMap();
          if (providingCols == null)
          {
            if (dep instanceof ViewDescriptor)
            {
View Full Code Here

      // go through the list notifying providers to remove
      // the dependency from their lists
      for (ListIterator depsIterator = deps.listIterator();
        depsIterator.hasNext(); ) {

        Dependency dy = (Dependency)depsIterator.next();
        clearProviderDependency(dy.getProviderKey(), dy);
      }

      dependents.remove(d.getObjectID());
    }
  }
View Full Code Here

    java.util.ArrayList pih = new java.util.ArrayList();

    for (ListIterator depsIterator = list.listIterator();
          depsIterator.hasNext(); )
    {
      Dependency dep = (Dependency) depsIterator.next();

      if (dep.getProvider().isPersistent())
      {
        pih.add(new BasicProviderInfo(
                  dep.getProvider().getObjectID(),
                  dep.getProvider().getDependableFinder(),
                  dep.getProvider().getObjectName()
                  ));
      }
    }

View Full Code Here

          List depsSList = (List) dependents.get(depKeys[i]);

          for (ListIterator depsIterator = depsSList.listIterator();
             depsIterator.hasNext(); )
          {
            Dependency dy = (Dependency)depsIterator.next();

            if (! foundInMemory)
            {
              debugBuf.append("In Memory Dependencies:\n");
              foundInMemory = true;
            }

            debugBuf.append(dy.getDependent().toString() +
                    ", type " +
                    dy.getDependent().getClassType() +
                    ", " +
                    " is dependent on " +
                    dy.getProvider().getObjectName() +
                    ", type " +
                    dy.getProvider().getClassType() +
                    "\n");
          }
        }

        /* Record the in memory dependencies */
        Enumeration provs = providers.keys();
        UUID[]    provKeys = new UUID[providers.size()];
        for (int i = 0; provs.hasMoreElements(); i++)
        {
          /*
          ** Get all the keys and sort them, so that they will always
          ** be printed in the same order (we have tests that canonize
          ** the order of printing the dependencies, and since the key
          ** is a UUID, the order they are returned from
          ** hasMoreElements() changes from run to run).
          */
          provKeys[i] = (UUID) provs.nextElement();
        }

        /* Do a bubble sort - there aren't likely to be many elements */
        bubbleSort(provKeys);

        /* Iterate through the sorted keys */
        for (int i = 0; i < provKeys.length; i++)
        {
          List depsSList = (List) providers.get(provKeys[i]);

          for (ListIterator depsIterator = depsSList.listIterator();
            depsIterator.hasNext(); )
          {

            Dependency dy = (Dependency)depsIterator.next();

            if (! foundInMemory)
            {
              debugBuf.append("In Memory Dependencies:\n");
              foundInMemory = true;
            }

            debugBuf.append(
                    dy.getProvider().toString() +
                    ", type " +
                    dy.getProvider().getClassType() +
                    ", provides for " +
                    dy.getDependent().getObjectName() +
                    ", type " +
                    dy.getDependent().getClassType() +
                    "\n");
          }
        }
        /* Record the stored dependencies in sorted order to avoid
           ordering problems in canons. Also the dependencyDescriptor.getUUID()
View Full Code Here

      UUID  provKey = dy.getProvider().getObjectID();
      UUID  depKey = dy.getDependent().getObjectID();

      for (ListIterator depsIT = deps.listIterator();  depsIT.hasNext(); )
      {
        Dependency curDY = (Dependency)depsIT.next();
        if (curDY.getProvider().getObjectID().equals(provKey) &&
          curDY.getDependent().getObjectID().equals(depKey))
        {
          return false;
        }
      }
View Full Code Here

  private void addDependency(Dependent d, Provider p, ContextManager cm,
      TransactionController tc) throws StandardException {

    synchronized(this)
    {
      Dependency dy = new BasicDependency(d, p);

      /* Dependencies are either in-memory or stored, but not both */
      if (! d.isPersistent() || ! p.isPersistent())
      {
        /* Duplicate dependencies are not added to the lists.
View Full Code Here

      // entries from this list.
      for (int ei = list.size() - 1; ei >= 0; ei--)
      {
        if (ei >= list.size())
          continue;
        Dependency dependency = (Dependency) list.get(ei);

        Dependent dep = dependency.getDependent();

        if (affectedCols != null)
        {
          TableDescriptor td = (TableDescriptor) dependency.getProvider();
          FormatableBitSet providingCols = td.getReferencedColumnMap();
          if (providingCols == null)
          {
            if (dep instanceof ViewDescriptor)
            {
View Full Code Here

      // go through the list notifying providers to remove
      // the dependency from their lists
      for (ListIterator depsIterator = deps.listIterator();
        depsIterator.hasNext(); ) {

        Dependency dy = (Dependency)depsIterator.next();
        clearProviderDependency(dy.getProviderKey(), dy);
      }

      dependents.remove(d.getObjectID());
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.sql.depend.Dependency

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.