public class SQLWriter extends Writer
| Modifier and Type | Field and Description |
|---|---|
protected static char |
parameterMarker |
static byte |
STATE_BEGIN |
static byte |
STATE_HAS_OP |
static byte |
STATE_NEEDS_OP |
| Constructor and Description |
|---|
SQLWriter()
Initialize the new instance.
|
SQLWriter(AliasDictionary useAliases)
Initialize the new instance with a given AliasDictionary or null
|
| Modifier and Type | Method and Description |
|---|---|
SQLWriter |
addParameter(Object paramValue)
Add a parameter and write the parameter marker
|
void |
close()
Close the stream.
|
SQLStatement |
createStatement()
Create an instance of SQLStatement from the receiver
|
void |
flipStreams()
set the receivers selectStream as the stream and
the stream as the selectStream.
|
void |
flush()
Flush the stream.
|
AliasDictionary |
getAliases()
Answer the receiver's alias dictionary.
|
byte |
getOperatorState() |
String |
getParameterizedStatement()
return the statement including parameter values instead of ?
|
List |
getParameters()
return a collection of parameters provided to the reciever
|
String |
getSelectString() |
String |
getWhereString() |
SQLWriter |
onSelect_write(String str)
does not change operator state. just write str.
|
void |
setAliases(AliasDictionary aAliases)
Set the receiver's alias dictionary.
|
void |
setOperatorState(byte aState)
set the operator state to the given contant.
|
String |
toString()
Answer the receiver's string representation, i.e. answer
the content of the underlying StringWriter.
|
void |
write(char[] cbuf,
int off,
int len)
Write a portion of an array of characters.
|
void |
write(int c)
Write a single character.
|
void |
write(String str)
Write a string.
|
void |
write(String str,
int off,
int len)
Write a portion of a string.
|
SQLWriter |
writeAnd()
Write an AND token to the stream, if neccessary
|
SQLWriter |
writeOperator(String operator) |
SQLWriter |
writeOr()
Write an OR token to the stream, if neccessary
|
SQLWriter |
writeParameterMarker()
Write a parameter marker to the stream.
|
SQLWriter |
writeWhere()
Write a WHERE token to the stream, if neccessary
|
protected static final char parameterMarker
public static final byte STATE_BEGIN
public static final byte STATE_HAS_OP
public static final byte STATE_NEEDS_OP
public SQLWriter()
public SQLWriter(AliasDictionary useAliases)
public void flipStreams()
public void close()
public void flush()
public AliasDictionary getAliases()
public void setAliases(AliasDictionary aAliases)
public String toString()
public String getSelectString()
public String getWhereString()
public String getParameterizedStatement()
public SQLStatement createStatement()
public void write(char[] cbuf,
int off,
int len)
public void write(int c)
public void write(String str)
public SQLWriter onSelect_write(String str)
public void setOperatorState(byte aState)
public byte getOperatorState()
public void write(String str, int off, int len)
public SQLWriter writeAnd()
public SQLWriter writeOr()
public SQLWriter writeParameterMarker()
public SQLWriter addParameter(Object paramValue)
public List getParameters()
public SQLWriter writeWhere()
Copyright © 2008–2018. All rights reserved.