Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 3.4.1 generated on May 30 2006
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.solarmetric.jdbc
Class SQLFormatter

    java.lang.Object
      |
      +--com.solarmetric.jdbc.SQLFormatter

public class SQLFormatter
extends Object

Converts single-line SQL strings into nicely-formatted multi-line, indented statements.

Example: `SELECT * from PERSON t0, COMPANY t1 WHERE t0.ID = 10 AND \ t0.COMPANY_ID = t1.ID AND t1.NAME = 'SolarMetric'` becomes `SELECT * FROM PERSON t0, COMPANY t1 WHERE t0.ID = 10 AND t0.COMPANY_ID = t1.ID AND t1.NAME = 'SolarMetric'\` and `INSERT INTO PERSON VALUES ('Patrick', 'Linskey', 'SolarMetric', \ '202 595 2064 x1111')` becomes `INSERT INTO PERSON VALUES ('Patrick', 'Linskey', 'SolarMetric', '202 595 2064 x1111')` etc.

Constructor Summary
`SQLFormatter()`

Method Summary
`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()`
`static void` | `main(String[] args)`
`Object` | `prettyPrint(Object 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)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SQLFormatter

    public SQLFormatter()

Method Detail

### setNewline

    public void setNewline(String val)

### getNewline

    public String getNewline()

### setLineLength

    public void setLineLength(int val)

### getLineLength

    public int getLineLength()

### setWrapIndent

    public void setWrapIndent(String val)

### getWrapIndent

    public String getWrapIndent()

### setClauseIndent

    public void setClauseIndent(String val)

### getClauseIndent

    public String getClauseIndent()

### setMultiLine

    public void setMultiLine(boolean multiLine)

  If true, then try to parse multi-line SQL statements.

### getMultiLine

    public boolean getMultiLine()

  If true, then try to parse multi-line SQL statements.

### setDoubleSpace

    public void setDoubleSpace(boolean doubleSpace)

  If true, then output two lines after multi-line statements.

### getDoubleSpace

    public boolean getDoubleSpace()

  If true, then output two lines after multi-line statements.

### prettyPrint

    public Object prettyPrint(Object sqlObject)

### main

    public static void main(String[] args)

Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 3.4.1 generated on May 30 2006
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.