1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.tags.service;
24  
25  
26  /**
27   * <a href="TagsAssetLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides static methods for the
36   * <code>com.liferay.portlet.tags.service.TagsAssetLocalService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * <p>
43   * <code>com.liferay.portlet.tags.service.TagsAssetLocalServiceFactory</code>
44   * is responsible for the lookup of the bean.
45   * </p>
46   *
47   * @author Brian Wing Shun Chan
48   *
49   * @see com.liferay.portlet.tags.service.TagsAssetLocalService
50   * @see com.liferay.portlet.tags.service.TagsAssetLocalServiceFactory
51   *
52   */
53  public class TagsAssetLocalServiceUtil {
54      public static com.liferay.portlet.tags.model.TagsAsset addTagsAsset(
55          com.liferay.portlet.tags.model.TagsAsset tagsAsset)
56          throws com.liferay.portal.SystemException {
57          TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
58  
59          return tagsAssetLocalService.addTagsAsset(tagsAsset);
60      }
61  
62      public static void deleteTagsAsset(long assetId)
63          throws com.liferay.portal.PortalException,
64              com.liferay.portal.SystemException {
65          TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
66  
67          tagsAssetLocalService.deleteTagsAsset(assetId);
68      }
69  
70      public static void deleteTagsAsset(
71          com.liferay.portlet.tags.model.TagsAsset tagsAsset)
72          throws com.liferay.portal.PortalException,
73              com.liferay.portal.SystemException {
74          TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
75  
76          tagsAssetLocalService.deleteTagsAsset(tagsAsset);
77      }
78  
79      public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> dynamicQuery(
80          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
81          throws com.liferay.portal.SystemException {
82          TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
83  
84          return tagsAssetLocalService.dynamicQuery(queryInitializer);
85      }
86  
87      public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> dynamicQuery(
88          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
89          int begin, int end) throws com.liferay.portal.SystemException {
90          TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
91  
92          return tagsAssetLocalService.dynamicQuery(queryInitializer, begin, end);
93      }
94  
95      public static com.liferay.portlet.tags.model.TagsAsset updateTagsAsset(
96          com.liferay.portlet.tags.model.TagsAsset tagsAsset)
97          throws com.liferay.portal.SystemException {
98          TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
99  
100         return tagsAssetLocalService.updateTagsAsset(tagsAsset);
101     }
102 
103     public static void deleteAsset(long assetId)
104         throws com.liferay.portal.PortalException,
105             com.liferay.portal.SystemException {
106         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
107 
108         tagsAssetLocalService.deleteAsset(assetId);
109     }
110 
111     public static void deleteAsset(java.lang.String className, long classPK)
112         throws com.liferay.portal.PortalException,
113             com.liferay.portal.SystemException {
114         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
115 
116         tagsAssetLocalService.deleteAsset(className, classPK);
117     }
118 
119     public static void deleteAsset(
120         com.liferay.portlet.tags.model.TagsAsset asset)
121         throws com.liferay.portal.PortalException,
122             com.liferay.portal.SystemException {
123         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
124 
125         tagsAssetLocalService.deleteAsset(asset);
126     }
127 
128     public static com.liferay.portlet.tags.model.TagsAsset getAsset(
129         long assetId)
130         throws com.liferay.portal.PortalException,
131             com.liferay.portal.SystemException {
132         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
133 
134         return tagsAssetLocalService.getAsset(assetId);
135     }
136 
137     public static com.liferay.portlet.tags.model.TagsAsset getAsset(
138         java.lang.String className, long classPK)
139         throws com.liferay.portal.PortalException,
140             com.liferay.portal.SystemException {
141         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
142 
143         return tagsAssetLocalService.getAsset(className, classPK);
144     }
145 
146     public static com.liferay.portlet.tags.model.TagsAssetType[] getAssetTypes(
147         java.lang.String languageId) {
148         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
149 
150         return tagsAssetLocalService.getAssetTypes(languageId);
151     }
152 
153     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getAssets(
154         long[] entryIds, long[] notEntryIds, boolean andOperator,
155         boolean excludeZeroViewCount, int begin, int end)
156         throws com.liferay.portal.SystemException {
157         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
158 
159         return tagsAssetLocalService.getAssets(entryIds, notEntryIds,
160             andOperator, excludeZeroViewCount, begin, end);
161     }
162 
163     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getAssets(
164         long groupId, long[] classNameIds, long[] entryIds, long[] notEntryIds,
165         boolean andOperator, boolean excludeZeroViewCount, int begin, int end)
166         throws com.liferay.portal.SystemException {
167         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
168 
169         return tagsAssetLocalService.getAssets(groupId, classNameIds, entryIds,
170             notEntryIds, andOperator, excludeZeroViewCount, begin, end);
171     }
172 
173     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getAssets(
174         long[] entryIds, long[] notEntryIds, boolean andOperator,
175         boolean excludeZeroViewCount, java.util.Date publishDate,
176         java.util.Date expirationDate, int begin, int end)
177         throws com.liferay.portal.SystemException {
178         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
179 
180         return tagsAssetLocalService.getAssets(entryIds, notEntryIds,
181             andOperator, excludeZeroViewCount, publishDate, expirationDate,
182             begin, end);
183     }
184 
185     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getAssets(
186         long groupId, long[] classNameIds, long[] entryIds, long[] notEntryIds,
187         boolean andOperator, boolean excludeZeroViewCount,
188         java.util.Date publishDate, java.util.Date expirationDate, int begin,
189         int end) throws com.liferay.portal.SystemException {
190         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
191 
192         return tagsAssetLocalService.getAssets(groupId, classNameIds, entryIds,
193             notEntryIds, andOperator, excludeZeroViewCount, publishDate,
194             expirationDate, begin, end);
195     }
196 
197     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getAssets(
198         long[] entryIds, long[] notEntryIds, boolean andOperator,
199         java.lang.String orderByCol1, java.lang.String orderByCol2,
200         java.lang.String orderByType1, java.lang.String orderByType2,
201         boolean excludeZeroViewCount, java.util.Date publishDate,
202         java.util.Date expirationDate, int begin, int end)
203         throws com.liferay.portal.SystemException {
204         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
205 
206         return tagsAssetLocalService.getAssets(entryIds, notEntryIds,
207             andOperator, orderByCol1, orderByCol2, orderByType1, orderByType2,
208             excludeZeroViewCount, publishDate, expirationDate, begin, end);
209     }
210 
211     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getAssets(
212         long groupId, long[] classNameIds, long[] entryIds, long[] notEntryIds,
213         boolean andOperator, java.lang.String orderByCol1,
214         java.lang.String orderByCol2, java.lang.String orderByType1,
215         java.lang.String orderByType2, boolean excludeZeroViewCount,
216         java.util.Date publishDate, java.util.Date expirationDate, int begin,
217         int end) throws com.liferay.portal.SystemException {
218         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
219 
220         return tagsAssetLocalService.getAssets(groupId, classNameIds, entryIds,
221             notEntryIds, andOperator, orderByCol1, orderByCol2, orderByType1,
222             orderByType2, excludeZeroViewCount, publishDate, expirationDate,
223             begin, end);
224     }
225 
226     public static int getAssetsCount(long[] entryIds, long[] notEntryIds,
227         boolean andOperator, boolean excludeZeroViewCount)
228         throws com.liferay.portal.SystemException {
229         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
230 
231         return tagsAssetLocalService.getAssetsCount(entryIds, notEntryIds,
232             andOperator, excludeZeroViewCount);
233     }
234 
235     public static int getAssetsCount(long groupId, long[] entryIds,
236         long[] notEntryIds, boolean andOperator, boolean excludeZeroViewCount)
237         throws com.liferay.portal.SystemException {
238         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
239 
240         return tagsAssetLocalService.getAssetsCount(groupId, entryIds,
241             notEntryIds, andOperator, excludeZeroViewCount);
242     }
243 
244     public static int getAssetsCount(long[] entryIds, long[] notEntryIds,
245         boolean andOperator, boolean excludeZeroViewCount,
246         java.util.Date publishDate, java.util.Date expirationDate)
247         throws com.liferay.portal.SystemException {
248         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
249 
250         return tagsAssetLocalService.getAssetsCount(entryIds, notEntryIds,
251             andOperator, excludeZeroViewCount, publishDate, expirationDate);
252     }
253 
254     public static int getAssetsCount(long groupId, long[] classNameIds,
255         long[] entryIds, long[] notEntryIds, boolean andOperator,
256         boolean excludeZeroViewCount, java.util.Date publishDate,
257         java.util.Date expirationDate)
258         throws com.liferay.portal.SystemException {
259         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
260 
261         return tagsAssetLocalService.getAssetsCount(groupId, classNameIds,
262             entryIds, notEntryIds, andOperator, excludeZeroViewCount,
263             publishDate, expirationDate);
264     }
265 
266     public static com.liferay.portlet.tags.model.TagsAssetDisplay[] getCompanyAssetDisplays(
267         long companyId, int begin, int end, java.lang.String languageId)
268         throws com.liferay.portal.PortalException,
269             com.liferay.portal.SystemException {
270         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
271 
272         return tagsAssetLocalService.getCompanyAssetDisplays(companyId, begin,
273             end, languageId);
274     }
275 
276     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getCompanyAssets(
277         long companyId, int begin, int end)
278         throws com.liferay.portal.SystemException {
279         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
280 
281         return tagsAssetLocalService.getCompanyAssets(companyId, begin, end);
282     }
283 
284     public static int getCompanyAssetsCount(long companyId)
285         throws com.liferay.portal.SystemException {
286         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
287 
288         return tagsAssetLocalService.getCompanyAssetsCount(companyId);
289     }
290 
291     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getTopViewedAssets(
292         java.lang.String className, boolean asc, int begin, int end)
293         throws com.liferay.portal.SystemException {
294         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
295 
296         return tagsAssetLocalService.getTopViewedAssets(className, asc, begin,
297             end);
298     }
299 
300     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getTopViewedAssets(
301         java.lang.String[] className, boolean asc, int begin, int end)
302         throws com.liferay.portal.SystemException {
303         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
304 
305         return tagsAssetLocalService.getTopViewedAssets(className, asc, begin,
306             end);
307     }
308 
309     public static com.liferay.portlet.tags.model.TagsAsset incrementViewCounter(
310         java.lang.String className, long classPK)
311         throws com.liferay.portal.PortalException,
312             com.liferay.portal.SystemException {
313         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
314 
315         return tagsAssetLocalService.incrementViewCounter(className, classPK);
316     }
317 
318     public static com.liferay.portal.kernel.search.Hits search(long companyId,
319         java.lang.String portletId, java.lang.String keywords)
320         throws com.liferay.portal.SystemException {
321         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
322 
323         return tagsAssetLocalService.search(companyId, portletId, keywords);
324     }
325 
326     public static com.liferay.portlet.tags.model.TagsAssetDisplay[] searchAssetDisplays(
327         long companyId, java.lang.String portletId, java.lang.String keywords,
328         java.lang.String languageId, int begin, int end)
329         throws com.liferay.portal.PortalException,
330             com.liferay.portal.SystemException {
331         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
332 
333         return tagsAssetLocalService.searchAssetDisplays(companyId, portletId,
334             keywords, languageId, begin, end);
335     }
336 
337     public static int searchAssetDisplaysCount(long companyId,
338         java.lang.String portletId, java.lang.String keywords,
339         java.lang.String languageId) throws com.liferay.portal.SystemException {
340         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
341 
342         return tagsAssetLocalService.searchAssetDisplaysCount(companyId,
343             portletId, keywords, languageId);
344     }
345 
346     public static com.liferay.portlet.tags.model.TagsAsset updateAsset(
347         long userId, long groupId, java.lang.String className, long classPK,
348         java.lang.String[] entryNames)
349         throws com.liferay.portal.PortalException,
350             com.liferay.portal.SystemException {
351         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
352 
353         return tagsAssetLocalService.updateAsset(userId, groupId, className,
354             classPK, entryNames);
355     }
356 
357     public static com.liferay.portlet.tags.model.TagsAsset updateAsset(
358         long userId, long groupId, java.lang.String className, long classPK,
359         java.lang.String[] entryNames, java.util.Date startDate,
360         java.util.Date endDate, java.util.Date publishDate,
361         java.util.Date expirationDate, java.lang.String mimeType,
362         java.lang.String title, java.lang.String description,
363         java.lang.String summary, java.lang.String url, int height, int width,
364         java.lang.Integer priority)
365         throws com.liferay.portal.PortalException,
366             com.liferay.portal.SystemException {
367         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
368 
369         return tagsAssetLocalService.updateAsset(userId, groupId, className,
370             classPK, entryNames, startDate, endDate, publishDate,
371             expirationDate, mimeType, title, description, summary, url, height,
372             width, priority);
373     }
374 
375     public static com.liferay.portlet.tags.model.TagsAsset updateAsset(
376         long userId, long groupId, java.lang.String className, long classPK,
377         java.lang.String[] entryNames, java.util.Date startDate,
378         java.util.Date endDate, java.util.Date publishDate,
379         java.util.Date expirationDate, java.lang.String mimeType,
380         java.lang.String title, java.lang.String description,
381         java.lang.String summary, java.lang.String url, int height, int width,
382         java.lang.Integer priority, boolean sync)
383         throws com.liferay.portal.PortalException,
384             com.liferay.portal.SystemException {
385         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
386 
387         return tagsAssetLocalService.updateAsset(userId, groupId, className,
388             classPK, entryNames, startDate, endDate, publishDate,
389             expirationDate, mimeType, title, description, summary, url, height,
390             width, priority, sync);
391     }
392 
393     public static void validate(java.lang.String className,
394         java.lang.String[] entryNames)
395         throws com.liferay.portal.PortalException {
396         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
397 
398         tagsAssetLocalService.validate(className, entryNames);
399     }
400 }