|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectscriptella.spi.AbstractConnection
scriptella.driver.text.AbstractTextConnection
public abstract class AbstractTextConnection
Base class for Text/CSV connections.
TODO: Move this class to a spi.support.text package.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class scriptella.spi.AbstractConnection |
|---|
scriptella.spi.AbstractConnection.StatementCounter |
| Field Summary | |
|---|---|
protected java.lang.String |
encoding
|
static java.lang.String |
ENCODING
Name of the encoding connection property. |
protected java.lang.String |
eol
|
static java.lang.String |
EOL
Name of the eol connection property. |
protected boolean |
flush
|
static java.lang.String |
FLUSH
Name of the flush connection property. |
static java.lang.String |
NULL_STRING
Name of the null_string connection property. |
protected java.lang.String |
nullString
|
static java.lang.String |
SKIP_LINES
Name of the skip_lines connection property. |
protected int |
skipLines
|
protected boolean |
trim
|
static java.lang.String |
TRIM
Name of the trim connection property. |
protected java.net.URL |
url
|
| Fields inherited from class scriptella.spi.AbstractConnection |
|---|
counter |
| Constructor Summary | |
|---|---|
protected |
AbstractTextConnection()
For testing only. |
protected |
AbstractTextConnection(scriptella.spi.DialectIdentifier dialectIdentifier,
scriptella.spi.ConnectionParameters parameters)
Initializes a text connection using specified properties. |
| Method Summary | |
|---|---|
java.lang.String |
getEncoding()
|
java.lang.String |
getEol()
|
java.net.URL |
getUrl()
Returns resolved URL for this connection. |
boolean |
isTrim()
|
protected java.io.Reader |
newInputReader()
Creates a new reader for input. |
protected java.io.Writer |
newOutputWriter()
Creates a new writer to send output to. |
| Methods inherited from class scriptella.spi.AbstractConnection |
|---|
commit, getDialectIdentifier, getExecutedStatementsCount, isReadonly, rollback, setDialectIdentifier, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface scriptella.spi.Connection |
|---|
close, executeQuery, executeScript |
| Field Detail |
|---|
protected final java.lang.String encoding
protected final boolean trim
protected final boolean flush
protected final java.net.URL url
protected final java.lang.String eol
protected final int skipLines
protected final java.lang.String nullString
public static final java.lang.String ENCODING
encoding connection property.
Specifies charset encoding in text files.
public static final java.lang.String EOL
eol connection property.
EOL suffix. Default value is \n.
public static final java.lang.String TRIM
trim connection property.
Value of true specifies that the leading and trailing
whitespaces should be omitted.
public static final java.lang.String FLUSH
flush connection property.
Value of true specifies that the outputted content should flushed immediately after
the <script> element completes.
public static final java.lang.String SKIP_LINES
skip_lines connection property.
The number of lines to skip before start reading.
Default value is 0 (no lines are skipped).
Only valid for <query> elements.
public static final java.lang.String NULL_STRING
null_string connection property.
If set, specifies value of a string token to be parsed as Java null literal.
| Constructor Detail |
|---|
protected AbstractTextConnection()
protected AbstractTextConnection(scriptella.spi.DialectIdentifier dialectIdentifier,
scriptella.spi.ConnectionParameters parameters)
dialectIdentifier - parameters - | Method Detail |
|---|
public java.lang.String getEncoding()
public boolean isTrim()
public java.net.URL getUrl()
If null, the console is used for reading/writing.
public java.lang.String getEol()
protected java.io.Writer newOutputWriter()
throws java.io.IOException
java.io.IOException - if IO error occured.
protected java.io.Reader newInputReader()
throws java.io.IOException
java.io.IOException - if IO error occured.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||