Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.edit.sql
Class SQLUpperCaseSettings

java.lang.Object
  extended by com.ibm.etools.iseries.edit.sql.SQLUpperCaseSettings

public class SQLUpperCaseSettings
extends Object

This class is used to handle settings and behaviour for uppercasing

Since:
7.0

Field Summary
static String Copyright
           
static int IGNORE
          Use so that text is not uppercased
static int INITIAL
          Indicates that only the initial character should be uppercased
static int LOWER
          Indicates all text should be lowercased
static int UPPER
          Indicates all text should be uppercased
 
Constructor Summary
SQLUpperCaseSettings(int allTextSetting)
          Use when all text should be uppecased the same.
SQLUpperCaseSettings(int kwdsBifs, int identifiers)
          Use when you want to uppercase keywords and BIF differently than indentifiers, or when only initial character uppercasing is desired.
 
Method Summary
static SQLUpperCaseSettings getUpperCaseSettings(String preferenceKey)
          Retrieves the uppercase settings to use for formatting from the preference store
 boolean isKeywordUpperCasingRequired()
          Inidcates whether or not the keywords should be uppercased or not
 boolean isUpperCasingRequired()
          Indicates whether or not the current settings mean that the formatter needs to perform uppercasing
 String toString()
           
 String uppercaseIndentifier(String text)
          Uppercases an identifier based on the settings
 String uppercaseKeywordOrBif(String text)
          Uppercases a keyword or BIF based on the settings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Copyright

public static final String Copyright
See Also:
Constant Field Values

IGNORE

public static final int IGNORE
Use so that text is not uppercased

See Also:
Constant Field Values

UPPER

public static final int UPPER
Indicates all text should be uppercased

See Also:
Constant Field Values

LOWER

public static final int LOWER
Indicates all text should be lowercased

See Also:
Constant Field Values

INITIAL

public static final int INITIAL
Indicates that only the initial character should be uppercased

See Also:
Constant Field Values
Constructor Detail

SQLUpperCaseSettings

public SQLUpperCaseSettings(int allTextSetting)
Use when all text should be uppecased the same.

Parameters:
allTextSetting - The setting to use for all SQL text
See Also:
com.ibm.etools.iseries.editor.sql.SQLUpperCaseSettings.IGNORE, com.ibm.etools.iseries.editor.sql.SQLUpperCaseSettings.ALL_UPPER, com.ibm.etools.iseries.editor.sql.SQLUpperCaseSettings.ALL_LOWER

SQLUpperCaseSettings

public SQLUpperCaseSettings(int kwdsBifs,
                            int identifiers)
Use when you want to uppercase keywords and BIF differently than indentifiers, or when only initial character uppercasing is desired.

Parameters:
kwdsBifs -
identifiers -
Method Detail

getUpperCaseSettings

public static SQLUpperCaseSettings getUpperCaseSettings(String preferenceKey)
Retrieves the uppercase settings to use for formatting from the preference store

Parameters:
preferenceKey - The preference key to find the uppercase preferences
Returns:
SQLUpperCaseSettingsh all necessary options set

isUpperCasingRequired

public boolean isUpperCasingRequired()
Indicates whether or not the current settings mean that the formatter needs to perform uppercasing

Returns:
true if uppercasing is required, false otherwise

isKeywordUpperCasingRequired

public boolean isKeywordUpperCasingRequired()
Inidcates whether or not the keywords should be uppercased or not

Returns:
true if uppercasing is needed, false if ignoring keywords

toString

public String toString()
Overrides:
toString in class Object

uppercaseIndentifier

public String uppercaseIndentifier(String text)
Uppercases an identifier based on the settings

Parameters:
text - The text to uppercase
Returns:
The uppercased text

uppercaseKeywordOrBif

public String uppercaseKeywordOrBif(String text)
Uppercases a keyword or BIF based on the settings

Parameters:
text - The text to uppercase
Returns:
The uppercased text

Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.