001
014
015 package com.liferay.portal.service.persistence;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019 import com.liferay.portal.kernel.exception.SystemException;
020 import com.liferay.portal.kernel.util.OrderByComparator;
021 import com.liferay.portal.model.PortletItem;
022 import com.liferay.portal.service.ServiceContext;
023
024 import java.util.List;
025
026
032 public class PortletItemUtil {
033
036 public static void clearCache() {
037 getPersistence().clearCache();
038 }
039
040
043 public static void clearCache(PortletItem portletItem) {
044 getPersistence().clearCache(portletItem);
045 }
046
047
050 public long countWithDynamicQuery(DynamicQuery dynamicQuery)
051 throws SystemException {
052 return getPersistence().countWithDynamicQuery(dynamicQuery);
053 }
054
055
058 public static List<PortletItem> findWithDynamicQuery(
059 DynamicQuery dynamicQuery) throws SystemException {
060 return getPersistence().findWithDynamicQuery(dynamicQuery);
061 }
062
063
066 public static List<PortletItem> findWithDynamicQuery(
067 DynamicQuery dynamicQuery, int start, int end)
068 throws SystemException {
069 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
070 }
071
072
075 public static List<PortletItem> findWithDynamicQuery(
076 DynamicQuery dynamicQuery, int start, int end,
077 OrderByComparator orderByComparator) throws SystemException {
078 return getPersistence()
079 .findWithDynamicQuery(dynamicQuery, start, end,
080 orderByComparator);
081 }
082
083
086 public static PortletItem remove(PortletItem portletItem)
087 throws SystemException {
088 return getPersistence().remove(portletItem);
089 }
090
091
094 public static PortletItem update(PortletItem portletItem, boolean merge)
095 throws SystemException {
096 return getPersistence().update(portletItem, merge);
097 }
098
099
102 public static PortletItem update(PortletItem portletItem, boolean merge,
103 ServiceContext serviceContext) throws SystemException {
104 return getPersistence().update(portletItem, merge, serviceContext);
105 }
106
107 public static void cacheResult(
108 com.liferay.portal.model.PortletItem portletItem) {
109 getPersistence().cacheResult(portletItem);
110 }
111
112 public static void cacheResult(
113 java.util.List<com.liferay.portal.model.PortletItem> portletItems) {
114 getPersistence().cacheResult(portletItems);
115 }
116
117 public static com.liferay.portal.model.PortletItem create(
118 long portletItemId) {
119 return getPersistence().create(portletItemId);
120 }
121
122 public static com.liferay.portal.model.PortletItem remove(
123 long portletItemId)
124 throws com.liferay.portal.NoSuchPortletItemException,
125 com.liferay.portal.kernel.exception.SystemException {
126 return getPersistence().remove(portletItemId);
127 }
128
129 public static com.liferay.portal.model.PortletItem updateImpl(
130 com.liferay.portal.model.PortletItem portletItem, boolean merge)
131 throws com.liferay.portal.kernel.exception.SystemException {
132 return getPersistence().updateImpl(portletItem, merge);
133 }
134
135 public static com.liferay.portal.model.PortletItem findByPrimaryKey(
136 long portletItemId)
137 throws com.liferay.portal.NoSuchPortletItemException,
138 com.liferay.portal.kernel.exception.SystemException {
139 return getPersistence().findByPrimaryKey(portletItemId);
140 }
141
142 public static com.liferay.portal.model.PortletItem fetchByPrimaryKey(
143 long portletItemId)
144 throws com.liferay.portal.kernel.exception.SystemException {
145 return getPersistence().fetchByPrimaryKey(portletItemId);
146 }
147
148 public static java.util.List<com.liferay.portal.model.PortletItem> findByG_C(
149 long groupId, long classNameId)
150 throws com.liferay.portal.kernel.exception.SystemException {
151 return getPersistence().findByG_C(groupId, classNameId);
152 }
153
154 public static java.util.List<com.liferay.portal.model.PortletItem> findByG_C(
155 long groupId, long classNameId, int start, int end)
156 throws com.liferay.portal.kernel.exception.SystemException {
157 return getPersistence().findByG_C(groupId, classNameId, start, end);
158 }
159
160 public static java.util.List<com.liferay.portal.model.PortletItem> findByG_C(
161 long groupId, long classNameId, int start, int end,
162 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
163 throws com.liferay.portal.kernel.exception.SystemException {
164 return getPersistence()
165 .findByG_C(groupId, classNameId, start, end,
166 orderByComparator);
167 }
168
169 public static com.liferay.portal.model.PortletItem findByG_C_First(
170 long groupId, long classNameId,
171 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
172 throws com.liferay.portal.NoSuchPortletItemException,
173 com.liferay.portal.kernel.exception.SystemException {
174 return getPersistence()
175 .findByG_C_First(groupId, classNameId, orderByComparator);
176 }
177
178 public static com.liferay.portal.model.PortletItem findByG_C_Last(
179 long groupId, long classNameId,
180 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
181 throws com.liferay.portal.NoSuchPortletItemException,
182 com.liferay.portal.kernel.exception.SystemException {
183 return getPersistence()
184 .findByG_C_Last(groupId, classNameId, orderByComparator);
185 }
186
187 public static com.liferay.portal.model.PortletItem[] findByG_C_PrevAndNext(
188 long portletItemId, long groupId, long classNameId,
189 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
190 throws com.liferay.portal.NoSuchPortletItemException,
191 com.liferay.portal.kernel.exception.SystemException {
192 return getPersistence()
193 .findByG_C_PrevAndNext(portletItemId, groupId, classNameId,
194 orderByComparator);
195 }
196
197 public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C(
198 long groupId, java.lang.String portletId, long classNameId)
199 throws com.liferay.portal.kernel.exception.SystemException {
200 return getPersistence().findByG_P_C(groupId, portletId, classNameId);
201 }
202
203 public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C(
204 long groupId, java.lang.String portletId, long classNameId, int start,
205 int end) throws com.liferay.portal.kernel.exception.SystemException {
206 return getPersistence()
207 .findByG_P_C(groupId, portletId, classNameId, start, end);
208 }
209
210 public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C(
211 long groupId, java.lang.String portletId, long classNameId, int start,
212 int end,
213 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
214 throws com.liferay.portal.kernel.exception.SystemException {
215 return getPersistence()
216 .findByG_P_C(groupId, portletId, classNameId, start, end,
217 orderByComparator);
218 }
219
220 public static com.liferay.portal.model.PortletItem findByG_P_C_First(
221 long groupId, java.lang.String portletId, long classNameId,
222 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
223 throws com.liferay.portal.NoSuchPortletItemException,
224 com.liferay.portal.kernel.exception.SystemException {
225 return getPersistence()
226 .findByG_P_C_First(groupId, portletId, classNameId,
227 orderByComparator);
228 }
229
230 public static com.liferay.portal.model.PortletItem findByG_P_C_Last(
231 long groupId, java.lang.String portletId, long classNameId,
232 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
233 throws com.liferay.portal.NoSuchPortletItemException,
234 com.liferay.portal.kernel.exception.SystemException {
235 return getPersistence()
236 .findByG_P_C_Last(groupId, portletId, classNameId,
237 orderByComparator);
238 }
239
240 public static com.liferay.portal.model.PortletItem[] findByG_P_C_PrevAndNext(
241 long portletItemId, long groupId, java.lang.String portletId,
242 long classNameId,
243 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
244 throws com.liferay.portal.NoSuchPortletItemException,
245 com.liferay.portal.kernel.exception.SystemException {
246 return getPersistence()
247 .findByG_P_C_PrevAndNext(portletItemId, groupId, portletId,
248 classNameId, orderByComparator);
249 }
250
251 public static com.liferay.portal.model.PortletItem findByG_N_P_C(
252 long groupId, java.lang.String name, java.lang.String portletId,
253 long classNameId)
254 throws com.liferay.portal.NoSuchPortletItemException,
255 com.liferay.portal.kernel.exception.SystemException {
256 return getPersistence()
257 .findByG_N_P_C(groupId, name, portletId, classNameId);
258 }
259
260 public static com.liferay.portal.model.PortletItem fetchByG_N_P_C(
261 long groupId, java.lang.String name, java.lang.String portletId,
262 long classNameId)
263 throws com.liferay.portal.kernel.exception.SystemException {
264 return getPersistence()
265 .fetchByG_N_P_C(groupId, name, portletId, classNameId);
266 }
267
268 public static com.liferay.portal.model.PortletItem fetchByG_N_P_C(
269 long groupId, java.lang.String name, java.lang.String portletId,
270 long classNameId, boolean retrieveFromCache)
271 throws com.liferay.portal.kernel.exception.SystemException {
272 return getPersistence()
273 .fetchByG_N_P_C(groupId, name, portletId, classNameId,
274 retrieveFromCache);
275 }
276
277 public static java.util.List<com.liferay.portal.model.PortletItem> findAll()
278 throws com.liferay.portal.kernel.exception.SystemException {
279 return getPersistence().findAll();
280 }
281
282 public static java.util.List<com.liferay.portal.model.PortletItem> findAll(
283 int start, int end)
284 throws com.liferay.portal.kernel.exception.SystemException {
285 return getPersistence().findAll(start, end);
286 }
287
288 public static java.util.List<com.liferay.portal.model.PortletItem> findAll(
289 int start, int end,
290 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
291 throws com.liferay.portal.kernel.exception.SystemException {
292 return getPersistence().findAll(start, end, orderByComparator);
293 }
294
295 public static void removeByG_C(long groupId, long classNameId)
296 throws com.liferay.portal.kernel.exception.SystemException {
297 getPersistence().removeByG_C(groupId, classNameId);
298 }
299
300 public static void removeByG_P_C(long groupId, java.lang.String portletId,
301 long classNameId)
302 throws com.liferay.portal.kernel.exception.SystemException {
303 getPersistence().removeByG_P_C(groupId, portletId, classNameId);
304 }
305
306 public static void removeByG_N_P_C(long groupId, java.lang.String name,
307 java.lang.String portletId, long classNameId)
308 throws com.liferay.portal.NoSuchPortletItemException,
309 com.liferay.portal.kernel.exception.SystemException {
310 getPersistence().removeByG_N_P_C(groupId, name, portletId, classNameId);
311 }
312
313 public static void removeAll()
314 throws com.liferay.portal.kernel.exception.SystemException {
315 getPersistence().removeAll();
316 }
317
318 public static int countByG_C(long groupId, long classNameId)
319 throws com.liferay.portal.kernel.exception.SystemException {
320 return getPersistence().countByG_C(groupId, classNameId);
321 }
322
323 public static int countByG_P_C(long groupId, java.lang.String portletId,
324 long classNameId)
325 throws com.liferay.portal.kernel.exception.SystemException {
326 return getPersistence().countByG_P_C(groupId, portletId, classNameId);
327 }
328
329 public static int countByG_N_P_C(long groupId, java.lang.String name,
330 java.lang.String portletId, long classNameId)
331 throws com.liferay.portal.kernel.exception.SystemException {
332 return getPersistence()
333 .countByG_N_P_C(groupId, name, portletId, classNameId);
334 }
335
336 public static int countAll()
337 throws com.liferay.portal.kernel.exception.SystemException {
338 return getPersistence().countAll();
339 }
340
341 public static PortletItemPersistence getPersistence() {
342 if (_persistence == null) {
343 _persistence = (PortletItemPersistence)PortalBeanLocatorUtil.locate(PortletItemPersistence.class.getName());
344 }
345
346 return _persistence;
347 }
348
349 public void setPersistence(PortletItemPersistence persistence) {
350 _persistence = persistence;
351 }
352
353 private static PortletItemPersistence _persistence;
354 }