Package org.apache.derby.iapi.sql.dictionary

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


    DataDictionaryContext ddc =
      (DataDictionaryContext) ContextService.getContext(DataDictionaryContext.CONTEXT_ID);
    DataDictionary dd = ddc.getDataDictionary();

    SchemaDescriptor sd = dd.getSchemaDescriptor(schemaName, null, true);
    FileInfoDescriptor fid = dd.getFileInfoDescriptor(sd,sqlName);
    if (fid == null)
      throw StandardException.newException(SQLState.LANG_FILE_DOES_NOT_EXIST, sqlName,schemaName);

    long generationId = fid.getGenerationId();

    FileResource fr = af.getTransaction(ddc.getContextManager()).getFileHandler();

    String externalName = org.apache.derby.impl.sql.execute.JarDDL.mkExternalName(schemaName, sqlName, fr.getSeparatorChar());
View Full Code Here


    /* Set up the start/stop position for the scan */
    ExecIndexRow keyRow = exFactory.getIndexableRow(2);
    keyRow.setColumn(1, nameOrderable);
    keyRow.setColumn(2, schemaIDOrderable);
    FileInfoDescriptor r = (FileInfoDescriptor)
          getDescriptorViaIndex(
            SYSFILESRowFactory.SYSFILES_INDEX1_ID,
            keyRow,
            (ScanQualifier [][]) null,
            ti,
View Full Code Here

   
    ExecRow              row;

    if (td != null
    {
      FileInfoDescriptor descriptor = (FileInfoDescriptor)td;
      id_S = descriptor.getUUID().toString();
      schemaId_S = descriptor.getSchemaDescriptor().getUUID().toString();
      SQLname = descriptor.getName();
      generationId = descriptor.getGenerationId();
    }
 
    /* Build the row to insert  */
    row = getExecutionFactory().getValueRow(SYSFILES_COLUMN_COUNT);

View Full Code Here

    String  name;
    long     generationId;
    DataValueDescriptor  col;

    SchemaDescriptor  schemaDescriptor;
    FileInfoDescriptor  result;

    /* 1st column is ID (UUID - char(36)) */
    col = row.getColumn(ID_COL_NUM);
    id_S = col.getString();
    id = getUUIDFactory().recreateUUID(id_S);
View Full Code Here

    /* Set up the start/stop position for the scan */
    ExecIndexRow keyRow = exFactory.getIndexableRow(2);
    keyRow.setColumn(1, nameOrderable);
    keyRow.setColumn(2, schemaIDOrderable);
    FileInfoDescriptor r = (FileInfoDescriptor)
          getDescriptorViaIndex(
            SYSFILESRowFactory.SYSFILES_INDEX1_ID,
            keyRow,
            (ScanQualifier [][]) null,
            ti,
View Full Code Here

    {
      for (int ix=0;ix<dbcp.length;ix++)
      {
        SchemaDescriptor sd = dd.getSchemaDescriptor(dbcp[ix][IdUtil.DBCP_SCHEMA_NAME], null, false);

                FileInfoDescriptor fid = null
        if (sd != null)
          fid = dd.getFileInfoDescriptor(sd,dbcp[ix][IdUtil.DBCP_SQL_JAR_NAME]);     

        if (fid == null){
          throw StandardException.newException(SQLState.LANG_DB_CLASS_PATH_HAS_MISSING_JAR            , IdUtil.mkQualifiedName(dbcp[ix]));
View Full Code Here

  */
  public StorageFile getJarFile(String schemaName, String sqlName)
    throws StandardException {

    SchemaDescriptor sd = dd.getSchemaDescriptor(schemaName, null, true);
    FileInfoDescriptor fid = dd.getFileInfoDescriptor(sd,sqlName);
    if (fid == null)
      throw StandardException.newException(SQLState.LANG_FILE_DOES_NOT_EXIST, sqlName,schemaName);

    long generationId = fid.getGenerationId();

        ContextManager cm = ContextService.getFactory().getCurrentContextManager();
    FileResource fr = af.getTransaction(cm).getFileHandler();

        String externalName = JarUtil.mkExternalName(
            fid.getUUID(), schemaName, sqlName, fr.getSeparatorChar());

    return fr.getAsFile(externalName, generationId);
  }
View Full Code Here

    /* Set up the start/stop position for the scan */
    ExecIndexRow keyRow = exFactory.getIndexableRow(2);
    keyRow.setColumn(1, nameOrderable);
    keyRow.setColumn(2, schemaIDOrderable);
    FileInfoDescriptor r = (FileInfoDescriptor)
          getDescriptorViaIndex(
            SYSFILESRowFactory.SYSFILES_INDEX1_ID,
            keyRow,
            (ScanQualifier [][]) null,
            ti,
View Full Code Here

        try
        {
            while (scanController.fetchNext(outRow.getRowArray()))
            {
                FileInfoDescriptor fid = (FileInfoDescriptor)rf.
                    buildDescriptor(outRow, null, this);
                schemas.put(fid.getSchemaDescriptor().getSchemaName(), null);
                JarUtil.upgradeJar(tc, fid);
            }
        }
        finally
        {
View Full Code Here

  private long add(final InputStream is) throws StandardException
  {
    //
    //Like create table we say we are writing before we read the dd
    dd.startWriting(lcc);
    FileInfoDescriptor fid = getInfo();
    if (fid != null)
      throw
        StandardException.newException(SQLState.LANG_OBJECT_ALREADY_EXISTS_IN_OBJECT,
                         fid.getDescriptorType(), sqlName, fid.getSchemaDescriptor().getDescriptorType(), schemaName);

        SchemaDescriptor sd = dd.getSchemaDescriptor(schemaName, null, true);
        try {
            notifyLoader(false);
            dd.invalidateAllSPSPlans();
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.sql.dictionary.FileInfoDescriptor

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.