Package org.apache.derby.catalog

Examples of org.apache.derby.catalog.UUID


    SchemaDescriptor sd = (schema == null) ?
        getSystemSchemaDescriptor()
        : schema;

    UUID schemaUUID = sd.getUUID();
   
    if (SchemaDescriptor.STD_SYSTEM_DIAG_SCHEMA_NAME.equals(
        sd.getSchemaName()))
    {
      TableDescriptor td =
        new TableDescriptor(this, tableName, sd,
            TableDescriptor.VTI_TYPE,
            TableDescriptor.DEFAULT_LOCK_GRANULARITY);
     
      // ensure a vti class exists
      if (getVTIClass(td, false) != null)
        return td;
     
      // otherwise just standard search
    }
       
    TableKey tableKey =   new TableKey(schemaUUID, tableName);

    /* Only use the cache if we're in compile-only mode */
    if (getCacheMode() == DataDictionary.COMPILE_ONLY_MODE)
    {
      NameTDCacheable cacheEntry = (NameTDCacheable) nameTdCache.find(tableKey);
      if (cacheEntry != null)
      {
        retval = cacheEntry.getTableDescriptor();
        // bind in previous command might have set refernced cols
        retval.setReferencedColumnMap(null);
        nameTdCache.release(cacheEntry);
      }
      return retval;
    }

    return getTableDescriptorIndex1Scan(tableName, schemaUUID.toString());

  }
View Full Code Here


             (TupleDescriptor) null,
             (List) null,
             true,
             TransactionController.ISOLATION_REPEATABLE_READ,
             tc);
        UUID                 aliasID = oldAD.getUUID();

        //
        // Now delete the permissions tuple which has a null grantor
        //
    TabInfoImpl          rpTI = getNonCoreTI(SYSROUTINEPERMS_CATALOG_NUM);
    ExecIndexRow         rpKeyRow = exFactory.getIndexableRow(3);

    rpKeyRow.setColumn(1, new SQLVarchar( "PUBLIC" ));
    rpKeyRow.setColumn(2, new SQLChar( aliasID.toString() ));
    rpKeyRow.setColumn(3, new SQLVarchar( (String) null ) );

    int deleteCount = rpTI.deleteRow(tc, rpKeyRow, SYSROUTINEPERMSRowFactory.GRANTEE_ALIAS_GRANTOR_INDEX_NUM);
    }
View Full Code Here

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

  public SPSDescriptor getSPSDescriptor(String stmtName, SchemaDescriptor sd)
    throws StandardException
  {
    SPSDescriptor    sps = null;
    TableKey      stmtKey;
    UUID        schemaUUID;

    /*
    ** If we didn't get a schema descriptor, we had better
    ** have a system table.
    */
    if (SanityManager.DEBUG)
    {
      if (sd == null)
      {
        SanityManager.THROWASSERT("null schema for statement "+stmtName)
      }
    }

    schemaUUID = sd.getUUID();

    /* Only use the cache if we're in compile-only mode */
    if ((spsNameCache != null) &&
      (getCacheMode() == DataDictionary.COMPILE_ONLY_MODE))
    {
        stmtKey = new TableKey(schemaUUID, stmtName);
      SPSNameCacheable cacheEntry = (SPSNameCacheable) spsNameCache.find(stmtKey);
      if (cacheEntry != null)
      {
        sps = cacheEntry.getSPSDescriptor();
        spsNameCache.release(cacheEntry);
      }
      //System.out.println("found in cache " + stmtName);
      //System.out.println("stmt text " + sps.getText());
      return sps;
    }

    return getSPSDescriptorIndex1Scan(stmtName, schemaUUID.toString());
  }
View Full Code Here

    List sdl = getStatistics();

    if (cd == null)
      return (sdl.size() > 0);

    UUID cdUUID = cd.getUUID();

    for (Iterator li = sdl.iterator(); li.hasNext(); )
    {
      StatisticsDescriptor statDesc = (StatisticsDescriptor) li.next();
      if (cdUUID.equals(statDesc.getReferenceID()))
        return true;

    }

    return false;
View Full Code Here

          selectivity *= 0.1;
        return selectivity;
      }
    }
   
    UUID referenceUUID = cd.getUUID();

    List sdl = getStatistics();
    for (Iterator li = sdl.iterator(); li.hasNext(); )
    {
      StatisticsDescriptor statDesc = (StatisticsDescriptor) li.next();

      if (!referenceUUID.equals(statDesc.getReferenceID()))
        continue;
     
      if (statDesc.getColumnCount() != numKeys)
        continue;
     
View Full Code Here

    LanguageConnectionContext lcc = activation.getLanguageConnectionContext();
    DataDictionary dd = lcc.getDataDictionary();
    String currentUser = lcc.getAuthorizationId();
    TransactionController tc = lcc.getTransactionExecute();
        SchemaDescriptor sd = _tupleDescriptor.getSchemaDescriptor();
        UUID objectID = _tupleDescriptor.getUUID();
        String objectTypeName = _tupleDescriptor.getObjectTypeName();

    // Check that the current user has permission to grant the privileges.
    checkOwnership( currentUser, (TupleDescriptor) _tupleDescriptor, sd, dd );
   
View Full Code Here

            td.getHeapConglomerateId(),
            colNumber,
            storableDV,
            columnInfo[ix].dataType.getCollationType());

    UUID defaultUUID = columnInfo[ix].newDefaultUUID;

    /* Generate a UUID for the default, if one exists
     * and there is no default id yet.
     */
    if (columnInfo[ix].defaultInfo != null &&
View Full Code Here

   
      // Drop any dependencies
      dm.clearDependencies(lcc, defaultDescriptor);
    }

    UUID defaultUUID = columnInfo[ix].newDefaultUUID;

    /* Generate a UUID for the default, if one exists
     * and there is no default id yet.
     */
    if (columnInfo[ix].defaultInfo != null &&
View Full Code Here

      {
        continue;
      }

      TableDescriptor  pktd = refcd.getTableDescriptor();
      UUID pkuuid = refcd.getIndexId();
      ConglomerateDescriptor pkIndexConglom = pktd.getConglomerateDescriptor(pkuuid);

      TableDescriptor refTd = cd.getTableDescriptor();
      fkVector.addElement(new FKInfo(
                  fkNames,              // foreign key names
View Full Code Here

TOP

Related Classes of org.apache.derby.catalog.UUID

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.