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="TagsEntryLocalServiceUtil.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.TagsEntryLocalService</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.TagsEntryLocalServiceFactory</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.TagsEntryLocalService
50   * @see com.liferay.portlet.tags.service.TagsEntryLocalServiceFactory
51   *
52   */
53  public class TagsEntryLocalServiceUtil {
54      public static com.liferay.portlet.tags.model.TagsEntry addTagsEntry(
55          com.liferay.portlet.tags.model.TagsEntry tagsEntry)
56          throws com.liferay.portal.SystemException {
57          TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
58  
59          return tagsEntryLocalService.addTagsEntry(tagsEntry);
60      }
61  
62      public static void deleteTagsEntry(long entryId)
63          throws com.liferay.portal.PortalException,
64              com.liferay.portal.SystemException {
65          TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
66  
67          tagsEntryLocalService.deleteTagsEntry(entryId);
68      }
69  
70      public static void deleteTagsEntry(
71          com.liferay.portlet.tags.model.TagsEntry tagsEntry)
72          throws com.liferay.portal.PortalException,
73              com.liferay.portal.SystemException {
74          TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
75  
76          tagsEntryLocalService.deleteTagsEntry(tagsEntry);
77      }
78  
79      public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> dynamicQuery(
80          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
81          throws com.liferay.portal.SystemException {
82          TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
83  
84          return tagsEntryLocalService.dynamicQuery(queryInitializer);
85      }
86  
87      public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> dynamicQuery(
88          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
89          int begin, int end) throws com.liferay.portal.SystemException {
90          TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
91  
92          return tagsEntryLocalService.dynamicQuery(queryInitializer, begin, end);
93      }
94  
95      public static com.liferay.portlet.tags.model.TagsEntry updateTagsEntry(
96          com.liferay.portlet.tags.model.TagsEntry tagsEntry)
97          throws com.liferay.portal.SystemException {
98          TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
99  
100         return tagsEntryLocalService.updateTagsEntry(tagsEntry);
101     }
102 
103     public static com.liferay.portlet.tags.model.TagsEntry addEntry(
104         long userId, java.lang.String name)
105         throws com.liferay.portal.PortalException,
106             com.liferay.portal.SystemException {
107         TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
108 
109         return tagsEntryLocalService.addEntry(userId, name);
110     }
111 
112     public static com.liferay.portlet.tags.model.TagsEntry addEntry(
113         long userId, java.lang.String name, java.lang.String[] properties)
114         throws com.liferay.portal.PortalException,
115             com.liferay.portal.SystemException {
116         TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
117 
118         return tagsEntryLocalService.addEntry(userId, name, properties);
119     }
120 
121     public static void checkEntries(long userId, java.lang.String[] names)
122         throws com.liferay.portal.PortalException,
123             com.liferay.portal.SystemException {
124         TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
125 
126         tagsEntryLocalService.checkEntries(userId, names);
127     }
128 
129     public static void deleteEntry(long entryId)
130         throws com.liferay.portal.PortalException,
131             com.liferay.portal.SystemException {
132         TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
133 
134         tagsEntryLocalService.deleteEntry(entryId);
135     }
136 
137     public static void deleteEntry(
138         com.liferay.portlet.tags.model.TagsEntry entry)
139         throws com.liferay.portal.PortalException,
140             com.liferay.portal.SystemException {
141         TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
142 
143         tagsEntryLocalService.deleteEntry(entry);
144     }
145 
146     public static boolean hasEntry(long companyId, java.lang.String name)
147         throws com.liferay.portal.SystemException {
148         TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
149 
150         return tagsEntryLocalService.hasEntry(companyId, name);
151     }
152 
153     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> getAssetEntries(
154         long assetId)
155         throws com.liferay.portal.PortalException,
156             com.liferay.portal.SystemException {
157         TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
158 
159         return tagsEntryLocalService.getAssetEntries(assetId);
160     }
161 
162     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> getEntries()
163         throws com.liferay.portal.SystemException {
164         TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
165 
166         return tagsEntryLocalService.getEntries();
167     }
168 
169     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> getEntries(
170         java.lang.String className, long classPK)
171         throws com.liferay.portal.PortalException,
172             com.liferay.portal.SystemException {
173         TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
174 
175         return tagsEntryLocalService.getEntries(className, classPK);
176     }
177 
178     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> getEntries(
179         long classNameId, long classPK)
180         throws com.liferay.portal.PortalException,
181             com.liferay.portal.SystemException {
182         TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
183 
184         return tagsEntryLocalService.getEntries(classNameId, classPK);
185     }
186 
187     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> getEntries(
188         long groupId, long companyId, long classNameId, java.lang.String name)
189         throws com.liferay.portal.SystemException {
190         TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
191 
192         return tagsEntryLocalService.getEntries(groupId, companyId,
193             classNameId, name);
194     }
195 
196     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> getEntries(
197         long groupId, long companyId, long classNameId, java.lang.String name,
198         int begin, int end) throws com.liferay.portal.SystemException {
199         TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
200 
201         return tagsEntryLocalService.getEntries(groupId, companyId,
202             classNameId, name, begin, end);
203     }
204 
205     public static int getEntriesSize(long groupId, long companyId,
206         long classNameId, java.lang.String name)
207         throws com.liferay.portal.SystemException {
208         TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
209 
210         return tagsEntryLocalService.getEntriesSize(groupId, companyId,
211             classNameId, name);
212     }
213 
214     public static com.liferay.portlet.tags.model.TagsEntry getEntry(
215         long entryId)
216         throws com.liferay.portal.PortalException,
217             com.liferay.portal.SystemException {
218         TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
219 
220         return tagsEntryLocalService.getEntry(entryId);
221     }
222 
223     public static com.liferay.portlet.tags.model.TagsEntry getEntry(
224         long companyId, java.lang.String name)
225         throws com.liferay.portal.PortalException,
226             com.liferay.portal.SystemException {
227         TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
228 
229         return tagsEntryLocalService.getEntry(companyId, name);
230     }
231 
232     public static long[] getEntryIds(long companyId, java.lang.String[] names)
233         throws com.liferay.portal.PortalException,
234             com.liferay.portal.SystemException {
235         TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
236 
237         return tagsEntryLocalService.getEntryIds(companyId, names);
238     }
239 
240     public static java.lang.String[] getEntryNames()
241         throws com.liferay.portal.SystemException {
242         TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
243 
244         return tagsEntryLocalService.getEntryNames();
245     }
246 
247     public static java.lang.String[] getEntryNames(java.lang.String className,
248         long classPK)
249         throws com.liferay.portal.PortalException,
250             com.liferay.portal.SystemException {
251         TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
252 
253         return tagsEntryLocalService.getEntryNames(className, classPK);
254     }
255 
256     public static java.lang.String[] getEntryNames(long classNameId,
257         long classPK)
258         throws com.liferay.portal.PortalException,
259             com.liferay.portal.SystemException {
260         TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
261 
262         return tagsEntryLocalService.getEntryNames(classNameId, classPK);
263     }
264 
265     public static void mergeEntries(long fromEntryId, long toEntryId)
266         throws com.liferay.portal.PortalException,
267             com.liferay.portal.SystemException {
268         TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
269 
270         tagsEntryLocalService.mergeEntries(fromEntryId, toEntryId);
271     }
272 
273     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> search(
274         long companyId, java.lang.String name, java.lang.String[] properties)
275         throws com.liferay.portal.SystemException {
276         TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
277 
278         return tagsEntryLocalService.search(companyId, name, properties);
279     }
280 
281     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> search(
282         long companyId, java.lang.String name, java.lang.String[] properties,
283         int begin, int end) throws com.liferay.portal.SystemException {
284         TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
285 
286         return tagsEntryLocalService.search(companyId, name, properties, begin,
287             end);
288     }
289 
290     public static com.liferay.portal.kernel.json.JSONArrayWrapper searchAutocomplete(
291         long companyId, java.lang.String name, java.lang.String[] properties,
292         int begin, int end) throws com.liferay.portal.SystemException {
293         TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
294 
295         return tagsEntryLocalService.searchAutocomplete(companyId, name,
296             properties, begin, end);
297     }
298 
299     public static int searchCount(long companyId, java.lang.String name,
300         java.lang.String[] properties)
301         throws com.liferay.portal.SystemException {
302         TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
303 
304         return tagsEntryLocalService.searchCount(companyId, name, properties);
305     }
306 
307     public static com.liferay.portlet.tags.model.TagsEntry updateEntry(
308         long entryId, java.lang.String name)
309         throws com.liferay.portal.PortalException,
310             com.liferay.portal.SystemException {
311         TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
312 
313         return tagsEntryLocalService.updateEntry(entryId, name);
314     }
315 
316     public static com.liferay.portlet.tags.model.TagsEntry updateEntry(
317         long userId, long entryId, java.lang.String name,
318         java.lang.String[] properties)
319         throws com.liferay.portal.PortalException,
320             com.liferay.portal.SystemException {
321         TagsEntryLocalService tagsEntryLocalService = TagsEntryLocalServiceFactory.getService();
322 
323         return tagsEntryLocalService.updateEntry(userId, entryId, name,
324             properties);
325     }
326 }