org.kuali.common.jdbc
Class DefaultSqlReader
java.lang.Object
org.kuali.common.jdbc.DefaultSqlReader
- All Implemented Interfaces:
- SqlReader
- Direct Known Subclasses:
- MySQLDumpReader
public class DefaultSqlReader
- extends Object
- implements SqlReader
Method Summary |
List<String> |
getCommentTokens()
|
String |
getDelimiter()
|
DelimiterMode |
getDelimiterMode()
|
LineSeparator |
getLineSeparator()
|
SqlMetaData |
getMetaData(BufferedReader reader)
|
protected String |
getReturnValue(String sql,
boolean trim,
LineSeparator lineSeparator)
|
List<String> |
getSql(BufferedReader reader)
|
protected boolean |
ignore(boolean ignoreComments,
StringBuilder sql,
String trimmedLine,
List<String> commentTokens)
|
protected boolean |
isEndOfSqlStatement(String trimmedLine,
String delimiter,
DelimiterMode delimiterMode)
|
boolean |
isIgnoreComments()
|
protected boolean |
isSqlComment(String trimmedLine,
List<String> commentTokens)
|
boolean |
isTrim()
|
protected boolean |
proceed(String line,
String trimmedLine,
String delimiter,
DelimiterMode delimiterMode)
|
void |
setCommentTokens(List<String> commentTokens)
|
void |
setDelimiter(String delimiter)
|
void |
setDelimiterMode(DelimiterMode delimiterMode)
|
void |
setIgnoreComments(boolean ignoreComments)
|
void |
setLineSeparator(LineSeparator lineSeparator)
|
void |
setTrim(boolean trim)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_DELIMITER
public static final String DEFAULT_DELIMITER
- See Also:
- Constant Field Values
DEFAULT_DELIMITER_MODE
public static final DelimiterMode DEFAULT_DELIMITER_MODE
DEFAULT_LINE_SEPARATOR
public static final LineSeparator DEFAULT_LINE_SEPARATOR
DEFAULT_COMMENT_TOKENS
public static final List<String> DEFAULT_COMMENT_TOKENS
DEFAULT_IS_TRIM
public static final boolean DEFAULT_IS_TRIM
- See Also:
- Constant Field Values
DEFAULT_IS_IGNORE_COMMENTS
public static final boolean DEFAULT_IS_IGNORE_COMMENTS
- See Also:
- Constant Field Values
DefaultSqlReader
public DefaultSqlReader()
getMetaData
public SqlMetaData getMetaData(BufferedReader reader)
throws IOException
- Specified by:
getMetaData
in interface SqlReader
- Throws:
IOException
getSql
public List<String> getSql(BufferedReader reader)
throws IOException
- Specified by:
getSql
in interface SqlReader
- Throws:
IOException
getReturnValue
protected String getReturnValue(String sql,
boolean trim,
LineSeparator lineSeparator)
isEndOfSqlStatement
protected boolean isEndOfSqlStatement(String trimmedLine,
String delimiter,
DelimiterMode delimiterMode)
proceed
protected boolean proceed(String line,
String trimmedLine,
String delimiter,
DelimiterMode delimiterMode)
ignore
protected boolean ignore(boolean ignoreComments,
StringBuilder sql,
String trimmedLine,
List<String> commentTokens)
isSqlComment
protected boolean isSqlComment(String trimmedLine,
List<String> commentTokens)
getDelimiter
public String getDelimiter()
setDelimiter
public void setDelimiter(String delimiter)
isTrim
public boolean isTrim()
setTrim
public void setTrim(boolean trim)
isIgnoreComments
public boolean isIgnoreComments()
setIgnoreComments
public void setIgnoreComments(boolean ignoreComments)
getLineSeparator
public LineSeparator getLineSeparator()
setLineSeparator
public void setLineSeparator(LineSeparator lineSeparator)
getDelimiterMode
public DelimiterMode getDelimiterMode()
setDelimiterMode
public void setDelimiterMode(DelimiterMode delimiterMode)
getCommentTokens
public List<String> getCommentTokens()
setCommentTokens
public void setCommentTokens(List<String> commentTokens)
Copyright © 2010-2013 The Kuali Foundation. All Rights Reserved.