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="TagsEntryServiceUtil.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.TagsEntryService</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.TagsEntryServiceFactory</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.TagsEntryService
50   * @see com.liferay.portlet.tags.service.TagsEntryServiceFactory
51   *
52   */
53  public class TagsEntryServiceUtil {
54      public static com.liferay.portlet.tags.model.TagsEntry addEntry(
55          java.lang.String name)
56          throws com.liferay.portal.PortalException,
57              com.liferay.portal.SystemException, java.rmi.RemoteException {
58          TagsEntryService tagsEntryService = TagsEntryServiceFactory.getService();
59  
60          return tagsEntryService.addEntry(name);
61      }
62  
63      public static com.liferay.portlet.tags.model.TagsEntry addEntry(
64          java.lang.String name, java.lang.String[] properties)
65          throws com.liferay.portal.PortalException,
66              com.liferay.portal.SystemException, java.rmi.RemoteException {
67          TagsEntryService tagsEntryService = TagsEntryServiceFactory.getService();
68  
69          return tagsEntryService.addEntry(name, properties);
70      }
71  
72      public static void deleteEntry(long entryId)
73          throws com.liferay.portal.PortalException,
74              com.liferay.portal.SystemException, java.rmi.RemoteException {
75          TagsEntryService tagsEntryService = TagsEntryServiceFactory.getService();
76  
77          tagsEntryService.deleteEntry(entryId);
78      }
79  
80      public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> getEntries(
81          java.lang.String className, long classPK)
82          throws com.liferay.portal.PortalException,
83              com.liferay.portal.SystemException, java.rmi.RemoteException {
84          TagsEntryService tagsEntryService = TagsEntryServiceFactory.getService();
85  
86          return tagsEntryService.getEntries(className, classPK);
87      }
88  
89      public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> getEntries(
90          long groupId, long companyId, long classNameId, java.lang.String name)
91          throws com.liferay.portal.SystemException, java.rmi.RemoteException {
92          TagsEntryService tagsEntryService = TagsEntryServiceFactory.getService();
93  
94          return tagsEntryService.getEntries(groupId, companyId, classNameId, name);
95      }
96  
97      public static void mergeEntries(long fromEntryId, long toEntryId)
98          throws com.liferay.portal.PortalException,
99              com.liferay.portal.SystemException, java.rmi.RemoteException {
100         TagsEntryService tagsEntryService = TagsEntryServiceFactory.getService();
101 
102         tagsEntryService.mergeEntries(fromEntryId, toEntryId);
103     }
104 
105     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> search(
106         long companyId, java.lang.String name, java.lang.String[] properties)
107         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
108         TagsEntryService tagsEntryService = TagsEntryServiceFactory.getService();
109 
110         return tagsEntryService.search(companyId, name, properties);
111     }
112 
113     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> search(
114         long companyId, java.lang.String name, java.lang.String[] properties,
115         int begin, int end)
116         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
117         TagsEntryService tagsEntryService = TagsEntryServiceFactory.getService();
118 
119         return tagsEntryService.search(companyId, name, properties, begin, end);
120     }
121 
122     public static com.liferay.portal.kernel.json.JSONArrayWrapper searchAutocomplete(
123         long companyId, java.lang.String name, java.lang.String[] properties,
124         int begin, int end)
125         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
126         TagsEntryService tagsEntryService = TagsEntryServiceFactory.getService();
127 
128         return tagsEntryService.searchAutocomplete(companyId, name, properties,
129             begin, end);
130     }
131 
132     public static int searchCount(long companyId, java.lang.String name,
133         java.lang.String[] properties)
134         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
135         TagsEntryService tagsEntryService = TagsEntryServiceFactory.getService();
136 
137         return tagsEntryService.searchCount(companyId, name, properties);
138     }
139 
140     public static com.liferay.portlet.tags.model.TagsEntry updateEntry(
141         long entryId, java.lang.String name)
142         throws com.liferay.portal.PortalException,
143             com.liferay.portal.SystemException, java.rmi.RemoteException {
144         TagsEntryService tagsEntryService = TagsEntryServiceFactory.getService();
145 
146         return tagsEntryService.updateEntry(entryId, name);
147     }
148 
149     public static com.liferay.portlet.tags.model.TagsEntry updateEntry(
150         long entryId, java.lang.String name, java.lang.String[] properties)
151         throws com.liferay.portal.PortalException,
152             com.liferay.portal.SystemException, java.rmi.RemoteException {
153         TagsEntryService tagsEntryService = TagsEntryServiceFactory.getService();
154 
155         return tagsEntryService.updateEntry(entryId, name, properties);
156     }
157 }