Examples of ViewDescriptor


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

    /* Resolve the view, if this is a view */
        if (tabDescr.getTableType() == TableDescriptor.VIEW_TYPE)
    {
      FromSubquery                fsq;
      ResultSetNode        rsn;
      ViewDescriptor        vd;
      CreateViewNode        cvn;
      SchemaDescriptor      compSchema;

      /* Get the associated ViewDescriptor so that we can get
       * the view definition text.
       */
            vd = dataDictionary.getViewDescriptor(tabDescr);

      /*
      ** Set the default compilation schema to be whatever
      ** this schema this view was originally compiled against.
      ** That way we pick up the same tables no matter what
      ** schema we are running against.
      */
      compSchema = dataDictionary.getSchemaDescriptor(vd.getCompSchemaId(), null);

      compilerContext.pushCompilationSchema(compSchema);
 
      try
      {
   
        /* This represents a view - query is dependent on the ViewDescriptor */
        compilerContext.createDependency(vd);
 
        cvn = (CreateViewNode)
                  parseStatement(vd.getViewText(), false);

        rsn = cvn.getParsedQueryExpression();

        /* If the view contains a '*' then we mark the views derived column list
         * so that the view will still work, and return the expected results,
View Full Code Here

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

   * @exception StandardException    Thrown on error
   */
  private ViewDescriptor getViewDescriptorScan(TableDescriptor tdi)
    throws StandardException
  {
    ViewDescriptor      vd;
    DataValueDescriptor    viewIdOrderable;
    TabInfoImpl          ti = getNonCoreTI(SYSVIEWS_CATALOG_NUM);
    UUID          viewID = tdi.getUUID();

    /* Use viewIdOrderable in both start
     * and stop position for scan.
     */
    viewIdOrderable = getIDValueAsCHAR(viewID);

    /* Set up the start/stop position for the scan */
    ExecIndexRow keyRow = exFactory.getIndexableRow(1);
    keyRow.setColumn(1, viewIdOrderable);

    vd = (ViewDescriptor)
          getDescriptorViaIndex(
            SYSVIEWSRowFactory.SYSVIEWS_INDEX1_ID,
            keyRow,
            (ScanQualifier [][]) null,
            ti,
            (TupleDescriptor) null,
            (List) null,
            false);

    if (vd != null)
    {
      vd.setViewName(tdi.getName());
    }
    return vd;
  }
View Full Code Here

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

    /* Resolve the view, if this is a view */
    if (tableDescriptor.getTableType() == TableDescriptor.VIEW_TYPE)
    {
      FromSubquery                fsq;
      ResultSetNode        rsn;
      ViewDescriptor        vd;
      CreateViewNode        cvn;
      SchemaDescriptor      compSchema;

      /* Get the associated ViewDescriptor so that we can get
       * the view definition text.
       */
      vd = dataDictionary.getViewDescriptor(tableDescriptor);

      /*
      ** Set the default compilation schema to be whatever
      ** this schema this view was originally compiled against.
      ** That way we pick up the same tables no matter what
      ** schema we are running against.
      */
      compSchema = dataDictionary.getSchemaDescriptor(vd.getCompSchemaId(), null);

      compilerContext.pushCompilationSchema(compSchema);
 
      try
      {
   
        /* This represents a view - query is dependent on the ViewDescriptor */
        compilerContext.createDependency(vd);
 
        if (SanityManager.DEBUG)
        {
          SanityManager.ASSERT(vd != null,
            "vd not expected to be null for " + tableName);
        }

        cvn = (CreateViewNode)
                  parseStatement(vd.getViewText(), false);

        rsn = cvn.getParsedQueryExpression();

        /* If the view contains a '*' then we mark the views derived column list
         * so that the view will still work, and return the expected results,
View Full Code Here

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

          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();
View Full Code Here

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

   * @exception StandardException    Thrown on error
   */
  private ViewDescriptor getViewDescriptorScan(TableDescriptor tdi)
    throws StandardException
  {
    ViewDescriptor      vd;
    DataValueDescriptor    viewIdOrderable;
    TabInfoImpl          ti = getNonCoreTI(SYSVIEWS_CATALOG_NUM);
    UUID          viewID = tdi.getUUID();

    /* Use viewIdOrderable in both start
     * and stop position for scan.
     */
    viewIdOrderable = getIDValueAsCHAR(viewID);

    /* Set up the start/stop position for the scan */
    ExecIndexRow keyRow = exFactory.getIndexableRow(1);
    keyRow.setColumn(1, viewIdOrderable);

    vd = (ViewDescriptor)
          getDescriptorViaIndex(
            SYSVIEWSRowFactory.SYSVIEWS_INDEX1_ID,
            keyRow,
            (ScanQualifier [][]) null,
            ti,
            (TupleDescriptor) null,
            (List) null,
            false);

    if (vd != null)
    {
      vd.setViewName(tdi.getName());
    }
    return vd;
  }
View Full Code Here

Examples of org.eclipse.ui.internal.registry.ViewDescriptor

  public ViewReference(ViewFactory factory, String id, String secondaryId,
      IMemento memento) {
    super();
    this.memento = memento;
    this.factory = factory;
    ViewDescriptor desc = (ViewDescriptor) this.factory.viewReg.find(id);
    ImageDescriptor iDesc = null;
    String title = null;
    if (desc != null) {
      iDesc = desc.getImageDescriptor();
      title = desc.getLabel();
    }

    String name = null;

    if (memento != null) {
View Full Code Here

Examples of org.springframework.richclient.application.ViewDescriptor

        ViewDescriptorRegistry viewDescriptorRegistry = (ViewDescriptorRegistry)
                ApplicationServicesLocator.services().getService(ViewDescriptorRegistry.class);

        ViewDescriptor[] views = viewDescriptorRegistry.getViewDescriptors();
        for (int i = 0; i < views.length; i++) {
            ViewDescriptor view = views[i];
            view.createShowViewCommand(getApplicationWindow()).execute();
        }
    }
View Full Code Here

Examples of org.springframework.richclient.application.ViewDescriptor

    public void openAllViews() {
        ViewDescriptorRegistry viewDescriptorRegistry = (ViewDescriptorRegistry) ApplicationServicesLocator.services().getService(ViewDescriptorRegistry.class);

        ViewDescriptor[] views = viewDescriptorRegistry.getViewDescriptors();
        for (int i = 0; i < views.length; i++) {
            ViewDescriptor view = views[i];
            if (dataViews.contains(view.getId()))
                view.createShowViewCommand(getApplicationWindow()).execute();
        }
//        new OpenAllViews(getApplicationWindow()).doExecuteCommand();
    }
View Full Code Here

Examples of org.springframework.richclient.application.ViewDescriptor

    private void populate() {
        ViewDescriptorRegistry viewDescriptorRegistry = (ViewDescriptorRegistry) ApplicationServicesLocator.services().getService(
                ViewDescriptorRegistry.class);
        ViewDescriptor[] views = viewDescriptorRegistry.getViewDescriptors();
        for (int i = 0; i < views.length; i++) {
            ViewDescriptor view = views[i];
            if(view instanceof JideViewDescriptor){
              JideViewDescriptor dockingView = (JideViewDescriptor)view;
              if(!dockingView.isWorkspace()){
                addInternal(view.createShowViewCommand(window));
              }
            }
            else{
              addInternal(view.createShowViewCommand(window));
            }
        }
    }
View Full Code Here

Examples of org.springframework.richclient.application.ViewDescriptor

  /**
   * Compares the display names of the view descriptors
   */
  public int compareTo(Object o) {
    ViewDescriptor castObj = (ViewDescriptor)o;
    return this.getDisplayName().compareToIgnoreCase(castObj.getDisplayName());
  }
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.