Edit D:\app\Administrator\product\11.2.0\dbhome_1\olap\api\doc\oracle\olapi\HasLocalizedMessage.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.5.0_17) on Wed Aug 12 19:50:19 UTC 2009 --> <TITLE> HasLocalizedMessage (Oracle OLAP Java API Reference) </TITLE> <META NAME="keywords" CONTENT="oracle.olapi.HasLocalizedMessage interface"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="HasLocalizedMessage (Oracle OLAP Java API Reference)"; } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> <b>Oracle® OLAP Java API Reference<br>11<i>g</i> Release 2 (11.2)</b><br>E10794-01<br>Beta Draft</EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../oracle/olapi/BatchedException.html" title="class in oracle.olapi"><B>PREV CLASS</B></A> <A HREF="../../oracle/olapi/OLAPIException.html" title="class in oracle.olapi"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html?oracle/olapi/HasLocalizedMessage.html" target="_top"><B>FRAMES</B></A> <A HREF="HasLocalizedMessage.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> oracle.olapi</FONT> <BR> Interface HasLocalizedMessage</H2> <DL> <DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../oracle/olapi/transaction/ActiveSubtransactionsException.html" title="class in oracle.olapi.transaction">ActiveSubtransactionsException</A>, <A HREF="../../oracle/olapi/BatchedException.html" title="class in oracle.olapi">BatchedException</A>, <A HREF="../../oracle/olapi/data/source/BuildWarningsException.html" title="class in oracle.olapi.data.source">BuildWarningsException</A>, <A HREF="../../oracle/olapi/transaction/CommitException.html" title="class in oracle.olapi.transaction">CommitException</A>, <A HREF="../../oracle/olapi/transaction/CommitWarningsException.html" title="class in oracle.olapi.transaction">CommitWarningsException</A>, <A HREF="../../oracle/olapi/data/source/CursorLockException.html" title="class in oracle.olapi.data.source">CursorLockException</A>, <A HREF="../../oracle/olapi/data/source/DataProviderMismatchException.html" title="class in oracle.olapi.data.source">DataProviderMismatchException</A>, <A HREF="../../oracle/olapi/metadata/deployment/DeploymentException.html" title="class in oracle.olapi.metadata.deployment">DeploymentException</A>, <A HREF="../../oracle/olapi/metadata/DuplicateMetadataIDException.html" title="class in oracle.olapi.metadata">DuplicateMetadataIDException</A>, <A HREF="../../oracle/express/ErrorDescription.html" title="class in oracle.express">ErrorDescription</A>, <A HREF="../../oracle/express/ErrorStack.html" title="class in oracle.express">ErrorStack</A>, <A HREF="../../oracle/express/ExpressServerException.html" title="class in oracle.express">ExpressServerException</A>, <A HREF="../../oracle/olapi/data/source/IncorrectDataValueException.html" title="class in oracle.olapi.data.source">IncorrectDataValueException</A>, <A HREF="../../oracle/olapi/transaction/IncrementalChangeException.html" title="class in oracle.olapi.transaction">IncrementalChangeException</A>, <A HREF="../../oracle/olapi/metadata/InvalidMetadataException.html" title="class in oracle.olapi.metadata">InvalidMetadataException</A>, <A HREF="../../oracle/olapi/metadata/MetadataFactoryException.html" title="class in oracle.olapi.metadata">MetadataFactoryException</A>, <A HREF="../../oracle/olapi/metadata/MetadataModificationException.html" title="class in oracle.olapi.metadata">MetadataModificationException</A>, <A HREF="../../oracle/olapi/metadata/MetadataRenameNotSupportedException.html" title="class in oracle.olapi.metadata">MetadataRenameNotSupportedException</A>, <A HREF="../../oracle/olapi/metadata/MetadataUpdateNotSupportedException.html" title="class in oracle.olapi.metadata">MetadataUpdateNotSupportedException</A>, <A HREF="../../oracle/olapi/transaction/NotCommittableException.html" title="class in oracle.olapi.transaction">NotCommittableException</A>, <A HREF="../../oracle/olapi/transaction/NotPreparedException.html" title="class in oracle.olapi.transaction">NotPreparedException</A>, <A HREF="../../oracle/express/ObjectClosedException.html" title="class in oracle.express">ObjectClosedException</A>, <A HREF="../../oracle/olapi/OLAPIException.html" title="class in oracle.olapi">OLAPIException</A>, <A HREF="../../oracle/olapi/OLAPIIllegalStateException.html" title="class in oracle.olapi">OLAPIIllegalStateException</A>, <A HREF="../../oracle/olapi/OLAPIRuntimeException.html" title="class in oracle.olapi">OLAPIRuntimeException</A>, <A HREF="../../oracle/olapi/data/source/ServerVersionException.html" title="class in oracle.olapi.data.source">ServerVersionException</A>, <A HREF="../../oracle/olapi/syntax/SyntaxException.html" title="class in oracle.olapi.syntax">SyntaxException</A>, <A HREF="../../oracle/express/TaskInterruptedException.html" title="class in oracle.express">TaskInterruptedException</A>, <A HREF="../../oracle/olapi/transaction/TransactionalObjectInvalidException.html" title="class in oracle.olapi.transaction">TransactionalObjectInvalidException</A>, <A HREF="../../oracle/olapi/transaction/TransactionInactiveException.html" title="class in oracle.olapi.transaction">TransactionInactiveException</A>, <A HREF="../../oracle/olapi/transaction/TransactionTypeUnavailableException.html" title="class in oracle.olapi.transaction">TransactionTypeUnavailableException</A>, <A HREF="../../oracle/express/UnexpectedException.html" title="class in oracle.express">UnexpectedException</A>, <A HREF="../../oracle/olapi/data/source/UnmatchedInputsException.html" title="class in oracle.olapi.data.source">UnmatchedInputsException</A>, <A HREF="../../oracle/olapi/UnsupportedOperationException.html" title="class in oracle.olapi">UnsupportedOperationException</A>, <A HREF="../../oracle/olapi/transaction/WriteLockException.html" title="class in oracle.olapi.transaction">WriteLockException</A></DD> </DL> <HR> <DL> <DT><PRE>public interface <B>HasLocalizedMessage</B></DL> </PRE> <P> An interface for an <code>Exception</code> that can provide its message in a language that is appropriate to a specified <code>Locale</code>. This interface is implemented by <code>Exception</code> classes that are generated by the OLAP API client software, not by those generated by the server-side software. <p> To find out if an <code>Exception</code> implements this interface, use the <code>instanceof</code> operator. <ul> <li>If the <code>Exception</code> implements this interface, then you can call its <code>getLocalizedMessage</code> method and provide a <code>Locale</code> as a input parameter. </li> <li>If the <code>Exception</code> does not implement this interface, then you can still call its <code>getLocalizedMessage</code> method, which it inherits from the <code>Throwable</code> class, but without specifying a <code>Locale</code>. The message is returned in the language of the default <code>Locale</code> for the Java Virtual Machine in which the OLAP API application is running. </li> </ul> The following code illustrates the use of the <code>getLocalizedMessage</code> method. The example creates a <code>Locale</code> object, and then tries to create an <code>MdmValueHierarchy</code>. The <code>mdmDim</code> object is an <code>MdmPrimaryDimension</code> that has <code>mdmLevelHier</code> as one of its <code>MdmLevelHierarchy</code> components. If <code>mdmLevelHier</code> is mapped to a solved level hierarchy, then the operation succeeds. If it is mapped to an unsolved level hierarchy, then the <code>createValueHierarchy</code> method throws a <code>MetadataFactoryException</code>. <pre> // Specify a Locale. Locale myLocale = new Locale("fr", "CA"); try { MdmValueHierarchy mdmValHier = mdmDim.createValueHierarchy("ValueHier", mdmLevelHier); } catch (Exception e) { String msg = null; if (e instanceof HasLocalizedMessage) { // Get the localized message. msg = ((HasLocalizedMessage) e).getLocalizedMessage(myLocale); } else { // Use the default Locale. msg = e.getLocalizedMessage(); } // Handle the exception. } </pre> You can also use the <code>toString</code> method, instead of the <code>getLocalizedMessage</code> method, to get the message from an <code>Exception</code> in the language of the default <code>Locale</code> for the Java Virtual Machine in which the OLAP API application is running, as in the following. <pre> System.err.println(e.toString());</pre> <P> <P> <HR> <P> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../oracle/olapi/HasLocalizedMessage.html#getLocalizedMessage(java.util.Locale)">getLocalizedMessage</A></B>(java.util.Locale locale)</CODE> <BR> Gets a message in the language of the specified <code>Locale</code>.</TD> </TR> </TABLE> <P> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="getLocalizedMessage(java.util.Locale)"><!-- --></A><H3> getLocalizedMessage</H3> <PRE> java.lang.String <B>getLocalizedMessage</B>(java.util.Locale locale)</PRE> <DL> <DD>Gets a message in the language of the specified <code>Locale</code>. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>locale</CODE> - A <code>Locale</code> object, which indicates the language in which the message should be rendered. <DT><B>Returns:</B><DD>A <code>String</code> that contains the message for this <code>Exception</code>. The message is in the language of the specified <code>Locale</code>.</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> <center>Copyright © 2002, 2009, Oracle. All rights reserved.</center></EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../oracle/olapi/BatchedException.html" title="class in oracle.olapi"><B>PREV CLASS</B></A> <A HREF="../../oracle/olapi/OLAPIException.html" title="class in oracle.olapi"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html?oracle/olapi/HasLocalizedMessage.html" target="_top"><B>FRAMES</B></A> <A HREF="HasLocalizedMessage.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de