001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portal.service.persistence;
022:
023: /**
024: * <a href="LayoutUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * @author Brian Wing Shun Chan
027: *
028: */
029: public class LayoutUtil {
030: public static com.liferay.portal.model.Layout create(long plid) {
031: return getPersistence().create(plid);
032: }
033:
034: public static com.liferay.portal.model.Layout remove(long plid)
035: throws com.liferay.portal.SystemException,
036: com.liferay.portal.NoSuchLayoutException {
037: return getPersistence().remove(plid);
038: }
039:
040: public static com.liferay.portal.model.Layout remove(
041: com.liferay.portal.model.Layout layout)
042: throws com.liferay.portal.SystemException {
043: return getPersistence().remove(layout);
044: }
045:
046: public static com.liferay.portal.model.Layout update(
047: com.liferay.portal.model.Layout layout)
048: throws com.liferay.portal.SystemException {
049: return getPersistence().update(layout);
050: }
051:
052: public static com.liferay.portal.model.Layout update(
053: com.liferay.portal.model.Layout layout, boolean merge)
054: throws com.liferay.portal.SystemException {
055: return getPersistence().update(layout, merge);
056: }
057:
058: public static com.liferay.portal.model.Layout updateImpl(
059: com.liferay.portal.model.Layout layout, boolean merge)
060: throws com.liferay.portal.SystemException {
061: return getPersistence().updateImpl(layout, merge);
062: }
063:
064: public static com.liferay.portal.model.Layout findByPrimaryKey(
065: long plid) throws com.liferay.portal.SystemException,
066: com.liferay.portal.NoSuchLayoutException {
067: return getPersistence().findByPrimaryKey(plid);
068: }
069:
070: public static com.liferay.portal.model.Layout fetchByPrimaryKey(
071: long plid) throws com.liferay.portal.SystemException {
072: return getPersistence().fetchByPrimaryKey(plid);
073: }
074:
075: public static java.util.List findByGroupId(long groupId)
076: throws com.liferay.portal.SystemException {
077: return getPersistence().findByGroupId(groupId);
078: }
079:
080: public static java.util.List findByGroupId(long groupId, int begin,
081: int end) throws com.liferay.portal.SystemException {
082: return getPersistence().findByGroupId(groupId, begin, end);
083: }
084:
085: public static java.util.List findByGroupId(long groupId, int begin,
086: int end,
087: com.liferay.portal.kernel.util.OrderByComparator obc)
088: throws com.liferay.portal.SystemException {
089: return getPersistence().findByGroupId(groupId, begin, end, obc);
090: }
091:
092: public static com.liferay.portal.model.Layout findByGroupId_First(
093: long groupId,
094: com.liferay.portal.kernel.util.OrderByComparator obc)
095: throws com.liferay.portal.SystemException,
096: com.liferay.portal.NoSuchLayoutException {
097: return getPersistence().findByGroupId_First(groupId, obc);
098: }
099:
100: public static com.liferay.portal.model.Layout findByGroupId_Last(
101: long groupId,
102: com.liferay.portal.kernel.util.OrderByComparator obc)
103: throws com.liferay.portal.SystemException,
104: com.liferay.portal.NoSuchLayoutException {
105: return getPersistence().findByGroupId_Last(groupId, obc);
106: }
107:
108: public static com.liferay.portal.model.Layout[] findByGroupId_PrevAndNext(
109: long plid, long groupId,
110: com.liferay.portal.kernel.util.OrderByComparator obc)
111: throws com.liferay.portal.SystemException,
112: com.liferay.portal.NoSuchLayoutException {
113: return getPersistence().findByGroupId_PrevAndNext(plid,
114: groupId, obc);
115: }
116:
117: public static java.util.List findByCompanyId(long companyId)
118: throws com.liferay.portal.SystemException {
119: return getPersistence().findByCompanyId(companyId);
120: }
121:
122: public static java.util.List findByCompanyId(long companyId,
123: int begin, int end)
124: throws com.liferay.portal.SystemException {
125: return getPersistence().findByCompanyId(companyId, begin, end);
126: }
127:
128: public static java.util.List findByCompanyId(long companyId,
129: int begin, int end,
130: com.liferay.portal.kernel.util.OrderByComparator obc)
131: throws com.liferay.portal.SystemException {
132: return getPersistence().findByCompanyId(companyId, begin, end,
133: obc);
134: }
135:
136: public static com.liferay.portal.model.Layout findByCompanyId_First(
137: long companyId,
138: com.liferay.portal.kernel.util.OrderByComparator obc)
139: throws com.liferay.portal.SystemException,
140: com.liferay.portal.NoSuchLayoutException {
141: return getPersistence().findByCompanyId_First(companyId, obc);
142: }
143:
144: public static com.liferay.portal.model.Layout findByCompanyId_Last(
145: long companyId,
146: com.liferay.portal.kernel.util.OrderByComparator obc)
147: throws com.liferay.portal.SystemException,
148: com.liferay.portal.NoSuchLayoutException {
149: return getPersistence().findByCompanyId_Last(companyId, obc);
150: }
151:
152: public static com.liferay.portal.model.Layout[] findByCompanyId_PrevAndNext(
153: long plid, long companyId,
154: com.liferay.portal.kernel.util.OrderByComparator obc)
155: throws com.liferay.portal.SystemException,
156: com.liferay.portal.NoSuchLayoutException {
157: return getPersistence().findByCompanyId_PrevAndNext(plid,
158: companyId, obc);
159: }
160:
161: public static com.liferay.portal.model.Layout findByDLFolderId(
162: long dlFolderId) throws com.liferay.portal.SystemException,
163: com.liferay.portal.NoSuchLayoutException {
164: return getPersistence().findByDLFolderId(dlFolderId);
165: }
166:
167: public static com.liferay.portal.model.Layout fetchByDLFolderId(
168: long dlFolderId) throws com.liferay.portal.SystemException {
169: return getPersistence().fetchByDLFolderId(dlFolderId);
170: }
171:
172: public static com.liferay.portal.model.Layout findByIconImageId(
173: long iconImageId)
174: throws com.liferay.portal.SystemException,
175: com.liferay.portal.NoSuchLayoutException {
176: return getPersistence().findByIconImageId(iconImageId);
177: }
178:
179: public static com.liferay.portal.model.Layout fetchByIconImageId(
180: long iconImageId) throws com.liferay.portal.SystemException {
181: return getPersistence().fetchByIconImageId(iconImageId);
182: }
183:
184: public static java.util.List findByG_P(long groupId,
185: boolean privateLayout)
186: throws com.liferay.portal.SystemException {
187: return getPersistence().findByG_P(groupId, privateLayout);
188: }
189:
190: public static java.util.List findByG_P(long groupId,
191: boolean privateLayout, int begin, int end)
192: throws com.liferay.portal.SystemException {
193: return getPersistence().findByG_P(groupId, privateLayout,
194: begin, end);
195: }
196:
197: public static java.util.List findByG_P(long groupId,
198: boolean privateLayout, int begin, int end,
199: com.liferay.portal.kernel.util.OrderByComparator obc)
200: throws com.liferay.portal.SystemException {
201: return getPersistence().findByG_P(groupId, privateLayout,
202: begin, end, obc);
203: }
204:
205: public static com.liferay.portal.model.Layout findByG_P_First(
206: long groupId, boolean privateLayout,
207: com.liferay.portal.kernel.util.OrderByComparator obc)
208: throws com.liferay.portal.SystemException,
209: com.liferay.portal.NoSuchLayoutException {
210: return getPersistence().findByG_P_First(groupId, privateLayout,
211: obc);
212: }
213:
214: public static com.liferay.portal.model.Layout findByG_P_Last(
215: long groupId, boolean privateLayout,
216: com.liferay.portal.kernel.util.OrderByComparator obc)
217: throws com.liferay.portal.SystemException,
218: com.liferay.portal.NoSuchLayoutException {
219: return getPersistence().findByG_P_Last(groupId, privateLayout,
220: obc);
221: }
222:
223: public static com.liferay.portal.model.Layout[] findByG_P_PrevAndNext(
224: long plid, long groupId, boolean privateLayout,
225: com.liferay.portal.kernel.util.OrderByComparator obc)
226: throws com.liferay.portal.SystemException,
227: com.liferay.portal.NoSuchLayoutException {
228: return getPersistence().findByG_P_PrevAndNext(plid, groupId,
229: privateLayout, obc);
230: }
231:
232: public static com.liferay.portal.model.Layout findByG_P_L(
233: long groupId, boolean privateLayout, long layoutId)
234: throws com.liferay.portal.SystemException,
235: com.liferay.portal.NoSuchLayoutException {
236: return getPersistence().findByG_P_L(groupId, privateLayout,
237: layoutId);
238: }
239:
240: public static com.liferay.portal.model.Layout fetchByG_P_L(
241: long groupId, boolean privateLayout, long layoutId)
242: throws com.liferay.portal.SystemException {
243: return getPersistence().fetchByG_P_L(groupId, privateLayout,
244: layoutId);
245: }
246:
247: public static java.util.List findByG_P_P(long groupId,
248: boolean privateLayout, long parentLayoutId)
249: throws com.liferay.portal.SystemException {
250: return getPersistence().findByG_P_P(groupId, privateLayout,
251: parentLayoutId);
252: }
253:
254: public static java.util.List findByG_P_P(long groupId,
255: boolean privateLayout, long parentLayoutId, int begin,
256: int end) throws com.liferay.portal.SystemException {
257: return getPersistence().findByG_P_P(groupId, privateLayout,
258: parentLayoutId, begin, end);
259: }
260:
261: public static java.util.List findByG_P_P(long groupId,
262: boolean privateLayout, long parentLayoutId, int begin,
263: int end,
264: com.liferay.portal.kernel.util.OrderByComparator obc)
265: throws com.liferay.portal.SystemException {
266: return getPersistence().findByG_P_P(groupId, privateLayout,
267: parentLayoutId, begin, end, obc);
268: }
269:
270: public static com.liferay.portal.model.Layout findByG_P_P_First(
271: long groupId, boolean privateLayout, long parentLayoutId,
272: com.liferay.portal.kernel.util.OrderByComparator obc)
273: throws com.liferay.portal.SystemException,
274: com.liferay.portal.NoSuchLayoutException {
275: return getPersistence().findByG_P_P_First(groupId,
276: privateLayout, parentLayoutId, obc);
277: }
278:
279: public static com.liferay.portal.model.Layout findByG_P_P_Last(
280: long groupId, boolean privateLayout, long parentLayoutId,
281: com.liferay.portal.kernel.util.OrderByComparator obc)
282: throws com.liferay.portal.SystemException,
283: com.liferay.portal.NoSuchLayoutException {
284: return getPersistence().findByG_P_P_Last(groupId,
285: privateLayout, parentLayoutId, obc);
286: }
287:
288: public static com.liferay.portal.model.Layout[] findByG_P_P_PrevAndNext(
289: long plid, long groupId, boolean privateLayout,
290: long parentLayoutId,
291: com.liferay.portal.kernel.util.OrderByComparator obc)
292: throws com.liferay.portal.SystemException,
293: com.liferay.portal.NoSuchLayoutException {
294: return getPersistence().findByG_P_P_PrevAndNext(plid, groupId,
295: privateLayout, parentLayoutId, obc);
296: }
297:
298: public static com.liferay.portal.model.Layout findByG_P_F(
299: long groupId, boolean privateLayout,
300: java.lang.String friendlyURL)
301: throws com.liferay.portal.SystemException,
302: com.liferay.portal.NoSuchLayoutException {
303: return getPersistence().findByG_P_F(groupId, privateLayout,
304: friendlyURL);
305: }
306:
307: public static com.liferay.portal.model.Layout fetchByG_P_F(
308: long groupId, boolean privateLayout,
309: java.lang.String friendlyURL)
310: throws com.liferay.portal.SystemException {
311: return getPersistence().fetchByG_P_F(groupId, privateLayout,
312: friendlyURL);
313: }
314:
315: public static java.util.List findWithDynamicQuery(
316: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
317: throws com.liferay.portal.SystemException {
318: return getPersistence().findWithDynamicQuery(queryInitializer);
319: }
320:
321: public static java.util.List findWithDynamicQuery(
322: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
323: int begin, int end)
324: throws com.liferay.portal.SystemException {
325: return getPersistence().findWithDynamicQuery(queryInitializer,
326: begin, end);
327: }
328:
329: public static java.util.List findAll()
330: throws com.liferay.portal.SystemException {
331: return getPersistence().findAll();
332: }
333:
334: public static java.util.List findAll(int begin, int end)
335: throws com.liferay.portal.SystemException {
336: return getPersistence().findAll(begin, end);
337: }
338:
339: public static java.util.List findAll(int begin, int end,
340: com.liferay.portal.kernel.util.OrderByComparator obc)
341: throws com.liferay.portal.SystemException {
342: return getPersistence().findAll(begin, end, obc);
343: }
344:
345: public static void removeByGroupId(long groupId)
346: throws com.liferay.portal.SystemException {
347: getPersistence().removeByGroupId(groupId);
348: }
349:
350: public static void removeByCompanyId(long companyId)
351: throws com.liferay.portal.SystemException {
352: getPersistence().removeByCompanyId(companyId);
353: }
354:
355: public static void removeByDLFolderId(long dlFolderId)
356: throws com.liferay.portal.SystemException,
357: com.liferay.portal.NoSuchLayoutException {
358: getPersistence().removeByDLFolderId(dlFolderId);
359: }
360:
361: public static void removeByIconImageId(long iconImageId)
362: throws com.liferay.portal.SystemException,
363: com.liferay.portal.NoSuchLayoutException {
364: getPersistence().removeByIconImageId(iconImageId);
365: }
366:
367: public static void removeByG_P(long groupId, boolean privateLayout)
368: throws com.liferay.portal.SystemException {
369: getPersistence().removeByG_P(groupId, privateLayout);
370: }
371:
372: public static void removeByG_P_L(long groupId,
373: boolean privateLayout, long layoutId)
374: throws com.liferay.portal.SystemException,
375: com.liferay.portal.NoSuchLayoutException {
376: getPersistence()
377: .removeByG_P_L(groupId, privateLayout, layoutId);
378: }
379:
380: public static void removeByG_P_P(long groupId,
381: boolean privateLayout, long parentLayoutId)
382: throws com.liferay.portal.SystemException {
383: getPersistence().removeByG_P_P(groupId, privateLayout,
384: parentLayoutId);
385: }
386:
387: public static void removeByG_P_F(long groupId,
388: boolean privateLayout, java.lang.String friendlyURL)
389: throws com.liferay.portal.SystemException,
390: com.liferay.portal.NoSuchLayoutException {
391: getPersistence().removeByG_P_F(groupId, privateLayout,
392: friendlyURL);
393: }
394:
395: public static void removeAll()
396: throws com.liferay.portal.SystemException {
397: getPersistence().removeAll();
398: }
399:
400: public static int countByGroupId(long groupId)
401: throws com.liferay.portal.SystemException {
402: return getPersistence().countByGroupId(groupId);
403: }
404:
405: public static int countByCompanyId(long companyId)
406: throws com.liferay.portal.SystemException {
407: return getPersistence().countByCompanyId(companyId);
408: }
409:
410: public static int countByDLFolderId(long dlFolderId)
411: throws com.liferay.portal.SystemException {
412: return getPersistence().countByDLFolderId(dlFolderId);
413: }
414:
415: public static int countByIconImageId(long iconImageId)
416: throws com.liferay.portal.SystemException {
417: return getPersistence().countByIconImageId(iconImageId);
418: }
419:
420: public static int countByG_P(long groupId, boolean privateLayout)
421: throws com.liferay.portal.SystemException {
422: return getPersistence().countByG_P(groupId, privateLayout);
423: }
424:
425: public static int countByG_P_L(long groupId, boolean privateLayout,
426: long layoutId) throws com.liferay.portal.SystemException {
427: return getPersistence().countByG_P_L(groupId, privateLayout,
428: layoutId);
429: }
430:
431: public static int countByG_P_P(long groupId, boolean privateLayout,
432: long parentLayoutId)
433: throws com.liferay.portal.SystemException {
434: return getPersistence().countByG_P_P(groupId, privateLayout,
435: parentLayoutId);
436: }
437:
438: public static int countByG_P_F(long groupId, boolean privateLayout,
439: java.lang.String friendlyURL)
440: throws com.liferay.portal.SystemException {
441: return getPersistence().countByG_P_F(groupId, privateLayout,
442: friendlyURL);
443: }
444:
445: public static int countAll()
446: throws com.liferay.portal.SystemException {
447: return getPersistence().countAll();
448: }
449:
450: public static LayoutPersistence getPersistence() {
451: return _getUtil()._persistence;
452: }
453:
454: public void setPersistence(LayoutPersistence persistence) {
455: _persistence = persistence;
456: }
457:
458: private static LayoutUtil _getUtil() {
459: if (_util == null) {
460: _util = (LayoutUtil) com.liferay.portal.kernel.bean.BeanLocatorUtil
461: .locate(_UTIL);
462: }
463:
464: return _util;
465: }
466:
467: private static final String _UTIL = LayoutUtil.class.getName();
468: private static LayoutUtil _util;
469: private LayoutPersistence _persistence;
470: }
|