1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portlet.messageboards.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.util.MethodCache;
19  import com.liferay.portal.kernel.util.ReferenceRegistry;
20  
21  /**
22   * <a href="MBMailingListLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
23   *
24   * <p>
25   * ServiceBuilder generated this class. Modifications in this class will be
26   * overwritten the next time is generated.
27   * </p>
28   *
29   * <p>
30   * This class provides static methods for the
31   * {@link MBMailingListLocalService} bean. The static methods of
32   * this class calls the same methods of the bean instance. It's convenient to be
33   * able to just write one line to call a method on a bean instead of writing a
34   * lookup call and a method call.
35   * </p>
36   *
37   * @author    Brian Wing Shun Chan
38   * @see       MBMailingListLocalService
39   * @generated
40   */
41  public class MBMailingListLocalServiceUtil {
42      public static com.liferay.portlet.messageboards.model.MBMailingList addMBMailingList(
43          com.liferay.portlet.messageboards.model.MBMailingList mbMailingList)
44          throws com.liferay.portal.SystemException {
45          return getService().addMBMailingList(mbMailingList);
46      }
47  
48      public static com.liferay.portlet.messageboards.model.MBMailingList createMBMailingList(
49          long mailingListId) {
50          return getService().createMBMailingList(mailingListId);
51      }
52  
53      public static void deleteMBMailingList(long mailingListId)
54          throws com.liferay.portal.PortalException,
55              com.liferay.portal.SystemException {
56          getService().deleteMBMailingList(mailingListId);
57      }
58  
59      public static void deleteMBMailingList(
60          com.liferay.portlet.messageboards.model.MBMailingList mbMailingList)
61          throws com.liferay.portal.SystemException {
62          getService().deleteMBMailingList(mbMailingList);
63      }
64  
65      @SuppressWarnings("rawtypes")
66      public static java.util.List dynamicQuery(
67          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
68          throws com.liferay.portal.SystemException {
69          return getService().dynamicQuery(dynamicQuery);
70      }
71  
72      @SuppressWarnings("rawtypes")
73      public static java.util.List dynamicQuery(
74          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
75          int end) throws com.liferay.portal.SystemException {
76          return getService().dynamicQuery(dynamicQuery, start, end);
77      }
78  
79      @SuppressWarnings("rawtypes")
80      public static java.util.List dynamicQuery(
81          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
82          int end,
83          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
84          throws com.liferay.portal.SystemException {
85          return getService()
86                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
87      }
88  
89      public static int dynamicQueryCount(
90          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
91          throws com.liferay.portal.SystemException {
92          return getService().dynamicQueryCount(dynamicQuery);
93      }
94  
95      public static com.liferay.portlet.messageboards.model.MBMailingList getMBMailingList(
96          long mailingListId)
97          throws com.liferay.portal.PortalException,
98              com.liferay.portal.SystemException {
99          return getService().getMBMailingList(mailingListId);
100     }
101 
102     public static com.liferay.portlet.messageboards.model.MBMailingList getMBMailingListByUuidAndGroupId(
103         java.lang.String uuid, long groupId)
104         throws com.liferay.portal.PortalException,
105             com.liferay.portal.SystemException {
106         return getService().getMBMailingListByUuidAndGroupId(uuid, groupId);
107     }
108 
109     public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> getMBMailingLists(
110         int start, int end) throws com.liferay.portal.SystemException {
111         return getService().getMBMailingLists(start, end);
112     }
113 
114     public static int getMBMailingListsCount()
115         throws com.liferay.portal.SystemException {
116         return getService().getMBMailingListsCount();
117     }
118 
119     public static com.liferay.portlet.messageboards.model.MBMailingList updateMBMailingList(
120         com.liferay.portlet.messageboards.model.MBMailingList mbMailingList)
121         throws com.liferay.portal.SystemException {
122         return getService().updateMBMailingList(mbMailingList);
123     }
124 
125     public static com.liferay.portlet.messageboards.model.MBMailingList updateMBMailingList(
126         com.liferay.portlet.messageboards.model.MBMailingList mbMailingList,
127         boolean merge) throws com.liferay.portal.SystemException {
128         return getService().updateMBMailingList(mbMailingList, merge);
129     }
130 
131     public static com.liferay.portlet.messageboards.model.MBMailingList addMailingList(
132         java.lang.String uuid, long userId, long categoryId,
133         java.lang.String emailAddress, java.lang.String inProtocol,
134         java.lang.String inServerName, int inServerPort, boolean inUseSSL,
135         java.lang.String inUserName, java.lang.String inPassword,
136         int inReadInterval, java.lang.String outEmailAddress,
137         boolean outCustom, java.lang.String outServerName, int outServerPort,
138         boolean outUseSSL, java.lang.String outUserName,
139         java.lang.String outPassword, boolean active)
140         throws com.liferay.portal.PortalException,
141             com.liferay.portal.SystemException {
142         return getService()
143                    .addMailingList(uuid, userId, categoryId, emailAddress,
144             inProtocol, inServerName, inServerPort, inUseSSL, inUserName,
145             inPassword, inReadInterval, outEmailAddress, outCustom,
146             outServerName, outServerPort, outUseSSL, outUserName, outPassword,
147             active);
148     }
149 
150     public static void deleteCategoryMailingList(long categoryId)
151         throws com.liferay.portal.PortalException,
152             com.liferay.portal.SystemException {
153         getService().deleteCategoryMailingList(categoryId);
154     }
155 
156     public static void deleteMailingList(long mailingListId)
157         throws com.liferay.portal.PortalException,
158             com.liferay.portal.SystemException {
159         getService().deleteMailingList(mailingListId);
160     }
161 
162     public static void deleteMailingList(
163         com.liferay.portlet.messageboards.model.MBMailingList mailingList)
164         throws com.liferay.portal.PortalException,
165             com.liferay.portal.SystemException {
166         getService().deleteMailingList(mailingList);
167     }
168 
169     public static com.liferay.portlet.messageboards.model.MBMailingList getCategoryMailingList(
170         long categoryId)
171         throws com.liferay.portal.PortalException,
172             com.liferay.portal.SystemException {
173         return getService().getCategoryMailingList(categoryId);
174     }
175 
176     public static com.liferay.portlet.messageboards.model.MBMailingList updateMailingList(
177         long mailingListId, java.lang.String emailAddress,
178         java.lang.String inProtocol, java.lang.String inServerName,
179         int inServerPort, boolean inUseSSL, java.lang.String inUserName,
180         java.lang.String inPassword, int inReadInterval,
181         java.lang.String outEmailAddress, boolean outCustom,
182         java.lang.String outServerName, int outServerPort, boolean outUseSSL,
183         java.lang.String outUserName, java.lang.String outPassword,
184         boolean active)
185         throws com.liferay.portal.PortalException,
186             com.liferay.portal.SystemException {
187         return getService()
188                    .updateMailingList(mailingListId, emailAddress, inProtocol,
189             inServerName, inServerPort, inUseSSL, inUserName, inPassword,
190             inReadInterval, outEmailAddress, outCustom, outServerName,
191             outServerPort, outUseSSL, outUserName, outPassword, active);
192     }
193 
194     public static MBMailingListLocalService getService() {
195         if (_service == null) {
196             _service = (MBMailingListLocalService)PortalBeanLocatorUtil.locate(MBMailingListLocalService.class.getName());
197 
198             ReferenceRegistry.registerReference(MBMailingListLocalServiceUtil.class,
199                 "_service");
200             MethodCache.remove(MBMailingListLocalService.class);
201         }
202 
203         return _service;
204     }
205 
206     public void setService(MBMailingListLocalService service) {
207         MethodCache.remove(MBMailingListLocalService.class);
208 
209         _service = service;
210 
211         ReferenceRegistry.registerReference(MBMailingListLocalServiceUtil.class,
212             "_service");
213         MethodCache.remove(MBMailingListLocalService.class);
214     }
215 
216     private static MBMailingListLocalService _service;
217 }