public class ImportCommand extends SQLCommand
IMPORT CLASS class_name
[[[FILE path] |
[FILE_KEY file_key]]
[DELIMITER delimiter]
[DATE_FORMAT date_format]
COLUMNS fields[,...]]
Usage/* Simple import */ IMPORT CLASS person FILE /docs/temp.txt COLUMNS firstName POS 1, lastNameTHREAD MODE: SINGLE THREADED command
CURSOR_SIZE| Constructor and Description |
|---|
ImportCommand(Connection connection,
Pattern pattern)
std.
|
| Modifier and Type | Method and Description |
|---|---|
void |
appendResult(org.w3c.dom.Element group,
int seq)
append the result set to a result group.
|
protected ImportFieldDef |
buildFieldDef(java.lang.String text,
DBClass baseClass) |
protected Importer |
buildImporter(Parser p) |
protected void |
configImporter(Parser p,
Importer importer) |
protected void |
execute(Parser p)
execute the command.
|
java.lang.String |
getColumnName(int col)
the column name
|
java.lang.String |
getColumnType(int col)
Gets the column type for the given column index, starting at one
|
java.lang.String |
getCursorName()
Returns the name for the current cursor
|
protected DBFile |
getImportFile(DataSource ds,
Parser p) |
protected ImportFileSource |
getImportSource(DataSource ds,
Parser p) |
java.lang.String |
getRecordID(int row)
the record ID
|
java.lang.Object |
getValue(int row,
int col)
the value for this row, column
|
appendResult, getRecordKey, isExecuteOnlyexecute, extMakeThreadName, getConnection, getPattern, getRawTitle, getTitle, makeThreadName, recordCall, setTitleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRawTitlepublic ImportCommand(Connection connection, Pattern pattern)
connection - the connectionpattern - the patternprotected void execute(Parser p) throws java.lang.Exception
public void appendResult(org.w3c.dom.Element group,
int seq)
throws java.lang.Exception
appendResult in class SQLCommandgroup - The XML Element for the result groupseq - The sequence in the result group.java.lang.Exception - A serious problem.public java.lang.String getCursorName()
throws java.lang.Exception
SQLCommandgetCursorName in interface CommandBuildResultsPlugingetCursorName in class SQLCommandjava.lang.Exception - a serious problemprotected Importer buildImporter(Parser p) throws java.lang.Exception
p - java.lang.Exception - a serious problemprotected void configImporter(Parser p, Importer importer) throws java.lang.Exception
p - importer - java.lang.Exception - a serious problemprotected ImportFileSource getImportSource(DataSource ds, Parser p) throws java.lang.Exception
ds - the data sourcep - java.lang.Exception - a serious problemprotected DBFile getImportFile(DataSource ds, Parser p) throws java.lang.Exception
ds - the data sourcep - java.lang.Exception - a serious problemprotected ImportFieldDef buildFieldDef(java.lang.String text, DBClass baseClass) throws java.lang.Exception
text - baseClass - The base classjava.lang.Exception - a serious problempublic java.lang.String getColumnName(int col)
col - the columnpublic java.lang.String getRecordID(int row)
row - the row indexpublic java.lang.String getColumnType(int col)
col - the column indexpublic java.lang.Object getValue(int row,
int col)
row - the row indexcol - the columnstSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.