KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > petals > binding > xquarebc > query > StoredQuery


1 /**
2  * PETALS - PETALS Services Platform.
3  * Copyright (c) 2005 EBM Websourcing, http://www.ebmwebsourcing.com/
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * -------------------------------------------------------------------------
19  * $Id : $
20  * -------------------------------------------------------------------------
21  */

22 package org.objectweb.petals.binding.xquarebc.query;
23
24 import java.util.HashMap JavaDoc;
25
26 /**
27  * This bean represents an instance of a parameterized stored query
28  * (NB. akin to an SQL "select").
29  * Is typically instanciated an filled according to the contents
30  * of a "storedQuery" message sent to a XQuareBC-deployed service.
31  *
32  * @version $Rev: 250 $Date: {date}
33  * @since Petals 1.0
34  * @author Marc Dutoo - Open Wide
35  *
36  */

37 public class StoredQuery {
38     private String JavaDoc id;
39     private String JavaDoc statement;
40     private HashMap JavaDoc<String JavaDoc, String JavaDoc> parameterMap;
41     
42     /**
43      * Creates a new instance of a parameterized stored query
44      *
45      */

46     public StoredQuery() {
47         
48     }
49
50     /**
51      *
52      * @return the stored query's id (must be consistent with the
53      * service unit's configuration)
54      */

55     public String JavaDoc getId() {
56         return id;
57     }
58     public void setId(String JavaDoc id) {
59         this.id = id;
60     }
61     /**
62      *
63      * @return the stored query's parameter values (must be
64      * consistent with the stored query's XQuery code in the
65      * service unit's configuration)
66      */

67     public HashMap JavaDoc<String JavaDoc, String JavaDoc> getParameterMap() {
68         return parameterMap;
69     }
70     public void setParameterMap(HashMap JavaDoc<String JavaDoc, String JavaDoc> parameterMap) {
71         this.parameterMap = parameterMap;
72     }
73     /**
74      *
75      * @return the stored query's XQuery statement
76      */

77     public String JavaDoc getStatement() {
78         return statement;
79     }
80     public void setStatement(String JavaDoc statement) {
81         this.statement = statement;
82     }
83 }
84
Popular Tags