|
Oracle® Globalization Development Kit Java API Reference 10g Release 2 (10.2) Part No. B14224-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.i18n.util.OraSQLUtil
The OraSQLUtil
class is an Oracle SQL utility class.
The following functionality is available in this class:
\[0-9A-Z]{4}
, for the UNISTR
functionMethod Summary | |
static String |
escapeUNISTR(String str, String dbCharset) Escapes the string into UNISTR form if the character is not supported by the database character set. |
static boolean |
isValidIdentifier(String srcstr, String dbCharset) Checks if the string is valid in the database character set. |
static boolean |
synchronizeLocale(Locale locale, Connection con) Synchronizes the session NLS parameters with the locale. |
static boolean |
synchronizeLocale(String oralanguage, String oraterritory, Connection con) Synchronizes the database session NLS parameters with the Oracle language and territory names. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static boolean isValidIdentifier(String srcstr, String dbCharset) throws UnsupportedEncodingException
srcstr
- a string to be examineddbCharset
- Oracle database character set nametrue
if the data is valid in the database character set, otherwise false
UnsupportedEncodingException
- if the dbCharset
parameter is invalidpublic static String escapeUNISTR(String str, String dbCharset) throws UnsupportedEncodingException
UNISTR
form if the character is not supported by the database character set.str
- a string to be examineddbCharset
- Oracle database character set nameUNISTR
string containing Unicode escaped form if the character is not supported by the character setUnsupportedEncodingException
- if the dbCharset
parameter is invalidpublic static boolean synchronizeLocale(Locale locale, Connection con) throws SQLException
This executes ALTER SESSION
SQL commands to set NLS session parameters to synchronize the locale and attributes in this object. The following session parameters are updated:
locale
- Java locale objectcon
- database connectiontrue
if successful, otherwise false
SQLException
- if a SQL exception occurspublic static boolean synchronizeLocale(String oralanguage, String oraterritory, Connection con) throws SQLException
This executes ALTER SESSION
SQL commands to set NLS session parameters to synchronize the locale and attributes in this object. The following session parameters are updated:
oralanguage
- Oracle language nameoraterritory
- Oracle territory namecon
- database connectiontrue
if successful, otherwise false
SQLException
- if a SQL exception occurs
|
Oracle® Globalization Development Kit Java API Reference 10g Release 2 (10.2) Part No. B14224-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |