Package org.apache.derby.iapi.store.access

Examples of org.apache.derby.iapi.store.access.FileResource


      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(schemaName, sqlName, fr.getSeparatorChar());

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


      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(schemaName, sqlName, fr.getSeparatorChar());

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

     throws StandardException
  {
    if (!removeAtOnce)
      return false;

    FileResource fr = ((RawTransaction) xact).getDataFactory().getFileHandler();

    fileToGo = fr.getAsFile(name, generationId);

    if (fileToGo == null)
      return false;

        return fileToGo.exists();
View Full Code Here

    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());

    Object f = fr.getAsFile(externalName, generationId);
    if (f instanceof java.io.File)
      return f;

    try {
      return fr.getAsStream(externalName, generationId);
    } catch (java.io.IOException ioe) {
            throw StandardException.newException(SQLState.LANG_FILE_ERROR, ioe, ioe.toString());   
    }
  }
View Full Code Here

      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(schemaName, sqlName, fr.getSeparatorChar());

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

      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(schemaName, sqlName, fr.getSeparatorChar());

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

        {
            scanController.close();
        }

        Iterator i = schemas.keySet().iterator();
        FileResource fh = tc.getFileHandler();

        // remove those directories with their contents
        while(i.hasNext()) {
            fh.removeJarDir(
                    FileResource.JAR_DIRECTORY_NAME +
                    File.separatorChar +
                    (String)i.next());
        }
    }
View Full Code Here

      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(schemaName, sqlName, fr.getSeparatorChar());

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

      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

        {
            scanController.close();
        }

        Iterator<String> i = schemas.keySet().iterator();
        FileResource fh = tc.getFileHandler();

        // remove those directories with their contents
        while(i.hasNext()) {
            fh.removeJarDir(
                    FileResource.JAR_DIRECTORY_NAME +
                    File.separatorChar +
                    i.next());
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.store.access.FileResource

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.