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.documentlibrary.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="DLFileRankLocalServiceUtil.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 DLFileRankLocalService} 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       DLFileRankLocalService
39   * @generated
40   */
41  public class DLFileRankLocalServiceUtil {
42      public static com.liferay.portlet.documentlibrary.model.DLFileRank addDLFileRank(
43          com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank)
44          throws com.liferay.portal.SystemException {
45          return getService().addDLFileRank(dlFileRank);
46      }
47  
48      public static com.liferay.portlet.documentlibrary.model.DLFileRank createDLFileRank(
49          long fileRankId) {
50          return getService().createDLFileRank(fileRankId);
51      }
52  
53      public static void deleteDLFileRank(long fileRankId)
54          throws com.liferay.portal.PortalException,
55              com.liferay.portal.SystemException {
56          getService().deleteDLFileRank(fileRankId);
57      }
58  
59      public static void deleteDLFileRank(
60          com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank)
61          throws com.liferay.portal.SystemException {
62          getService().deleteDLFileRank(dlFileRank);
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.documentlibrary.model.DLFileRank getDLFileRank(
96          long fileRankId)
97          throws com.liferay.portal.PortalException,
98              com.liferay.portal.SystemException {
99          return getService().getDLFileRank(fileRankId);
100     }
101 
102     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> getDLFileRanks(
103         int start, int end) throws com.liferay.portal.SystemException {
104         return getService().getDLFileRanks(start, end);
105     }
106 
107     public static int getDLFileRanksCount()
108         throws com.liferay.portal.SystemException {
109         return getService().getDLFileRanksCount();
110     }
111 
112     public static com.liferay.portlet.documentlibrary.model.DLFileRank updateDLFileRank(
113         com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank)
114         throws com.liferay.portal.SystemException {
115         return getService().updateDLFileRank(dlFileRank);
116     }
117 
118     public static com.liferay.portlet.documentlibrary.model.DLFileRank updateDLFileRank(
119         com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank,
120         boolean merge) throws com.liferay.portal.SystemException {
121         return getService().updateDLFileRank(dlFileRank, merge);
122     }
123 
124     /**
125     * @deprecated
126     */
127     public static com.liferay.portlet.documentlibrary.model.DLFileRank addFileRank(
128         long groupId, long companyId, long userId, long folderId,
129         java.lang.String name) throws com.liferay.portal.SystemException {
130         return getService()
131                    .addFileRank(groupId, companyId, userId, folderId, name);
132     }
133 
134     public static com.liferay.portlet.documentlibrary.model.DLFileRank addFileRank(
135         long groupId, long companyId, long userId, long folderId,
136         java.lang.String name,
137         com.liferay.portal.service.ServiceContext serviceContext)
138         throws com.liferay.portal.SystemException {
139         return getService()
140                    .addFileRank(groupId, companyId, userId, folderId, name,
141             serviceContext);
142     }
143 
144     public static void deleteFileRanks(long userId)
145         throws com.liferay.portal.SystemException {
146         getService().deleteFileRanks(userId);
147     }
148 
149     public static void deleteFileRanks(long folderId, java.lang.String name)
150         throws com.liferay.portal.SystemException {
151         getService().deleteFileRanks(folderId, name);
152     }
153 
154     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> getFileRanks(
155         long groupId, long userId) throws com.liferay.portal.SystemException {
156         return getService().getFileRanks(groupId, userId);
157     }
158 
159     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> getFileRanks(
160         long groupId, long userId, int start, int end)
161         throws com.liferay.portal.SystemException {
162         return getService().getFileRanks(groupId, userId, start, end);
163     }
164 
165     /**
166     * @deprecated
167     */
168     public static com.liferay.portlet.documentlibrary.model.DLFileRank updateFileRank(
169         long groupId, long companyId, long userId, long folderId,
170         java.lang.String name) throws com.liferay.portal.SystemException {
171         return getService()
172                    .updateFileRank(groupId, companyId, userId, folderId, name);
173     }
174 
175     public static com.liferay.portlet.documentlibrary.model.DLFileRank updateFileRank(
176         long groupId, long companyId, long userId, long folderId,
177         java.lang.String name,
178         com.liferay.portal.service.ServiceContext serviceContext)
179         throws com.liferay.portal.SystemException {
180         return getService()
181                    .updateFileRank(groupId, companyId, userId, folderId, name,
182             serviceContext);
183     }
184 
185     public static DLFileRankLocalService getService() {
186         if (_service == null) {
187             _service = (DLFileRankLocalService)PortalBeanLocatorUtil.locate(DLFileRankLocalService.class.getName());
188 
189             ReferenceRegistry.registerReference(DLFileRankLocalServiceUtil.class,
190                 "_service");
191             MethodCache.remove(DLFileRankLocalService.class);
192         }
193 
194         return _service;
195     }
196 
197     public void setService(DLFileRankLocalService service) {
198         MethodCache.remove(DLFileRankLocalService.class);
199 
200         _service = service;
201 
202         ReferenceRegistry.registerReference(DLFileRankLocalServiceUtil.class,
203             "_service");
204         MethodCache.remove(DLFileRankLocalService.class);
205     }
206 
207     private static DLFileRankLocalService _service;
208 }