1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.kernel.search;
16  
17  import com.liferay.portal.kernel.dao.orm.QueryUtil;
18  
19  import java.io.Serializable;
20  
21  import java.util.Map;
22  
23  /**
24   * <a href="SearchContext.java.html"><b><i>View Source</i></b></a>
25   *
26   * @author Brian Wing Shun Chan
27   */
28  public class SearchContext implements Serializable {
29  
30      public Serializable getAttribute(String name) {
31          return _attributes.get(name);
32      }
33  
34      public Map<String, Serializable> getAttributes() {
35          return _attributes;
36      }
37  
38      public BooleanClause[] getBooleanClauses() {
39          return _booleanClauses;
40      }
41  
42      public long[] getCategoryIds() {
43          return _categoryIds;
44      }
45  
46      public long getCompanyId() {
47          return _companyId;
48      }
49  
50      public int getEnd() {
51          return _end;
52      }
53  
54      public long[] getFolderIds() {
55          return _folderIds;
56      }
57  
58      public long getGroupId() {
59          return _groupId;
60      }
61  
62      public String getKeywords() {
63          return _keywords;
64      }
65  
66      public long[] getNodeIds() {
67          return _nodeIds;
68      }
69  
70      public long getOwnerUserId() {
71          return _ownerUserId;
72      }
73  
74      public Sort[] getSorts() {
75          return _sorts;
76      }
77  
78      public int getStart() {
79          return _start;
80      }
81  
82      public long getUserId() {
83          return _userId;
84      }
85  
86      public boolean isScopeStrict() {
87          return _scopeStrict;
88      }
89  
90      public void setAttribute(String name, Serializable value) {
91          _attributes.put(name, value);
92      }
93  
94      public void setAttributes(Map<String, Serializable> attributes) {
95          _attributes = attributes;
96      }
97  
98      public void setBooleanClauses(BooleanClause[] booleanClauses) {
99          _booleanClauses = booleanClauses;
100     }
101 
102     public void setCategoryIds(long[] categoryIds) {
103         _categoryIds = categoryIds;
104     }
105 
106     public void setCompanyId(long companyId) {
107         _companyId = companyId;
108     }
109 
110     public void setEnd(int end) {
111         _end = end;
112     }
113 
114     public void setFolderIds(long[] folderIds) {
115         _folderIds = folderIds;
116     }
117 
118     public void setGroupId(long groupId) {
119         _groupId = groupId;
120     }
121 
122     public void setKeywords(String keywords) {
123         _keywords = keywords;
124     }
125 
126     public void setNodeIds(long[] nodeIds) {
127         _nodeIds = nodeIds;
128     }
129 
130     public void setOwnerUserId(long ownerUserId) {
131         _ownerUserId = ownerUserId;
132     }
133 
134     public void setScopeStrict(boolean scopeStrict) {
135         _scopeStrict = scopeStrict;
136     }
137 
138     public void setSorts(Sort[] sorts) {
139         _sorts = sorts;
140     }
141 
142     public void setStart(int start) {
143         _start = start;
144     }
145 
146     public void setUserId(long userId) {
147         _userId = userId;
148     }
149 
150     private Map<String, Serializable> _attributes;
151     private BooleanClause[] _booleanClauses;
152     private long[] _categoryIds;
153     private long _companyId;
154     private int _end = QueryUtil.ALL_POS;
155     private long[] _folderIds;
156     private long _groupId;
157     private String _keywords;
158     private long[] _nodeIds;
159     private long _ownerUserId;
160     private boolean _scopeStrict = true;
161     private Sort[] _sorts;
162     private int _start = QueryUtil.ALL_POS;
163     private long _userId;
164 
165 }