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="AddressUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * @author Brian Wing Shun Chan
027: *
028: */
029: public class AddressUtil {
030: public static com.liferay.portal.model.Address create(long addressId) {
031: return getPersistence().create(addressId);
032: }
033:
034: public static com.liferay.portal.model.Address remove(long addressId)
035: throws com.liferay.portal.SystemException,
036: com.liferay.portal.NoSuchAddressException {
037: return getPersistence().remove(addressId);
038: }
039:
040: public static com.liferay.portal.model.Address remove(
041: com.liferay.portal.model.Address address)
042: throws com.liferay.portal.SystemException {
043: return getPersistence().remove(address);
044: }
045:
046: public static com.liferay.portal.model.Address update(
047: com.liferay.portal.model.Address address)
048: throws com.liferay.portal.SystemException {
049: return getPersistence().update(address);
050: }
051:
052: public static com.liferay.portal.model.Address update(
053: com.liferay.portal.model.Address address, boolean merge)
054: throws com.liferay.portal.SystemException {
055: return getPersistence().update(address, merge);
056: }
057:
058: public static com.liferay.portal.model.Address updateImpl(
059: com.liferay.portal.model.Address address, boolean merge)
060: throws com.liferay.portal.SystemException {
061: return getPersistence().updateImpl(address, merge);
062: }
063:
064: public static com.liferay.portal.model.Address findByPrimaryKey(
065: long addressId) throws com.liferay.portal.SystemException,
066: com.liferay.portal.NoSuchAddressException {
067: return getPersistence().findByPrimaryKey(addressId);
068: }
069:
070: public static com.liferay.portal.model.Address fetchByPrimaryKey(
071: long addressId) throws com.liferay.portal.SystemException {
072: return getPersistence().fetchByPrimaryKey(addressId);
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.Address findByCompanyId_First(
095: long companyId,
096: com.liferay.portal.kernel.util.OrderByComparator obc)
097: throws com.liferay.portal.SystemException,
098: com.liferay.portal.NoSuchAddressException {
099: return getPersistence().findByCompanyId_First(companyId, obc);
100: }
101:
102: public static com.liferay.portal.model.Address findByCompanyId_Last(
103: long companyId,
104: com.liferay.portal.kernel.util.OrderByComparator obc)
105: throws com.liferay.portal.SystemException,
106: com.liferay.portal.NoSuchAddressException {
107: return getPersistence().findByCompanyId_Last(companyId, obc);
108: }
109:
110: public static com.liferay.portal.model.Address[] findByCompanyId_PrevAndNext(
111: long addressId, long companyId,
112: com.liferay.portal.kernel.util.OrderByComparator obc)
113: throws com.liferay.portal.SystemException,
114: com.liferay.portal.NoSuchAddressException {
115: return getPersistence().findByCompanyId_PrevAndNext(addressId,
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.Address findByUserId_First(
137: long userId,
138: com.liferay.portal.kernel.util.OrderByComparator obc)
139: throws com.liferay.portal.SystemException,
140: com.liferay.portal.NoSuchAddressException {
141: return getPersistence().findByUserId_First(userId, obc);
142: }
143:
144: public static com.liferay.portal.model.Address findByUserId_Last(
145: long userId,
146: com.liferay.portal.kernel.util.OrderByComparator obc)
147: throws com.liferay.portal.SystemException,
148: com.liferay.portal.NoSuchAddressException {
149: return getPersistence().findByUserId_Last(userId, obc);
150: }
151:
152: public static com.liferay.portal.model.Address[] findByUserId_PrevAndNext(
153: long addressId, long userId,
154: com.liferay.portal.kernel.util.OrderByComparator obc)
155: throws com.liferay.portal.SystemException,
156: com.liferay.portal.NoSuchAddressException {
157: return getPersistence().findByUserId_PrevAndNext(addressId,
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.Address 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.NoSuchAddressException {
186: return getPersistence().findByC_C_First(companyId, classNameId,
187: obc);
188: }
189:
190: public static com.liferay.portal.model.Address 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.NoSuchAddressException {
195: return getPersistence().findByC_C_Last(companyId, classNameId,
196: obc);
197: }
198:
199: public static com.liferay.portal.model.Address[] findByC_C_PrevAndNext(
200: long addressId, long companyId, long classNameId,
201: com.liferay.portal.kernel.util.OrderByComparator obc)
202: throws com.liferay.portal.SystemException,
203: com.liferay.portal.NoSuchAddressException {
204: return getPersistence().findByC_C_PrevAndNext(addressId,
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.Address 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.NoSuchAddressException {
235: return getPersistence().findByC_C_C_First(companyId,
236: classNameId, classPK, obc);
237: }
238:
239: public static com.liferay.portal.model.Address 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.NoSuchAddressException {
244: return getPersistence().findByC_C_C_Last(companyId,
245: classNameId, classPK, obc);
246: }
247:
248: public static com.liferay.portal.model.Address[] findByC_C_C_PrevAndNext(
249: long addressId, 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.NoSuchAddressException {
254: return getPersistence().findByC_C_C_PrevAndNext(addressId,
255: companyId, classNameId, classPK, obc);
256: }
257:
258: public static java.util.List findByC_C_C_M(long companyId,
259: long classNameId, long classPK, boolean mailing)
260: throws com.liferay.portal.SystemException {
261: return getPersistence().findByC_C_C_M(companyId, classNameId,
262: classPK, mailing);
263: }
264:
265: public static java.util.List findByC_C_C_M(long companyId,
266: long classNameId, long classPK, boolean mailing, int begin,
267: int end) throws com.liferay.portal.SystemException {
268: return getPersistence().findByC_C_C_M(companyId, classNameId,
269: classPK, mailing, begin, end);
270: }
271:
272: public static java.util.List findByC_C_C_M(long companyId,
273: long classNameId, long classPK, boolean mailing, 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_M(companyId, classNameId,
278: classPK, mailing, begin, end, obc);
279: }
280:
281: public static com.liferay.portal.model.Address findByC_C_C_M_First(
282: long companyId, long classNameId, long classPK,
283: boolean mailing,
284: com.liferay.portal.kernel.util.OrderByComparator obc)
285: throws com.liferay.portal.SystemException,
286: com.liferay.portal.NoSuchAddressException {
287: return getPersistence().findByC_C_C_M_First(companyId,
288: classNameId, classPK, mailing, obc);
289: }
290:
291: public static com.liferay.portal.model.Address findByC_C_C_M_Last(
292: long companyId, long classNameId, long classPK,
293: boolean mailing,
294: com.liferay.portal.kernel.util.OrderByComparator obc)
295: throws com.liferay.portal.SystemException,
296: com.liferay.portal.NoSuchAddressException {
297: return getPersistence().findByC_C_C_M_Last(companyId,
298: classNameId, classPK, mailing, obc);
299: }
300:
301: public static com.liferay.portal.model.Address[] findByC_C_C_M_PrevAndNext(
302: long addressId, long companyId, long classNameId,
303: long classPK, boolean mailing,
304: com.liferay.portal.kernel.util.OrderByComparator obc)
305: throws com.liferay.portal.SystemException,
306: com.liferay.portal.NoSuchAddressException {
307: return getPersistence().findByC_C_C_M_PrevAndNext(addressId,
308: companyId, classNameId, classPK, mailing, obc);
309: }
310:
311: public static java.util.List findByC_C_C_P(long companyId,
312: long classNameId, long classPK, boolean primary)
313: throws com.liferay.portal.SystemException {
314: return getPersistence().findByC_C_C_P(companyId, classNameId,
315: classPK, primary);
316: }
317:
318: public static java.util.List findByC_C_C_P(long companyId,
319: long classNameId, long classPK, boolean primary, int begin,
320: int end) throws com.liferay.portal.SystemException {
321: return getPersistence().findByC_C_C_P(companyId, classNameId,
322: classPK, primary, begin, end);
323: }
324:
325: public static java.util.List findByC_C_C_P(long companyId,
326: long classNameId, long classPK, boolean primary, int begin,
327: int end,
328: com.liferay.portal.kernel.util.OrderByComparator obc)
329: throws com.liferay.portal.SystemException {
330: return getPersistence().findByC_C_C_P(companyId, classNameId,
331: classPK, primary, begin, end, obc);
332: }
333:
334: public static com.liferay.portal.model.Address findByC_C_C_P_First(
335: long companyId, long classNameId, long classPK,
336: boolean primary,
337: com.liferay.portal.kernel.util.OrderByComparator obc)
338: throws com.liferay.portal.SystemException,
339: com.liferay.portal.NoSuchAddressException {
340: return getPersistence().findByC_C_C_P_First(companyId,
341: classNameId, classPK, primary, obc);
342: }
343:
344: public static com.liferay.portal.model.Address findByC_C_C_P_Last(
345: long companyId, long classNameId, long classPK,
346: boolean primary,
347: com.liferay.portal.kernel.util.OrderByComparator obc)
348: throws com.liferay.portal.SystemException,
349: com.liferay.portal.NoSuchAddressException {
350: return getPersistence().findByC_C_C_P_Last(companyId,
351: classNameId, classPK, primary, obc);
352: }
353:
354: public static com.liferay.portal.model.Address[] findByC_C_C_P_PrevAndNext(
355: long addressId, long companyId, long classNameId,
356: long classPK, boolean primary,
357: com.liferay.portal.kernel.util.OrderByComparator obc)
358: throws com.liferay.portal.SystemException,
359: com.liferay.portal.NoSuchAddressException {
360: return getPersistence().findByC_C_C_P_PrevAndNext(addressId,
361: companyId, classNameId, classPK, primary, obc);
362: }
363:
364: public static java.util.List findWithDynamicQuery(
365: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
366: throws com.liferay.portal.SystemException {
367: return getPersistence().findWithDynamicQuery(queryInitializer);
368: }
369:
370: public static java.util.List findWithDynamicQuery(
371: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
372: int begin, int end)
373: throws com.liferay.portal.SystemException {
374: return getPersistence().findWithDynamicQuery(queryInitializer,
375: begin, end);
376: }
377:
378: public static java.util.List findAll()
379: throws com.liferay.portal.SystemException {
380: return getPersistence().findAll();
381: }
382:
383: public static java.util.List findAll(int begin, int end)
384: throws com.liferay.portal.SystemException {
385: return getPersistence().findAll(begin, end);
386: }
387:
388: public static java.util.List findAll(int begin, int end,
389: com.liferay.portal.kernel.util.OrderByComparator obc)
390: throws com.liferay.portal.SystemException {
391: return getPersistence().findAll(begin, end, obc);
392: }
393:
394: public static void removeByCompanyId(long companyId)
395: throws com.liferay.portal.SystemException {
396: getPersistence().removeByCompanyId(companyId);
397: }
398:
399: public static void removeByUserId(long userId)
400: throws com.liferay.portal.SystemException {
401: getPersistence().removeByUserId(userId);
402: }
403:
404: public static void removeByC_C(long companyId, long classNameId)
405: throws com.liferay.portal.SystemException {
406: getPersistence().removeByC_C(companyId, classNameId);
407: }
408:
409: public static void removeByC_C_C(long companyId, long classNameId,
410: long classPK) throws com.liferay.portal.SystemException {
411: getPersistence().removeByC_C_C(companyId, classNameId, classPK);
412: }
413:
414: public static void removeByC_C_C_M(long companyId,
415: long classNameId, long classPK, boolean mailing)
416: throws com.liferay.portal.SystemException {
417: getPersistence().removeByC_C_C_M(companyId, classNameId,
418: classPK, mailing);
419: }
420:
421: public static void removeByC_C_C_P(long companyId,
422: long classNameId, long classPK, boolean primary)
423: throws com.liferay.portal.SystemException {
424: getPersistence().removeByC_C_C_P(companyId, classNameId,
425: classPK, primary);
426: }
427:
428: public static void removeAll()
429: throws com.liferay.portal.SystemException {
430: getPersistence().removeAll();
431: }
432:
433: public static int countByCompanyId(long companyId)
434: throws com.liferay.portal.SystemException {
435: return getPersistence().countByCompanyId(companyId);
436: }
437:
438: public static int countByUserId(long userId)
439: throws com.liferay.portal.SystemException {
440: return getPersistence().countByUserId(userId);
441: }
442:
443: public static int countByC_C(long companyId, long classNameId)
444: throws com.liferay.portal.SystemException {
445: return getPersistence().countByC_C(companyId, classNameId);
446: }
447:
448: public static int countByC_C_C(long companyId, long classNameId,
449: long classPK) throws com.liferay.portal.SystemException {
450: return getPersistence().countByC_C_C(companyId, classNameId,
451: classPK);
452: }
453:
454: public static int countByC_C_C_M(long companyId, long classNameId,
455: long classPK, boolean mailing)
456: throws com.liferay.portal.SystemException {
457: return getPersistence().countByC_C_C_M(companyId, classNameId,
458: classPK, mailing);
459: }
460:
461: public static int countByC_C_C_P(long companyId, long classNameId,
462: long classPK, boolean primary)
463: throws com.liferay.portal.SystemException {
464: return getPersistence().countByC_C_C_P(companyId, classNameId,
465: classPK, primary);
466: }
467:
468: public static int countAll()
469: throws com.liferay.portal.SystemException {
470: return getPersistence().countAll();
471: }
472:
473: public static AddressPersistence getPersistence() {
474: return _getUtil()._persistence;
475: }
476:
477: public void setPersistence(AddressPersistence persistence) {
478: _persistence = persistence;
479: }
480:
481: private static AddressUtil _getUtil() {
482: if (_util == null) {
483: _util = (AddressUtil) com.liferay.portal.kernel.bean.BeanLocatorUtil
484: .locate(_UTIL);
485: }
486:
487: return _util;
488: }
489:
490: private static final String _UTIL = AddressUtil.class.getName();
491: private static AddressUtil _util;
492: private AddressPersistence _persistence;
493: }
|