1 /*
2 Copyright (C) 2006 Grid Systems, S.A.
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 package nextgrid.api.pom;
19
20 import java.io.Serializable;
21
22 /**
23 * Encapsulates a single query in a specific query language.
24 *
25 * @see QueryProfile
26 * @author Rodrigo Ruiz
27 */
28 public final class Query implements Serializable {
29
30 /**
31 * <code>serialVersionUID</code> attribute.
32 */
33 private static final long serialVersionUID = -140189632810221716L;
34
35 /**
36 * The query language.
37 */
38 private String lang;
39
40 /**
41 * The query text.
42 */
43 private String text;
44
45 /**
46 * Creates a new instance.
47 *
48 * @param lang The query language identifier
49 * @param text The query text
50 */
51 public Query(String lang, String text) {
52 this.lang = lang;
53 this.text = text;
54 }
55
56 /**
57 * Gets the language value.
58 * @return The language
59 */
60 public String getLang() {
61 return this.lang;
62 }
63
64 /**
65 * Gets the text value.
66 * @return The text
67 */
68 public String getText() {
69 return this.text;
70 }
71
72 }