KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > oracle > toplink > essentials > internal > parsing > ejbql > EJBQLParserFactory


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the "License"). You may not use this file except
5  * in compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * glassfish/bootstrap/legal/CDDLv1.0.txt or
9  * https://glassfish.dev.java.net/public/CDDLv1.0.html.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * HEADER in each file and include the License file at
15  * glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable,
16  * add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your
18  * own identifying information: Portions Copyright [yyyy]
19  * [name of copyright owner]
20  */

21 // Copyright (c) 1998, 2006, Oracle. All rights reserved.
22
/* Copyright (c) 2005, 2006, Oracle. All rights reserved. */
23
24 /*
25    DESCRIPTION
26     Created to remove EJBQLCall's Antlr.jar compile dependency.
27
28    MODIFIED (MM/DD/YY)
29     gyorke 03/10/06 -
30     pkrogh 10/07/05 -
31     pkrogh 09/29/05 -
32     tware 09/22/05 -
33     gyorke 08/09/05 - gyorke_10-essentials-directory-creation_050808
34     dmahar 08/05/05 -
35     cdelahun 04/29/05 - cdelahun_10_main_4324564_050429
36     cdelahun 04/29/05 - Creation
37  */

38
39 package oracle.toplink.essentials.internal.parsing.ejbql;
40
41 import oracle.toplink.essentials.internal.parsing.EJBQLParseTree;
42 import oracle.toplink.essentials.queryframework.ObjectLevelReadQuery;
43 import oracle.toplink.essentials.internal.sessions.AbstractSession;
44
45 public class EJBQLParserFactory
46 {
47   public EJBQLParserFactory(){}
48   
49   public EJBQLParser buildParserFor(String JavaDoc ejbqlString){
50     return EJBQLParserBase.buildParserFor(ejbqlString);
51   }
52   public EJBQLParser parseEJBQLString(String JavaDoc ejbqlString){
53     return EJBQLParserBase.parseEJBQLString(ejbqlString);
54   }
55
56   /**
57    * Populate the query using the information retrieved from parsing the EJBQL.
58    */

59   public void populateQuery(String JavaDoc ejbqlString, ObjectLevelReadQuery theQuery, AbstractSession session){
60     EJBQLParser parser = EJBQLParserBase.parseEJBQLString(ejbqlString);
61     EJBQLParseTree parseTree = (EJBQLParseTree)parser.getParseTree();
62     parseTree.populateQuery(theQuery, session);
63   }
64   
65 }
66
Popular Tags