View Javadoc
1   /*
2    * Copyright (C) 2003-2011 eXo Platform SAS.
3    *
4    * This program is free software; you can redistribute it and/or
5    * modify it under the terms of the GNU Affero General Public License
6    * as published by the Free Software Foundation; either version 3
7    * of the License, or (at your option) any later version.
8    *
9    * This program 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
12   * GNU General Public License for more details.
13   *
14   * You should have received a copy of the GNU General Public License
15   * along with this program; if not, see<http://www.gnu.org/licenses/>.
16   */
17  package org.exoplatform.services.wcm.search.base;
18  
19  import javax.jcr.query.Query;
20  
21  /**
22   * Created by The eXo Platform SAS
23   * Author : Nguyen Anh Vu
24   *          anhvurz90@gmail.com
25   * Jun 17, 2011  
26   */
27  public class QueryData {
28    
29    private String queryStatement_;
30    private String workSpace_;
31    private String language_ = Query.SQL;
32    private boolean isSystemSession_ = false;
33    private long offset_ = 0;
34    
35    public QueryData(String queryStatement, String workspace, String language, boolean isSystemSession) {
36      queryStatement_ = queryStatement;
37      workSpace_ = workspace;
38      language_ = language;
39      isSystemSession_ = isSystemSession;
40    }
41    
42    public QueryData(String queryStatement, String workspace, String language, boolean isSystemSession, long offset) {
43      this(queryStatement, workspace, language, isSystemSession);
44      this.offset_ = offset;
45    }
46    
47    public String getQueryStatement() {
48      return queryStatement_;
49    }
50    public void setQueryStatement(String queryStatement) {
51      queryStatement_ = queryStatement;
52    }
53    public String getWorkSpace() {
54      return workSpace_;
55    }
56    public void setWorkSpace(String workSpace) {
57      workSpace_ = workSpace;
58    }
59    public boolean isSystemSession() {
60      return isSystemSession_;
61    }
62    public void setSystemSession(boolean isSystemSession) {
63      isSystemSession_ = isSystemSession;
64    }
65    public String getLanguage_() {
66      return language_;
67    }
68    public void setLanguage_(String language) {
69      language_ = language;
70    }
71    
72    public long getOffset() {
73      return offset_;
74    }
75    
76    public void setOffset(long offset) {
77      this.offset_ = offset;
78    }
79    
80    public QueryData clone() {
81      return new QueryData(queryStatement_, workSpace_, language_, isSystemSession_, offset_);
82    }
83  
84  }