|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.etools.iseries.edit.sql.SQLStatements.SQLStatement
public class SQLStatement
Field Summary | |
---|---|
static String |
Copyright
|
static String |
EOL
|
Constructor Summary | |
---|---|
protected |
SQLStatement(SQLStatement statement)
Constructor which allows creating a statement from another statement object |
protected |
SQLStatement(String name,
Properties statementProperties)
Constructor which allows passing in properties |
protected |
SQLStatement(String name,
Properties statementProperties,
boolean isControlStatement)
The main contructor for this class |
Method Summary | |
---|---|
boolean |
allowsBlanksWithOperator(char c)
Indicate whether or not this statement allows blanks around the specified operator |
void |
appendComment(StringBuffer comment)
Appends a comment to the existing comment for this item |
void |
appendCommentChar(char c)
Appends a character to the comment buffer for this item |
void |
decreaseBracketLevel()
Used to keep track of nexted brackets |
int |
getBracketLevel()
Used to retrieves the bracket leve |
int |
getBreakIndent(String breakKwd)
Retreives the indent level to be used by the specified break keyword. |
StringBuffer |
getCommentBuffer()
Retrieves the comment buffer for this item |
int |
getIndentLength()
Retrieves the indent length for this statement |
boolean |
getIsBreakOnKwd()
Retrieves whether or not the statement has broken on a keyword |
int |
getLabelLength()
Retrieves the length of the label |
Vector<String> |
getMatchingStatement()
Indicates the list of statements to match. |
String |
getName()
Retrieves the name of the statement |
String |
getNextWordAfterForNeeded()
Returns the next word after FOR needed to determin if the FOR is just a keyword or a control statement |
protected Properties |
getProperties()
Retrieves the properties for the statement |
StringBuffer |
getStartingBuffer()
Retrieves the starting buffer for this item. |
int |
getStartingBufferPosition()
Retrieves the position in the starting buffer that the statement is at |
Vector<String> |
getStopAtIndentStrings()
Retrieves the list of string to stop at when indenting for formatting |
Vector<String> |
getStopAtStrings()
Retrieves the list of string to stop at when formatting |
boolean |
hasEnd()
Indicates whether or not this statement has an end to match |
void |
increaseBracketLevel()
Used to keep track of nested brackets |
boolean |
inFullSelect()
Inidcates whether or not this statement is in a full select. |
boolean |
isBeginStatement()
Indicates whether or not this statement is a begin statement |
boolean |
isBreakOnKwd(String kwd)
Indicates whether the specified keyword is a break keyword for this statement |
boolean |
isBreakOnWordAfter(String breakKwd)
Indicates whether or not the keyword is a for breaking on the word after |
boolean |
isBreakStyleAfter(String breakKwd)
Retreives the break style for the break keyword |
boolean |
isCaseStatement()
Indicates whether or not the statement is a case statement |
boolean |
isClause()
Indicates whether or not this statement is a clause. |
boolean |
isCommit()
Indicates whether or not this is a COMMIT statement |
boolean |
isControlStatement()
Indicates whether or not the statement is a control statement. |
boolean |
isCreateProcedure()
Indicates whether or not the statement is a CREATE PROCEDURE statement |
boolean |
isElse()
Indicates whether or not the current statement is a ELSE statement |
boolean |
isEndStatement()
Indicates whether or not this is an end statement |
boolean |
isFirstMultiBreakOnWord(String text)
Indicates whether or not the word specified is part of a multi word break on keyword sequence |
boolean |
isFitsOnOneLine()
Indicates whether or not the statement fits on one line |
boolean |
isForStatement()
Inidcates whether or not this statement is a FOR statement |
boolean |
isGetDiagnosticsStatement()
Indicates whether or not this is a get diagnsotics statement |
boolean |
isKeepOnOneLine()
Indicates whether or not this statement should be kept on one line if possible |
boolean |
isMatchingEnd(SQLStatement end)
Indicates whether or not the specified statement is an end statement that matches this one |
boolean |
isMultiWordBreakOn()
Indicates whether or not this statement had break on keywords that consist of more than one word |
boolean |
isNested()
Indicates if this is a nested case statement/clause |
boolean |
isNestedCase()
Retrieves whether or not this case is nested within another statement |
boolean |
isNestedStatementAllowed(SQLStatement statement)
Indicates whether or not the statement allows nested statements without semicolons |
boolean |
isNextWordAfterForNeeded()
Determines whether or not the next word after FOR needs to be checked |
boolean |
isPredicate()
Indicates whether or not the statement is a predicate |
boolean |
isReturn()
Indicates whether or not the current statement is RETURN |
boolean |
isSavepoint()
Indicates whether orn this command is a SAVEPOINT comment |
boolean |
isSelectStatement()
Indicates whether or not this is a select statement |
boolean |
isSplitOnCommasAllowed()
Indicates whether or not the statement allows splitting on commas |
boolean |
isStartMultiBreakOnWord(String text)
|
boolean |
isStartOnNewLine()
Indicates whether or not the statement needs to be started on a new line |
boolean |
isStatementAllowed(StringBuffer statementBuffer,
ISQLItem currentItem)
Hanldes exception scenarios where isNestedStatement allowed does not work |
boolean |
isStopAtAfter(String stopString)
Indicates whether the formatter should stop before or after the "stop at string". |
boolean |
isStopAtIndentString(String text)
|
boolean |
isStopAtString(String text)
|
boolean |
isStopOnControlStatement()
Indicates whether or not the statement should stop formatting on control statements |
boolean |
isStopOnStatement()
Indicates whether or not the statement should stop formatting on statements |
boolean |
isTwoWordStatement()
Indicates whether or not the statement requires two word to be correctly parsed |
boolean |
isUseAndOrPreference()
Indicates whether or not the statement should use the split on and/or prefernece |
boolean |
isWhen()
Indicates whether or not the current statement is a WHEN statement |
boolean |
isWithStatement()
Indicates whether or not the statement is a WITH statement |
void |
setFitsOnOneLine(boolean value)
Sets whether or not this statement fits on one line. |
void |
setIndentLength(int length)
Sets the indent length value for this statement |
void |
setIsBreakOnKwd(String testKwd)
|
void |
setIsClause(boolean value)
Sets whether or not this is a clause |
void |
setIsNestedCase(boolean value)
Sets whether or not this case is nested within another statement |
void |
setIsPredicate(boolean value)
Sets whether or not the statment is a predicate |
void |
setLabelLength(int value)
Sets the length of the label |
void |
setStartingBuffer(StringBuffer start)
Sets the starting buffer for this item. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String Copyright
public static final String EOL
Constructor Detail |
---|
protected SQLStatement(SQLStatement statement)
statement
- the statement to copyprotected SQLStatement(String name, Properties statementProperties)
name
- the name of the statementstatementProperties
- the properties of the statementprotected SQLStatement(String name, Properties statementProperties, boolean isControlStatement)
name
- the name of the statementstatementProperties
- the properties for the statementisControlStatement
- true if this is a control statement, false otherwiseMethod Detail |
---|
public boolean allowsBlanksWithOperator(char c)
c
- the operator to check
public void appendComment(StringBuffer comment)
ISQLItem
appendComment
in interface ISQLItem
comment
- the comment to appendpublic void appendCommentChar(char c)
ISQLItem
appendCommentChar
in interface ISQLItem
c
- the character to appendpublic void decreaseBracketLevel()
ISQLItem
decreaseBracketLevel
in interface ISQLItem
public int getBracketLevel()
ISQLItem
getBracketLevel
in interface ISQLItem
public int getBreakIndent(String breakKwd)
breakKwd
- The break keyword to check
public StringBuffer getCommentBuffer()
ISQLItem
getCommentBuffer
in interface ISQLItem
public int getIndentLength()
public boolean getIsBreakOnKwd()
public int getLabelLength()
public Vector<String> getMatchingStatement()
public String getName()
getName
in interface ISQLItem
public String getNextWordAfterForNeeded()
protected Properties getProperties()
public StringBuffer getStartingBuffer()
ISQLItem
getStartingBuffer
in interface ISQLItem
public int getStartingBufferPosition()
ISQLItem
getStartingBufferPosition
in interface ISQLItem
public Vector<String> getStopAtIndentStrings()
public Vector<String> getStopAtStrings()
public boolean hasEnd()
public void increaseBracketLevel()
ISQLItem
increaseBracketLevel
in interface ISQLItem
public boolean inFullSelect()
public boolean isBeginStatement()
public boolean isBreakOnKwd(String kwd)
kwd
- the keyword to check
public boolean isBreakOnWordAfter(String breakKwd)
breakKwd
- the keyword to check
public boolean isBreakStyleAfter(String breakKwd)
breakKwd
- The break keyword to check
public boolean isCaseStatement()
public boolean isClause()
public boolean isCommit()
public boolean isControlStatement()
public boolean isCreateProcedure()
public boolean isElse()
public boolean isEndStatement()
public boolean isFirstMultiBreakOnWord(String text)
text
- the text to check
public boolean isFitsOnOneLine()
public boolean isForStatement()
public boolean isGetDiagnosticsStatement()
public boolean isKeepOnOneLine()
public boolean isMatchingEnd(SQLStatement end)
end
- the end statement to check
public boolean isMultiWordBreakOn()
public boolean isNested()
public boolean isNestedCase()
public boolean isNestedStatementAllowed(SQLStatement statement)
public boolean isNextWordAfterForNeeded()
public boolean isPredicate()
public boolean isReturn()
public boolean isSavepoint()
public boolean isSelectStatement()
public boolean isSplitOnCommasAllowed()
isSplitOnCommasAllowed
in interface ISQLItem
public boolean isStartMultiBreakOnWord(String text)
public boolean isStartOnNewLine()
public boolean isStatementAllowed(StringBuffer statementBuffer, ISQLItem currentItem)
statementBuffer
- the statement buffer to check
public boolean isStopAtAfter(String stopString)
the
- stop string to check the setting for
public boolean isStopAtIndentString(String text)
public boolean isStopAtString(String text)
public boolean isStopOnControlStatement()
public boolean isStopOnStatement()
public boolean isTwoWordStatement()
public boolean isUseAndOrPreference()
public boolean isWhen()
public boolean isWithStatement()
public void setFitsOnOneLine(boolean value)
value
- true if the statement fit on one line, false otherwisepublic void setIndentLength(int length)
length
- the number of blanks to indent this commandpublic void setIsBreakOnKwd(String testKwd)
public void setIsClause(boolean value)
public void setIsNestedCase(boolean value)
value
- true if this is a nested case, false otherwisepublic void setIsPredicate(boolean value)
value
- true if the statement is a predicate, false otherwisepublic void setLabelLength(int value)
value
- the length of the label for this statementpublic void setStartingBuffer(StringBuffer start)
ISQLItem
setStartingBuffer
in interface ISQLItem
start
- the starting bufferpublic String toString()
toString
in class Object
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |