Skip Headers

Oracle9iAS TopLink Foundation Library Guide
Release 2 (9.0.3)

Part Number B10064-01
Go To Documentation Library
Home
Go To Solution Area
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to next page

D
EJBQL Syntax

Oracle TopLink supports the syntax for EJBQL as described in the Enterprise JavaBeans Specification v2.0. This section discusses the syntax for implementing EJBQL.

About Backus Naur Form

Backus Naur Form (BNF) is a formal notation used to describe the syntax of a given language. It includes the following elements:

Table D-1 BNF notation elements  
Element Use

::=

meaning "is defined as"

|

meaning "or"

< >

angle brackets used to contain the name of undefined elements. For example, consider the following code

<INSTALL_DIR>\TopLink\core\sessions_4_5.dtd

The angle brackets indicate that the text within is not defined by the code, but rather, requires the user to insert the appropriate string.

[ ]

optional elements

[ ]*

optional elements of which type there can be 0-n.

{ }+

elements, of which type there can be 1-n.

EJBQL language definition

The syntax for EJBQL is defined in the Enterprise JavaBeans Specification v2.0 The following is the EJBQL BNF extracted from the Enterprise JavaBeans Specification Version 2.0 dated July, 2001.

EJB QL ::= select_clause from_clause [where_clause]

from_clause ::= FROM identification_variable_declaration [, identification_
variable_declaration]*

   identification_variable_declaration ::=

      collection_member_declaration |
      range_variable_declaration

   collection_member_declaration ::= 

      IN (collection_valued_path_expression) [AS ] identifier

   range_variable_declaration ::=

      abstract_schema_name [AS ] identifier

   single_valued_path_expression ::= {

      single_valued_navigation |
      identification_variable}.cmp_field |
      single_valued_navigation

   single_valued_navigation ::=

      identification_variable.[single_valued_cmr_
field.]* single_valued_cmr_field collection_valued_path_expression ::= identification_variable.[single_valued_cmr_
field.]* collection_valued_cmr_field select_clause ::= SELECT [DISTINCT ] { single_valued_path_expression | OBJECT (identification_variable)} where_clause ::= WHERE conditional_expression conditional_expression ::= conditional_term | conditional_expression OR conditional_term conditional_term ::= conditional_factor | conditional_term AND conditional_factor conditional_factor ::= [NOT ] conditional_test conditional_test :: = conditional_primary conditional_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_expression between_expression ::= arithmetic_expression [NOT] BETWEEN arithmetic_expression AND arithmetic_expression in_expression ::= single_valued_path_expression [NOT] IN (string_literal [, string_literal]* ) like_expression ::= single_valued_path_expression [NOT] LIKE pattern_value [ESCAPE escape-character] null_comparison_expression ::= single_valued_path_expression IS [NOT] NULL empty_collection_comparison_expression ::= collection_valued_path_expression IS [NOT] EMPTY collection_member_expression ::= { single_valued_navigation | identification_variable | input_parameter} [NOT] MEMBER [OF] collection_valued_path_expression comparison_expression ::= string_value { =|<>} string_expression | boolean_value { =|<>} boolean_expression} | datetime_value { = | <> | > | < } datetime_expression | entity_bean_value { = | <> } entity_bean_expression | arithmetic_value comparison_operator single_value_designator arithmetic_value ::= single_valued_path_expression | functions_returning_numerics single_value_designator ::= scalar_expression comparison_operator ::= = | > | >= | < | <= | <> scalar_expression ::= arithmetic_expression arithmetic_expression ::= arithmetic_term | arithmetic_expression { + | - } arithmetic_term arithmetic_term ::= arithmetic_factor | arithmetic_term { * | / } arithmetic_factor arithmetic_factor ::= { + |- } arithmetic_primary arithmetic_primary ::= single_valued_path_expression | literal | (arithmetic_expression) | input_parameter | functions_returning_numerics string_value ::= single_valued_path_expression | functions_returning_strings string_expression ::= string_primary | input_expression string_primary ::= single_valued_path_expression | literal | (string_expression) | functions_returning_strings datetime_value ::= single_valued_path_expression datetime_expression ::= datetime_value | input_parameter boolean_value ::= single_valued_path_expression boolean_expression ::= single_valued_path_expression | literal | input_parameter entity_bean_value ::= single_valued_navigation | identification_variable entity_bean_expression ::= entity_bean_value | input_parameter functions_returning_strings ::= CONCAT (string_expression, string_expression) | SUBSTRING (string_expression, arithmetic_expression, arithmetic_ expression) functions_returning_numerics::= LENGTH (string_expression) | LOCATE (string_expression, string_expression[, arithmetic_expression]) | ABS (arithmetic_expression) | SQRT (arithmetic_expression)

Go to previous page Go to next page
Oracle
Copyright © 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Solution Area
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index