Examples of Dependent


Examples of javax.enterprise.context.Dependent

      private String createDemarshallerIfNeeded(MetaClass type) {
        return addArrayMarshaller(type);
      }
    });

    classStructureBuilder.getClassDefinition().addAnnotation(new Dependent() {
      @Override
      public Class<? extends Annotation> annotationType() {
        return Dependent.class;
      }
    });
View Full Code Here

Examples of javax.enterprise.context.Dependent

      private String createDemarshallerIfNeeded(final MetaClass type) {
        return addArrayMarshaller(type.asBoxed());
      }
    });

    classStructureBuilder.getClassDefinition().addAnnotation(new Dependent() {
      @Override
      public Class<? extends Annotation> annotationType() {
        return Dependent.class;
      }
    });
View Full Code Here

Examples of javax.enterprise.context.Dependent

      private String createDemarshallerIfNeeded(final MetaClass type) {
        return addArrayMarshaller(type);
      }
    });

    classStructureBuilder.getClassDefinition().addAnnotation(new Dependent() {
      @Override
      public Class<? extends Annotation> annotationType() {
        return Dependent.class;
      }
    });
View Full Code Here

Examples of javax.enterprise.context.Dependent

      private String createDemarshallerIfNeeded(final MetaClass type) {
        return addArrayMarshaller(type.asBoxed());
      }
    });

    classStructureBuilder.getClassDefinition().addAnnotation(new Dependent() {
      @Override
      public Class<? extends Annotation> annotationType() {
        return Dependent.class;
      }
    });
View Full Code Here

Examples of javax.enterprise.context.Dependent

      private String createDemarshallerIfNeeded(final MetaClass type) {
        return addArrayMarshaller(type);
      }
    });

    classStructureBuilder.getClassDefinition().addAnnotation(new Dependent() {
      @Override
      public Class<? extends Annotation> annotationType() {
        return Dependent.class;
      }
    });
View Full Code Here

Examples of javax.enterprise.context.Dependent

      private String createDemarshallerIfNeeded(MetaClass type) {
        return addArrayMarshaller(type);
      }
    });

    classStructureBuilder.getClassDefinition().addAnnotation(new Dependent() {
      @Override
      public Class<? extends Annotation> annotationType() {
        return Dependent.class;
      }
    });
View Full Code Here

Examples of javax.enterprise.context.Dependent

                .finish()
                .finish();
          }
        });

    classStructureBuilder.getClassDefinition().addAnnotation(new Dependent() {
      @Override
      public Class<? extends Annotation> annotationType() {
        return Dependent.class;
      }
    });
View Full Code Here

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

      {
        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)
            {
              ViewDescriptor vd = (ViewDescriptor) dep;
              SchemaDescriptor compSchema;
              compSchema = dd.getSchemaDescriptor(vd.getCompSchemaId(), null);
              CompilerContext newCC = lcc.pushCompilerContext(compSchema);
              Parser  pa = newCC.getParser();

              // Since this is always nested inside another SQL
              // statement, so topLevel flag should be false
              CreateViewNode cvn = (CreateViewNode)pa.parseStatement(
                        vd.getViewText());

              // need a current dependent for bind
              newCC.setCurrentDependent(dep);
              cvn.bindStatement();
              ProviderInfo[] providerInfos = cvn.getProviderInfo();
              lcc.popCompilerContext(newCC);

              boolean    interferent = false;
              for (int i = 0; i < providerInfos.length; i++)
              {
                Provider provider = null;
                  provider = (Provider) providerInfos[i].
                          getDependableFinder().
                          getDependable(dd,
                          providerInfos[i].getObjectId());
                if (provider instanceof TableDescriptor)
                {
                  TableDescriptor tab = (TableDescriptor)provider;
                  FormatableBitSet colMap = tab.getReferencedColumnMap();
                  if (colMap == null)
                    continue;
                  // if later on an error is raised such as in
                  // case of interference, this dependency line
                  // upgrade will not happen due to rollback
                  tab.setReferencedColumnMap(null);
                  dropDependency(lcc, vd, tab);
                  tab.setReferencedColumnMap(colMap);
                  addDependency(vd, tab, lcc.getContextManager());

                  if (tab.getObjectID().equals(td.getObjectID()))
                  {
                    System.arraycopy(affectedCols.getByteArray(), 0,
                      subsetCols.getByteArray(), 0,
                      affectedCols.getLengthInBytes());
                    subsetCols.and(colMap);
                    if (subsetCols.anySetBit() != -1)
                    {
                      interferent = true;
                      ((TableDescriptor) p).setReferencedColumnMap(subsetCols);
                    }
                  }
                }  // if provider instanceof TableDescriptor
              // for providerInfos
              if (! interferent)
                continue;
            // if dep instanceof ViewDescriptor
            else
              ((TableDescriptor) p).setReferencedColumnMap(null);
          // if providingCols == null
          else
          {
            System.arraycopy(affectedCols.getByteArray(), 0, subsetCols.getByteArray(), 0, affectedCols.getLengthInBytes());
            subsetCols.and(providingCols);
            if (subsetCols.anySetBit() == -1)
              continue;
            ((TableDescriptor) p).setReferencedColumnMap(subsetCols);
          }
        }

        // generate a list of invalidations that fail.
        try {
          dep.prepareToInvalidate(p, action, lcc);
        } catch (StandardException sqle) {

          if (noInvalidate == null) {
            noInvalidate = sqle;
          } else {
            try {
              sqle.initCause(noInvalidate);
              noInvalidate = sqle;
            } catch (IllegalStateException ise) {
              // We weren't able to chain the exceptions. That's
              // OK, since we always have the first exception we
              // caught. Just skip the current exception.
            }
          }
        }
        if (noInvalidate == null) {

          if (affectedCols != null)
            ((TableDescriptor) p).setReferencedColumnMap(affectedCols);

          // REVISIT: future impl will want to mark the individual
          // dependency as invalid as well as the dependent...
          dep.makeInvalid(action, lcc);
        }
      }

      if (noInvalidate != null)
        throw noInvalidate;
View Full Code Here

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

       * so that the call gets an enumerations of Dependencys.
       */
      for (ListIterator depsIterator = storedList.listIterator();
         depsIterator.hasNext(); )
      {
        Dependent       tempD;
        Provider        tempP;
        DependableFinder  finder = null;

        DependencyDescriptor depDesc = (DependencyDescriptor) depsIterator.next();

View Full Code Here

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

      {
        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)
            {
              ViewDescriptor vd = (ViewDescriptor) dep;
              DataDictionary dd = getDataDictionary();
              SchemaDescriptor compSchema;
              compSchema = dd.getSchemaDescriptor(vd.getCompSchemaId(), null);
              CompilerContext newCC = lcc.pushCompilerContext(compSchema);
              Parser  pa = newCC.getParser();
              LanguageConnectionFactory  lcf = lcc.getLanguageConnectionFactory();

              // Since this is always nested inside another SQL
              // statement, so topLevel flag should be false
              CreateViewNode cvn = (CreateViewNode)pa.parseStatement(
                        vd.getViewText());

              // need a current dependent for bind
              newCC.setCurrentDependent(dep);
              cvn = (CreateViewNode) cvn.bind();
              ProviderInfo[] providerInfos = cvn.getProviderInfo();
              lcc.popCompilerContext(newCC);

              boolean    interferent = false;
              for (int i = 0; i < providerInfos.length; i++)
              {
                Provider provider = null;
                try
                {
                  provider = (Provider) providerInfos[i].
                          getDependableFinder().
                          getDependable(
                          providerInfos[i].getObjectId());
                }
                catch(java.sql.SQLException te)
                {
                  if (SanityManager.DEBUG)
                  {
                    SanityManager.THROWASSERT("unexpected java.sql.SQLException - " + te);
                  }
                }
                if (provider instanceof TableDescriptor)
                {
                  TableDescriptor tab = (TableDescriptor)provider;
                  FormatableBitSet colMap = tab.getReferencedColumnMap();
                  if (colMap == null)
                    continue;
                  // if later on an error is raised such as in
                  // case of interference, this dependency line
                  // upgrade will not happen due to rollback
                  tab.setReferencedColumnMap(null);
                  dropDependency(lcc, vd, tab);
                  tab.setReferencedColumnMap(colMap);
                  addDependency(vd, tab, lcc.getContextManager());

                  if (tab.getObjectID().equals(td.getObjectID()))
                  {
                    System.arraycopy(affectedCols.getByteArray(), 0,
                      subsetCols.getByteArray(), 0,
                      affectedCols.getLengthInBytes());
                    subsetCols.and(colMap);
                    if (subsetCols.anySetBit() != -1)
                    {
                      interferent = true;
                      ((TableDescriptor) p).setReferencedColumnMap(subsetCols);
                    }
                  }
                }  // if provider instanceof TableDescriptor
              // for providerInfos
              if (! interferent)
                continue;
            // if dep instanceof ViewDescriptor
            else
              ((TableDescriptor) p).setReferencedColumnMap(null);
          // if providingCols == null
          else
          {
            System.arraycopy(affectedCols.getByteArray(), 0, subsetCols.getByteArray(), 0, affectedCols.getLengthInBytes());
            subsetCols.and(providingCols);
            if (subsetCols.anySetBit() == -1)
              continue;
            ((TableDescriptor) p).setReferencedColumnMap(subsetCols);
          }
        }

        // generate a list of invalidations that fail.
        try {
          dep.prepareToInvalidate(p, action, lcc);
        } catch (StandardException sqle) {

          if (noInvalidate != null)
            sqle.setNestedException(noInvalidate);

          noInvalidate = sqle;
        }
        if (noInvalidate == null) {

          if (affectedCols != null)
            ((TableDescriptor) p).setReferencedColumnMap(affectedCols);

          // REVISIT: future impl will want to mark the individual
          // dependency as invalid as well as the dependent...
          dep.makeInvalid(action, lcc);
        }
      }

      if (noInvalidate != null)
        throw noInvalidate;
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.