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="PhoneUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * @author Brian Wing Shun Chan
027: *
028: */
029: public class PhoneUtil {
030: public static com.liferay.portal.model.Phone create(long phoneId) {
031: return getPersistence().create(phoneId);
032: }
033:
034: public static com.liferay.portal.model.Phone remove(long phoneId)
035: throws com.liferay.portal.SystemException,
036: com.liferay.portal.NoSuchPhoneException {
037: return getPersistence().remove(phoneId);
038: }
039:
040: public static com.liferay.portal.model.Phone remove(
041: com.liferay.portal.model.Phone phone)
042: throws com.liferay.portal.SystemException {
043: return getPersistence().remove(phone);
044: }
045:
046: public static com.liferay.portal.model.Phone update(
047: com.liferay.portal.model.Phone phone)
048: throws com.liferay.portal.SystemException {
049: return getPersistence().update(phone);
050: }
051:
052: public static com.liferay.portal.model.Phone update(
053: com.liferay.portal.model.Phone phone, boolean merge)
054: throws com.liferay.portal.SystemException {
055: return getPersistence().update(phone, merge);
056: }
057:
058: public static com.liferay.portal.model.Phone updateImpl(
059: com.liferay.portal.model.Phone phone, boolean merge)
060: throws com.liferay.portal.SystemException {
061: return getPersistence().updateImpl(phone, merge);
062: }
063:
064: public static com.liferay.portal.model.Phone findByPrimaryKey(
065: long phoneId) throws com.liferay.portal.SystemException,
066: com.liferay.portal.NoSuchPhoneException {
067: return getPersistence().findByPrimaryKey(phoneId);
068: }
069:
070: public static com.liferay.portal.model.Phone fetchByPrimaryKey(
071: long phoneId) throws com.liferay.portal.SystemException {
072: return getPersistence().fetchByPrimaryKey(phoneId);
073: }
074:
075: public static java.util.List findByCompanyId(long companyId)
076: throws com.liferay.portal.SystemException {
077: return getPersistence().findByCompanyId(companyId);
078: }
079:
080: public static java.util.List findByCompanyId(long companyId,
081: int begin, int end)
082: throws com.liferay.portal.SystemException {
083: return getPersistence().findByCompanyId(companyId, begin, end);
084: }
085:
086: public static java.util.List findByCompanyId(long companyId,
087: int begin, int end,
088: com.liferay.portal.kernel.util.OrderByComparator obc)
089: throws com.liferay.portal.SystemException {
090: return getPersistence().findByCompanyId(companyId, begin, end,
091: obc);
092: }
093:
094: public static com.liferay.portal.model.Phone findByCompanyId_First(
095: long companyId,
096: com.liferay.portal.kernel.util.OrderByComparator obc)
097: throws com.liferay.portal.SystemException,
098: com.liferay.portal.NoSuchPhoneException {
099: return getPersistence().findByCompanyId_First(companyId, obc);
100: }
101:
102: public static com.liferay.portal.model.Phone findByCompanyId_Last(
103: long companyId,
104: com.liferay.portal.kernel.util.OrderByComparator obc)
105: throws com.liferay.portal.SystemException,
106: com.liferay.portal.NoSuchPhoneException {
107: return getPersistence().findByCompanyId_Last(companyId, obc);
108: }
109:
110: public static com.liferay.portal.model.Phone[] findByCompanyId_PrevAndNext(
111: long phoneId, long companyId,
112: com.liferay.portal.kernel.util.OrderByComparator obc)
113: throws com.liferay.portal.SystemException,
114: com.liferay.portal.NoSuchPhoneException {
115: return getPersistence().findByCompanyId_PrevAndNext(phoneId,
116: companyId, obc);
117: }
118:
119: public static java.util.List findByUserId(long userId)
120: throws com.liferay.portal.SystemException {
121: return getPersistence().findByUserId(userId);
122: }
123:
124: public static java.util.List findByUserId(long userId, int begin,
125: int end) throws com.liferay.portal.SystemException {
126: return getPersistence().findByUserId(userId, begin, end);
127: }
128:
129: public static java.util.List findByUserId(long userId, int begin,
130: int end,
131: com.liferay.portal.kernel.util.OrderByComparator obc)
132: throws com.liferay.portal.SystemException {
133: return getPersistence().findByUserId(userId, begin, end, obc);
134: }
135:
136: public static com.liferay.portal.model.Phone findByUserId_First(
137: long userId,
138: com.liferay.portal.kernel.util.OrderByComparator obc)
139: throws com.liferay.portal.SystemException,
140: com.liferay.portal.NoSuchPhoneException {
141: return getPersistence().findByUserId_First(userId, obc);
142: }
143:
144: public static com.liferay.portal.model.Phone findByUserId_Last(
145: long userId,
146: com.liferay.portal.kernel.util.OrderByComparator obc)
147: throws com.liferay.portal.SystemException,
148: com.liferay.portal.NoSuchPhoneException {
149: return getPersistence().findByUserId_Last(userId, obc);
150: }
151:
152: public static com.liferay.portal.model.Phone[] findByUserId_PrevAndNext(
153: long phoneId, long userId,
154: com.liferay.portal.kernel.util.OrderByComparator obc)
155: throws com.liferay.portal.SystemException,
156: com.liferay.portal.NoSuchPhoneException {
157: return getPersistence().findByUserId_PrevAndNext(phoneId,
158: userId, obc);
159: }
160:
161: public static java.util.List findByC_C(long companyId,
162: long classNameId) throws com.liferay.portal.SystemException {
163: return getPersistence().findByC_C(companyId, classNameId);
164: }
165:
166: public static java.util.List findByC_C(long companyId,
167: long classNameId, int begin, int end)
168: throws com.liferay.portal.SystemException {
169: return getPersistence().findByC_C(companyId, classNameId,
170: begin, end);
171: }
172:
173: public static java.util.List findByC_C(long companyId,
174: long classNameId, int begin, int end,
175: com.liferay.portal.kernel.util.OrderByComparator obc)
176: throws com.liferay.portal.SystemException {
177: return getPersistence().findByC_C(companyId, classNameId,
178: begin, end, obc);
179: }
180:
181: public static com.liferay.portal.model.Phone findByC_C_First(
182: long companyId, long classNameId,
183: com.liferay.portal.kernel.util.OrderByComparator obc)
184: throws com.liferay.portal.SystemException,
185: com.liferay.portal.NoSuchPhoneException {
186: return getPersistence().findByC_C_First(companyId, classNameId,
187: obc);
188: }
189:
190: public static com.liferay.portal.model.Phone findByC_C_Last(
191: long companyId, long classNameId,
192: com.liferay.portal.kernel.util.OrderByComparator obc)
193: throws com.liferay.portal.SystemException,
194: com.liferay.portal.NoSuchPhoneException {
195: return getPersistence().findByC_C_Last(companyId, classNameId,
196: obc);
197: }
198:
199: public static com.liferay.portal.model.Phone[] findByC_C_PrevAndNext(
200: long phoneId, long companyId, long classNameId,
201: com.liferay.portal.kernel.util.OrderByComparator obc)
202: throws com.liferay.portal.SystemException,
203: com.liferay.portal.NoSuchPhoneException {
204: return getPersistence().findByC_C_PrevAndNext(phoneId,
205: companyId, classNameId, obc);
206: }
207:
208: public static java.util.List findByC_C_C(long companyId,
209: long classNameId, long classPK)
210: throws com.liferay.portal.SystemException {
211: return getPersistence().findByC_C_C(companyId, classNameId,
212: classPK);
213: }
214:
215: public static java.util.List findByC_C_C(long companyId,
216: long classNameId, long classPK, int begin, int end)
217: throws com.liferay.portal.SystemException {
218: return getPersistence().findByC_C_C(companyId, classNameId,
219: classPK, begin, end);
220: }
221:
222: public static java.util.List findByC_C_C(long companyId,
223: long classNameId, long classPK, int begin, int end,
224: com.liferay.portal.kernel.util.OrderByComparator obc)
225: throws com.liferay.portal.SystemException {
226: return getPersistence().findByC_C_C(companyId, classNameId,
227: classPK, begin, end, obc);
228: }
229:
230: public static com.liferay.portal.model.Phone findByC_C_C_First(
231: long companyId, long classNameId, long classPK,
232: com.liferay.portal.kernel.util.OrderByComparator obc)
233: throws com.liferay.portal.SystemException,
234: com.liferay.portal.NoSuchPhoneException {
235: return getPersistence().findByC_C_C_First(companyId,
236: classNameId, classPK, obc);
237: }
238:
239: public static com.liferay.portal.model.Phone findByC_C_C_Last(
240: long companyId, long classNameId, long classPK,
241: com.liferay.portal.kernel.util.OrderByComparator obc)
242: throws com.liferay.portal.SystemException,
243: com.liferay.portal.NoSuchPhoneException {
244: return getPersistence().findByC_C_C_Last(companyId,
245: classNameId, classPK, obc);
246: }
247:
248: public static com.liferay.portal.model.Phone[] findByC_C_C_PrevAndNext(
249: long phoneId, long companyId, long classNameId,
250: long classPK,
251: com.liferay.portal.kernel.util.OrderByComparator obc)
252: throws com.liferay.portal.SystemException,
253: com.liferay.portal.NoSuchPhoneException {
254: return getPersistence().findByC_C_C_PrevAndNext(phoneId,
255: companyId, classNameId, classPK, obc);
256: }
257:
258: public static java.util.List findByC_C_C_P(long companyId,
259: long classNameId, long classPK, boolean primary)
260: throws com.liferay.portal.SystemException {
261: return getPersistence().findByC_C_C_P(companyId, classNameId,
262: classPK, primary);
263: }
264:
265: public static java.util.List findByC_C_C_P(long companyId,
266: long classNameId, long classPK, boolean primary, int begin,
267: int end) throws com.liferay.portal.SystemException {
268: return getPersistence().findByC_C_C_P(companyId, classNameId,
269: classPK, primary, begin, end);
270: }
271:
272: public static java.util.List findByC_C_C_P(long companyId,
273: long classNameId, long classPK, boolean primary, int begin,
274: int end,
275: com.liferay.portal.kernel.util.OrderByComparator obc)
276: throws com.liferay.portal.SystemException {
277: return getPersistence().findByC_C_C_P(companyId, classNameId,
278: classPK, primary, begin, end, obc);
279: }
280:
281: public static com.liferay.portal.model.Phone findByC_C_C_P_First(
282: long companyId, long classNameId, long classPK,
283: boolean primary,
284: com.liferay.portal.kernel.util.OrderByComparator obc)
285: throws com.liferay.portal.SystemException,
286: com.liferay.portal.NoSuchPhoneException {
287: return getPersistence().findByC_C_C_P_First(companyId,
288: classNameId, classPK, primary, obc);
289: }
290:
291: public static com.liferay.portal.model.Phone findByC_C_C_P_Last(
292: long companyId, long classNameId, long classPK,
293: boolean primary,
294: com.liferay.portal.kernel.util.OrderByComparator obc)
295: throws com.liferay.portal.SystemException,
296: com.liferay.portal.NoSuchPhoneException {
297: return getPersistence().findByC_C_C_P_Last(companyId,
298: classNameId, classPK, primary, obc);
299: }
300:
301: public static com.liferay.portal.model.Phone[] findByC_C_C_P_PrevAndNext(
302: long phoneId, long companyId, long classNameId,
303: long classPK, boolean primary,
304: com.liferay.portal.kernel.util.OrderByComparator obc)
305: throws com.liferay.portal.SystemException,
306: com.liferay.portal.NoSuchPhoneException {
307: return getPersistence().findByC_C_C_P_PrevAndNext(phoneId,
308: companyId, classNameId, classPK, primary, obc);
309: }
310:
311: public static java.util.List findWithDynamicQuery(
312: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
313: throws com.liferay.portal.SystemException {
314: return getPersistence().findWithDynamicQuery(queryInitializer);
315: }
316:
317: public static java.util.List findWithDynamicQuery(
318: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
319: int begin, int end)
320: throws com.liferay.portal.SystemException {
321: return getPersistence().findWithDynamicQuery(queryInitializer,
322: begin, end);
323: }
324:
325: public static java.util.List findAll()
326: throws com.liferay.portal.SystemException {
327: return getPersistence().findAll();
328: }
329:
330: public static java.util.List findAll(int begin, int end)
331: throws com.liferay.portal.SystemException {
332: return getPersistence().findAll(begin, end);
333: }
334:
335: public static java.util.List findAll(int begin, int end,
336: com.liferay.portal.kernel.util.OrderByComparator obc)
337: throws com.liferay.portal.SystemException {
338: return getPersistence().findAll(begin, end, obc);
339: }
340:
341: public static void removeByCompanyId(long companyId)
342: throws com.liferay.portal.SystemException {
343: getPersistence().removeByCompanyId(companyId);
344: }
345:
346: public static void removeByUserId(long userId)
347: throws com.liferay.portal.SystemException {
348: getPersistence().removeByUserId(userId);
349: }
350:
351: public static void removeByC_C(long companyId, long classNameId)
352: throws com.liferay.portal.SystemException {
353: getPersistence().removeByC_C(companyId, classNameId);
354: }
355:
356: public static void removeByC_C_C(long companyId, long classNameId,
357: long classPK) throws com.liferay.portal.SystemException {
358: getPersistence().removeByC_C_C(companyId, classNameId, classPK);
359: }
360:
361: public static void removeByC_C_C_P(long companyId,
362: long classNameId, long classPK, boolean primary)
363: throws com.liferay.portal.SystemException {
364: getPersistence().removeByC_C_C_P(companyId, classNameId,
365: classPK, primary);
366: }
367:
368: public static void removeAll()
369: throws com.liferay.portal.SystemException {
370: getPersistence().removeAll();
371: }
372:
373: public static int countByCompanyId(long companyId)
374: throws com.liferay.portal.SystemException {
375: return getPersistence().countByCompanyId(companyId);
376: }
377:
378: public static int countByUserId(long userId)
379: throws com.liferay.portal.SystemException {
380: return getPersistence().countByUserId(userId);
381: }
382:
383: public static int countByC_C(long companyId, long classNameId)
384: throws com.liferay.portal.SystemException {
385: return getPersistence().countByC_C(companyId, classNameId);
386: }
387:
388: public static int countByC_C_C(long companyId, long classNameId,
389: long classPK) throws com.liferay.portal.SystemException {
390: return getPersistence().countByC_C_C(companyId, classNameId,
391: classPK);
392: }
393:
394: public static int countByC_C_C_P(long companyId, long classNameId,
395: long classPK, boolean primary)
396: throws com.liferay.portal.SystemException {
397: return getPersistence().countByC_C_C_P(companyId, classNameId,
398: classPK, primary);
399: }
400:
401: public static int countAll()
402: throws com.liferay.portal.SystemException {
403: return getPersistence().countAll();
404: }
405:
406: public static PhonePersistence getPersistence() {
407: return _getUtil()._persistence;
408: }
409:
410: public void setPersistence(PhonePersistence persistence) {
411: _persistence = persistence;
412: }
413:
414: private static PhoneUtil _getUtil() {
415: if (_util == null) {
416: _util = (PhoneUtil) com.liferay.portal.kernel.bean.BeanLocatorUtil
417: .locate(_UTIL);
418: }
419:
420: return _util;
421: }
422:
423: private static final String _UTIL = PhoneUtil.class.getName();
424: private static PhoneUtil _util;
425: private PhonePersistence _persistence;
426: }
|