⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ejbql5.html

📁 j2eePDF格式的电子书
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">  <head>    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />    <meta http-equiv="Content-Style-Type" content="text/css" />    <title>Full Syntax</title>    <link rel="StyleSheet" href="document.css" type="text/css" media="all" />    <link rel="StyleSheet" href="catalog.css" type="text/css" media="all" />    <link rel="Table of Contents" href="J2EETutorialTOC.html" />    <link rel="Previous" href="EJBQL4.html" />    <link rel="Next" href="EJBQL6.html" />    <link rel="Index" href="J2EETutorialIX.html" />  </head>  <body>    <table width="550" summary="layout" id="SummaryNotReq1">      <tr>	<td align="left" valign="center">	<font size="-1">	<a href="http://java.sun.com/j2ee/1.4/download.html#tutorial" target="_blank">Download</a>	<br>	<a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/faq.html" target="_blank">FAQ</a>	<br>	<a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/history.html" target="_blank">History</a>	</td>        <td align="center" valign="center"><a accesskey="p" href="EJBQL4.html"><img id="LongDescNotReq1" src="images/PrevArrow.gif" width="26" height="26" border="0" alt="Prev" /></a><a accesskey="c" href="J2EETutorialFront.html"><img id="LongDescNotReq1" src="images/UpArrow.gif" width="26" height="26" border="0" alt="Home" /></a><a accesskey="n" href="EJBQL6.html"><img id="LongDescNotReq3" src="images/NextArrow.gif" width="26" height="26" border="0" alt="Next" /></a><a accesskey="i" href="J2EETutorialIX.html"></a>        </td>	<td align="right" valign="center">	<font size="-1">	<a href="http://java.sun.com/j2ee/1.4/docs/api/index.html" target="_blank">API</a>	<br>	<a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/search.html" target="_blank">Search</a>	<br>	<a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/sendusmail.html" target="_blank">Feedback</a></font>	</font>	</td>      </tr>    </table>    <img src="images/blueline.gif" width="550" height="8" ALIGN="BOTTOM" NATURALSIZEFLAG="3" ALT="Divider">    <blockquote><a name="wp79882"> </a><h2 class="pHeading1">Full Syntax</h2><a name="wp79883"> </a><p class="pBody">This section discusses the EJB QL syntax, as defined in the Enterprise JavaBeans Specification. Much of the following material paraphrases or directly quotes the specification.</p><a name="wp79884"> </a><h3 class="pHeading2">BNF Symbols</h3><a name="wp79929"> </a><p class="pBody"><a  href="EJBQL5.html#wp79894">Table 24-1</a> describes the BNF symbols used in this chapter.</p><div align="left"><table border="1" summary="BNF Symbol Summary" id="wp79894">  <caption><a name="wp79894"> </a><div class="pTableTitle">Table 24-1   BNF Symbol Summary&nbsp;</div></caption>  <tr align="center">    <th><a name="wp79898"> </a><div class="pCellHeading">Symbol</div></th>    <th><a name="wp79900"> </a><div class="pCellHeading">Description</div></th></tr>  <tr align="left">    <td><a name="wp79902"> </a><div class="pCellBody">::=</div></td>    <td><a name="wp79904"> </a><div class="pCellBody">The element to the left of the symbol is defined by the constructs on the right.</div></td></tr>  <tr align="left">    <td><a name="wp79906"> </a><div class="pCellBody">*</div></td>    <td><a name="wp79908"> </a><div class="pCellBody">The preceding construct may occur zero or more times.</div></td></tr>  <tr align="left">    <td><a name="wp79910"> </a><div class="pCellBody">{...}</div></td>    <td><a name="wp79912"> </a><div class="pCellBody">The constructs within the curly braces are grouped together.</div></td></tr>  <tr align="left">    <td><a name="wp79914"> </a><div class="pCellBody">[...]</div></td>    <td><a name="wp79916"> </a><div class="pCellBody">The constructs within the square brackets are optional.</div></td></tr>  <tr align="left">    <td><a name="wp79918"> </a><div class="pCellBody">|</div></td>    <td><a name="wp79920"> </a><div class="pCellBody">An exclusive OR.</div></td></tr>  <tr align="left">    <td><a name="wp79922"> </a><div class="pCellBody">BOLDFACE</div></td>    <td><a name="wp79924"> </a><div class="pCellBody">A keyword (although capitalized in the BNF diagram, keywords are not case sensitive).</div></td></tr>  <tr align="left">    <td><a name="wp79926"> </a><div class="pCellBody">Whitespace</div></td>    <td><a name="wp79928"> </a><div class="pCellBody">A whitespace character can be a space, horizontal tab, or line feed.</div></td></tr></table></div><p class="pBody"></p><a name="wp79931"> </a><h3 class="pHeading2">BNF Grammar of EJB QL</h3><a name="wp79933"> </a><p class="pBody">Here is the entire BNF diagram for EJB QL:</p><div class="pPreformattedRelative"><pre class="pPreformattedRelative">EJB QL ::= select_clause from_clause [where_clause] [orderby_clause]from_clause ::=<code class="cCodeBold">FROM</code> identification_variable_declaration    [, identification_variable_declaration]*identification_variable_declaration ::= collection_member_declaration |    range_variable_declarationcollection_member_declaration ::= <code class="cCodeBold">IN</code> ( collection_valued_path_expression) [<code class="cCodeBold">AS</code> ] identifierrange_variable_declaration ::=     abstract_schema_name [<code class="cCodeBold">AS</code> ] identifiercmp_path_expression ::=    {identification_variable |     single_valued_cmr_path_expression}.cmp_fieldsingle_valued_cmr_path_expression ::=    identification_variable.[single_valued_cmr_field.]*     single_valued_cmr_fieldsingle_valued_path_expression ::=    cmp_path_expression | single_valued_cmr_path_expressioncollection_valued_path_expression ::=    identification_variable.[single_valued_cmr_field.]    *collection_valued_cmr_fieldselect_clause ::= <code class="cCodeBold">SELECT</code> [<code class="cCodeBold">DISTINCT</code> ] {select_expression     |<code class="cCodeBold">OBJECT</code>( identification_variable) }select_expression ::= single_valued_path_expression | aggregate_select_expressionaggregate_select_expression ::=    {<code class="cCodeBold">AVG</code> |<code class="cCodeBold">MAX</code> |<code class="cCodeBold">MIN</code> |<code class="cCodeBold">SUM</code> |<code class="cCodeBold">COUNT</code> }( [<code class="cCodeBold">DISTINCT</code> ]     cmp_path_expression) |    <code class="cCodeBold">COUNT</code> ( [<code class="cCodeBold">DISTINCT</code> ] identification_variable |     single_valued_cmr_path_expression)where_clause ::= <code class="cCodeBold">WHERE</code> conditional_expressionconditional_expression ::= conditional_term |    conditional_expression <code class="cCodeBold">OR</code> conditional_termconditional_term ::= conditional_factor |     conditional_term <code class="cCodeBold">AND</code> conditional_factorconditional_factor ::= [<code class="cCodeBold">NOT</code> ] conditional_primaryconditional_primary ::= simple_cond_expression |     (conditional_expression)simple_cond_expression ::=    comparison_expression | between_expression |     like_expression | in_expression |    null_comparison_expression |    empty_collection_comparison_expression |    collection_member_expressionbetween_expression ::=    arithmetic_expression [<code class="cCodeBold">NOT</code> ]<code class="cCodeBold">BETWEEN</code>    arithmetic_expression <code class="cCodeBold">AND</code> arithmetic_expressionin_expression ::=    cmp_path_expression [<code class="cCodeBold">NOT</code> ] <code class="cCodeBold">IN</code>    ( {literal | input_parameter}     [, { literal | input_parameter} ]*)like_expression ::=    cmp_path_expression [<code class="cCodeBold">NOT</code> ] <code class="cCodeBold">LIKE</code>     pattern_value [<code class="cCodeBold">ESCAPE</code> escape_character]    null_comparison_expression ::=    {single_valued_path_expression |     input_parameter}<code class="cCodeBold">IS</code> [<code class="cCodeBold">NOT</code> ] <code class="cCodeBold">NULL</code>empty_collection_comparison_expression ::=    collection_valued_path_expression <code class="cCodeBold">IS</code> [<code class="cCodeBold">NOT</code>] <code class="cCodeBold">EMPTY</code>collection_member_expression ::=    {single_valued_cmr_path_expression |     identification_variable | input_parameter}    [<code class="cCodeBold">NOT</code> ] <code class="cCodeBold">MEMBER</code> [<code class="cCodeBold">OF</code> ] collection_valued_path_expressioncomparison_expression ::=    string_value comparison_operator string_expression |    boolean_value {= |&lt;&gt; } boolean_expression} |    datetime_value comparison_operator datetime_expression |    entity_bean_value {= |&lt;&gt; } entity_bean_expression |    arithmetic_value comparison_operator arithmetic_expressionarithmetic_value ::= cmp_path_expression |     functions_returning_numericscomparison_operator ::=     = |&gt; |&gt;= |&lt; |&lt;= |&lt;&gt;arithmetic_expression ::= arithmetic_term |    arithmetic_expression {+ |- } arithmetic_termarithmetic_term ::= arithmetic_factor |     arithmetic_term {* |/ } arithmetic_factorarithmetic_factor ::= [{+ |- }] arithmetic_primaryarithmetic_primary ::= cmp_path_expression | literal |    (arithmetic_expression) | input_parameter |    functions_returning_numericsstring_value ::= cmp_path_expression |     functions_returning_stringsstring_expression ::= string_primary | input_parameterstring_primary ::= cmp_path_expression | literal |    (string_expression) | functions_returning_stringsdatetime_value ::= cmp_path_expressiondatetime_expression ::= datetime_value | input_parameterboolean_value ::= cmp_path_expressionboolean_expression ::= cmp_path_expression | literal |    input_parameterentity_bean_value ::= single_valued_cmr_path_expression |    identification_variableentity_bean_expression ::= entity_bean_value | input_parameterfunctions_returning_strings ::=    <code class="cCodeBold">CONCAT</code>( string_expression, string_expression) |    <code class="cCodeBold">SUBSTRING</code>( string_expression, arithmetic_expression,    arithmetic_expression)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -