public class DefaultSQLFormatter extends Object implements SQLFormatter
select * from PERSON t0,
COMPANY t1 WHERE t0.ID = 10 AND \ t0.COMPANY_ID = t1.ID AND t1.NAME = 'OpenJPA' becomes
SELECT * FROM PERSON t0, COMPANY t1
WHERE t0.ID = 10 AND t0.COMPANY_ID = t1.ID AND t1.NAME = 'OpenJPA'\
and INSERT INTO PERSON VALUES('Patrick', 'Linskey', 'OpenJPA', \
'202 595 2064 x1111') becomes INSERT INTO PERSON VALUES('Patrick', 'Linskey', 'OpenJPA', '202
595 2064 x1111') etc.| Constructor and Description |
|---|
DefaultSQLFormatter() |
| Modifier and Type | Method and Description |
|---|---|
String |
getClauseIndent() |
boolean |
getDoubleSpace()
If true, then output two lines after multi-line statements.
|
int |
getLineLength() |
boolean |
getMultiLine()
If true, then try to parse multi-line SQL statements.
|
String |
getNewline() |
String |
getWrapIndent() |
String |
prettyPrint(String sqlObject) |
void |
setClauseIndent(String val) |
void |
setDoubleSpace(boolean doubleSpace)
If true, then output two lines after multi-line statements.
|
void |
setLineLength(int val) |
void |
setMultiLine(boolean multiLine)
If true, then try to parse multi-line SQL statements.
|
void |
setNewline(String val) |
void |
setWrapIndent(String val) |
public void setNewline(String val)
public String getNewline()
public void setLineLength(int val)
public int getLineLength()
public void setWrapIndent(String val)
public String getWrapIndent()
public void setClauseIndent(String val)
public String getClauseIndent()
public void setMultiLine(boolean multiLine)
multiLine - multiLinepublic boolean getMultiLine()
public void setDoubleSpace(boolean doubleSpace)
doubleSpace - doubleSpacepublic boolean getDoubleSpace()
public String prettyPrint(String sqlObject)
prettyPrint in interface SQLFormatterCopyright © 2015. All rights reserved.