Class Hierarchy        Index

Class COM.cloudscape.tools.FileImport

java.lang.Object
   |
   +----COM.cloudscape.vti.VTITemplate
           |
           +----COM.cloudscape.tools.ImportExportImpl.ImportAbstractResultSet
                   |
                   +----COM.cloudscape.tools.ImportExportImpl.ImportAbstract
                           |
                           +----COM.cloudscape.tools.FileImport

public class FileImport
extends ImportAbstract
Copyright © 1998-1999, Cloudscape, Inc. All rights reserved.

This class provides ways for importing data from a URL into a table. Another class in the same package(FileExport) exports data from a table or a view into a file.

This can be "run" within Cloudview, an SQL statement using ij, any Java application, or on command line. The user documentation gives details and examples of the various ways of using this class.


Variable Index

 o INSERT_MODE_PROPERTY

Constructor Index

 o FileImport(String)
Invoke import from ij
 o FileImport(String, String)
Invoke import from ij

Method Index

 o defaultControlFileReader()
For internal use only
 o getControlFileReader()
For internal use only
 o getImportReadData()
virtual method from the abstract class
 o Import(Connection, String, String)
Invoke import from ij or from a Java application
 o Import(Connection, String, String, Properties)
Invoke import from ij or from a Java application
 o Import(Connection, String, String, String)
Invoke import from ij or from a Java application
 o Import(Connection, String, String, String, Properties)
Invoke import from ij or from a Java application
 o main(String[])
This is for stand-alone bulk import from the command line.
 o slowImport(Connection, String, String)
for internal use only
 o slowImport(Connection, String, String, String)
for internal use only

Variables

 o INSERT_MODE_PROPERTY
 public static final String INSERT_MODE_PROPERTY

Constructors

 o FileImport
 public FileImport(String inputFileName) throws Exception
Invoke import from ij

Parameters:
inputFileName - The URL of the ASCII file from which import will happen
Throws: Exception
on error
 o FileImport
 public FileImport(String inputFileName,
                   String controlFileName) throws Exception
Invoke import from ij

Parameters:
inputFileName - The URL of the ASCII file from which import will happen
controlFileName - The URL of the control file specifying the file format of the ASCII file for the bulk import.
Throws: Exception
on error

Methods

 o Import
 public static void Import(Connection connection,
                           String entityName,
                           String inputFileName) throws Exception
Invoke import from ij or from a Java application

Parameters:
con - The Cloudscape database connection URL for the database containing the table
entityName - The name of the table into which you want to bulk import the data. Qualify the table name with the schema name, if it is not in the default schema APP.
inputFileName - The URL of the ASCII file from which import will happen
Throws: Exception
on error
 o Import
 public static void Import(Connection connection,
                           String entityName,
                           String inputFileName,
                           Properties prop) throws Exception
Invoke import from ij or from a Java application

Parameters:
con - The Cloudscape database connection URL for the database containing the table
entityName - The name of the table into which you want to bulk import the data. Qualify the table name with the schema name, if it is not in the default schema APP.
inputFileName - The URL of the ASCII file from which import will happen
prop - enables "fast import"
Throws: Exception
on error
 o Import
 public static void Import(Connection connection,
                           String entityName,
                           String inputFileName,
                           String controlFileName) throws Exception
Invoke import from ij or from a Java application

Parameters:
con - The Cloudscape database connection URL for the database containing the table
entityName - The name of the table into which you want to bulk import the data. Qualify the table name with the schema name, if it is not in the default schema APP.
inputFileName - The URL of the ASCII file from which import will happen
controlFileName - The URL of the control file specifying the file format of the ASCII file for the bulk import.
Throws: Exception
on error
 o Import
 public static void Import(Connection connection,
                           String entityName,
                           String inputFileName,
                           String controlFileName,
                           Properties prop) throws Exception
Invoke import from ij or from a Java application

Parameters:
con - The Cloudscape database connection URL for the database containing the table
entityName - The name of the table into which you want to bulk import the data. Qualify the table name with the schema name, if it is not in the default schema APP.
inputFileName - The URL of the ASCII file from which import will happen
controlFileName - The URL of the control file specifying the file format of the ASCII file for the bulk import.
prop - enables "fast import"
Throws: Exception
on error
 o slowImport
 public static void slowImport(Connection connection,
                               String entityName,
                               String inputFileName) throws Exception
for internal use only

Throws: Exception
on error
 o slowImport
 public static void slowImport(Connection connection,
                               String entityName,
                               String inputFileName,
                               String controlFileName) throws Exception
for internal use only

Throws: Exception
on error
 o main
 public static void main(String args[]) throws Exception
This is for stand-alone bulk import from the command line.

Parameters:
databaseConnectionURL - The Cloudscape database connection URL for the database containing the table
tableOrViewName - The name of the table into which you want to bulk import the data. Qualify the table name with the schema name, if it is not in the default schema APP.
exportFile - The URL of the ASCII file into which import will happen
(optional) - controlFileURL The URL of the control file specifying the file format of the ASCII file for the bulk import.
Throws: Exception
on error
 o getControlFileReader
 protected ControlFileReaderAbstract getControlFileReader() throws Exception
For internal use only

Throws: Exception
on error
Overrides:
getControlFileReader in class ImportAbstract
 o defaultControlFileReader
 protected boolean defaultControlFileReader() throws Exception
For internal use only

Throws: Exception
on error
Overrides:
defaultControlFileReader in class ImportAbstract
 o getImportReadData
 protected ImportReadDataAbstract getImportReadData() throws Exception
virtual method from the abstract class

Throws: Exception
on error
Overrides:
getImportReadData in class ImportAbstract

  Class Hierarchy        Index