2. Using the Tutorial Examples 3. Getting Started with Web Applications 5. JavaServer Pages Technology 7. JavaServer Pages Standard Tag Library 10. JavaServer Faces Technology 11. Using JavaServer Faces Technology in JSP Pages 12. Developing with JavaServer Faces Technology 13. Creating Custom UI Components 14. Configuring JavaServer Faces Applications 15. Internationalizing and Localizing Web Applications 16. Building Web Services with JAX-WS 17. Binding between XML Schema and Java Classes 19. SOAP with Attachments API for Java 21. Getting Started with Enterprise Beans 23. A Message-Driven Bean Example 24. Introduction to the Java Persistence API 25. Persistence in the Web Tier 26. Persistence in the EJB Tier 27. The Java Persistence Query Language Queries That Navigate to Related Entities A Simple Query with Relationships Navigating to Single-Valued Relationship Fields Traversing Relationships with an Input Parameter Traversing Multiple Relationships Navigating According to Related Fields Queries with Other Conditional Expressions BNF Grammar of the Java Persistence Query Language Operators and Their Precedence Empty Collection Comparison Expressions 28. Introduction to Security in the Java EE Platform 29. Securing Java EE Applications 31. The Java Message Service API 32. Java EE Examples Using the JMS API 36. The Coffee Break Application | Simplified Query Language SyntaxThis section briefly describes the syntax of the query language so that youcan quickly move on to the next section,Example Queries. When you areready to learn about the syntax in more detail, see the sectionFull Query Language Syntax. Select StatementsA select query has six clauses:SELECT,FROM,WHERE,GROUP BY,HAVING, andORDER BY. TheSELECT andFROM clauses are required, but theWHERE,GROUP BY,HAVING,andORDER BY clauses are optional. Here is the high-level BNF syntax of aquery language query: QL_statement ::= select_clause from_clause [where_clause][groupby_clause][having_clause][orderby_clause] TheSELECT clause defines the types of the objects or values returned bythe query. TheFROM clause defines the scope of the query by declaring one ormore identification variables, which can be referenced in theSELECT andWHERE clauses. Anidentification variable represents one of the following elements:
TheWHERE clause is a conditional expression that restricts the objects or valuesretrieved by the query. Although it is optional, most queries have aWHEREclause. TheGROUP BY clause groups query results according to a set of properties. TheHAVING clause is used with theGROUP BY clause to further restrict thequery results according to a conditional expression. TheORDER BY clause sorts the objects or values returned by the query intoa specified order. Update and Delete StatementsUpdate and delete statements provide bulk operations over sets of entities. They havethe following syntax: update_statement :: = update_clause [where_clause] delete_statement :: = delete_clause [where_clause] The update and delete clauses determine the type of the entities to beupdated or deleted. TheWHERE clause may be used to restrict the scopeof the update or delete operation. Copyright © 2010, Oracle and/or its affiliates. All rights reserved.Legal Notices |