1   /**
2    * Copyright (c) 2000-2009 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   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.tags.service.base;
21  
22  import com.liferay.counter.service.CounterLocalService;
23  import com.liferay.counter.service.CounterService;
24  
25  import com.liferay.portal.PortalException;
26  import com.liferay.portal.SystemException;
27  import com.liferay.portal.kernel.annotation.BeanReference;
28  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
29  import com.liferay.portal.service.UserLocalService;
30  import com.liferay.portal.service.UserService;
31  import com.liferay.portal.service.persistence.UserFinder;
32  import com.liferay.portal.service.persistence.UserPersistence;
33  import com.liferay.portal.util.PortalUtil;
34  
35  import com.liferay.portlet.tags.model.TagsEntry;
36  import com.liferay.portlet.tags.service.TagsAssetLocalService;
37  import com.liferay.portlet.tags.service.TagsAssetService;
38  import com.liferay.portlet.tags.service.TagsEntryLocalService;
39  import com.liferay.portlet.tags.service.TagsEntryService;
40  import com.liferay.portlet.tags.service.TagsPropertyLocalService;
41  import com.liferay.portlet.tags.service.TagsPropertyService;
42  import com.liferay.portlet.tags.service.TagsSourceLocalService;
43  import com.liferay.portlet.tags.service.TagsSourceService;
44  import com.liferay.portlet.tags.service.persistence.TagsAssetFinder;
45  import com.liferay.portlet.tags.service.persistence.TagsAssetPersistence;
46  import com.liferay.portlet.tags.service.persistence.TagsEntryFinder;
47  import com.liferay.portlet.tags.service.persistence.TagsEntryPersistence;
48  import com.liferay.portlet.tags.service.persistence.TagsPropertyFinder;
49  import com.liferay.portlet.tags.service.persistence.TagsPropertyKeyFinder;
50  import com.liferay.portlet.tags.service.persistence.TagsPropertyPersistence;
51  import com.liferay.portlet.tags.service.persistence.TagsSourcePersistence;
52  
53  import java.util.List;
54  
55  /**
56   * <a href="TagsEntryLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
57   *
58   * @author Brian Wing Shun Chan
59   *
60   */
61  public abstract class TagsEntryLocalServiceBaseImpl
62      implements TagsEntryLocalService {
63      public TagsEntry addTagsEntry(TagsEntry tagsEntry)
64          throws SystemException {
65          tagsEntry.setNew(true);
66  
67          return tagsEntryPersistence.update(tagsEntry, false);
68      }
69  
70      public TagsEntry createTagsEntry(long entryId) {
71          return tagsEntryPersistence.create(entryId);
72      }
73  
74      public void deleteTagsEntry(long entryId)
75          throws PortalException, SystemException {
76          tagsEntryPersistence.remove(entryId);
77      }
78  
79      public void deleteTagsEntry(TagsEntry tagsEntry) throws SystemException {
80          tagsEntryPersistence.remove(tagsEntry);
81      }
82  
83      public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
84          throws SystemException {
85          return tagsEntryPersistence.findWithDynamicQuery(dynamicQuery);
86      }
87  
88      public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
89          int end) throws SystemException {
90          return tagsEntryPersistence.findWithDynamicQuery(dynamicQuery, start,
91              end);
92      }
93  
94      public TagsEntry getTagsEntry(long entryId)
95          throws PortalException, SystemException {
96          return tagsEntryPersistence.findByPrimaryKey(entryId);
97      }
98  
99      public List<TagsEntry> getTagsEntries(int start, int end)
100         throws SystemException {
101         return tagsEntryPersistence.findAll(start, end);
102     }
103 
104     public int getTagsEntriesCount() throws SystemException {
105         return tagsEntryPersistence.countAll();
106     }
107 
108     public TagsEntry updateTagsEntry(TagsEntry tagsEntry)
109         throws SystemException {
110         tagsEntry.setNew(false);
111 
112         return tagsEntryPersistence.update(tagsEntry, true);
113     }
114 
115     public TagsEntry updateTagsEntry(TagsEntry tagsEntry, boolean merge)
116         throws SystemException {
117         tagsEntry.setNew(false);
118 
119         return tagsEntryPersistence.update(tagsEntry, merge);
120     }
121 
122     public TagsAssetLocalService getTagsAssetLocalService() {
123         return tagsAssetLocalService;
124     }
125 
126     public void setTagsAssetLocalService(
127         TagsAssetLocalService tagsAssetLocalService) {
128         this.tagsAssetLocalService = tagsAssetLocalService;
129     }
130 
131     public TagsAssetService getTagsAssetService() {
132         return tagsAssetService;
133     }
134 
135     public void setTagsAssetService(TagsAssetService tagsAssetService) {
136         this.tagsAssetService = tagsAssetService;
137     }
138 
139     public TagsAssetPersistence getTagsAssetPersistence() {
140         return tagsAssetPersistence;
141     }
142 
143     public void setTagsAssetPersistence(
144         TagsAssetPersistence tagsAssetPersistence) {
145         this.tagsAssetPersistence = tagsAssetPersistence;
146     }
147 
148     public TagsAssetFinder getTagsAssetFinder() {
149         return tagsAssetFinder;
150     }
151 
152     public void setTagsAssetFinder(TagsAssetFinder tagsAssetFinder) {
153         this.tagsAssetFinder = tagsAssetFinder;
154     }
155 
156     public TagsEntryLocalService getTagsEntryLocalService() {
157         return tagsEntryLocalService;
158     }
159 
160     public void setTagsEntryLocalService(
161         TagsEntryLocalService tagsEntryLocalService) {
162         this.tagsEntryLocalService = tagsEntryLocalService;
163     }
164 
165     public TagsEntryService getTagsEntryService() {
166         return tagsEntryService;
167     }
168 
169     public void setTagsEntryService(TagsEntryService tagsEntryService) {
170         this.tagsEntryService = tagsEntryService;
171     }
172 
173     public TagsEntryPersistence getTagsEntryPersistence() {
174         return tagsEntryPersistence;
175     }
176 
177     public void setTagsEntryPersistence(
178         TagsEntryPersistence tagsEntryPersistence) {
179         this.tagsEntryPersistence = tagsEntryPersistence;
180     }
181 
182     public TagsEntryFinder getTagsEntryFinder() {
183         return tagsEntryFinder;
184     }
185 
186     public void setTagsEntryFinder(TagsEntryFinder tagsEntryFinder) {
187         this.tagsEntryFinder = tagsEntryFinder;
188     }
189 
190     public TagsPropertyLocalService getTagsPropertyLocalService() {
191         return tagsPropertyLocalService;
192     }
193 
194     public void setTagsPropertyLocalService(
195         TagsPropertyLocalService tagsPropertyLocalService) {
196         this.tagsPropertyLocalService = tagsPropertyLocalService;
197     }
198 
199     public TagsPropertyService getTagsPropertyService() {
200         return tagsPropertyService;
201     }
202 
203     public void setTagsPropertyService(TagsPropertyService tagsPropertyService) {
204         this.tagsPropertyService = tagsPropertyService;
205     }
206 
207     public TagsPropertyPersistence getTagsPropertyPersistence() {
208         return tagsPropertyPersistence;
209     }
210 
211     public void setTagsPropertyPersistence(
212         TagsPropertyPersistence tagsPropertyPersistence) {
213         this.tagsPropertyPersistence = tagsPropertyPersistence;
214     }
215 
216     public TagsPropertyFinder getTagsPropertyFinder() {
217         return tagsPropertyFinder;
218     }
219 
220     public void setTagsPropertyFinder(TagsPropertyFinder tagsPropertyFinder) {
221         this.tagsPropertyFinder = tagsPropertyFinder;
222     }
223 
224     public TagsPropertyKeyFinder getTagsPropertyKeyFinder() {
225         return tagsPropertyKeyFinder;
226     }
227 
228     public void setTagsPropertyKeyFinder(
229         TagsPropertyKeyFinder tagsPropertyKeyFinder) {
230         this.tagsPropertyKeyFinder = tagsPropertyKeyFinder;
231     }
232 
233     public TagsSourceLocalService getTagsSourceLocalService() {
234         return tagsSourceLocalService;
235     }
236 
237     public void setTagsSourceLocalService(
238         TagsSourceLocalService tagsSourceLocalService) {
239         this.tagsSourceLocalService = tagsSourceLocalService;
240     }
241 
242     public TagsSourceService getTagsSourceService() {
243         return tagsSourceService;
244     }
245 
246     public void setTagsSourceService(TagsSourceService tagsSourceService) {
247         this.tagsSourceService = tagsSourceService;
248     }
249 
250     public TagsSourcePersistence getTagsSourcePersistence() {
251         return tagsSourcePersistence;
252     }
253 
254     public void setTagsSourcePersistence(
255         TagsSourcePersistence tagsSourcePersistence) {
256         this.tagsSourcePersistence = tagsSourcePersistence;
257     }
258 
259     public CounterLocalService getCounterLocalService() {
260         return counterLocalService;
261     }
262 
263     public void setCounterLocalService(CounterLocalService counterLocalService) {
264         this.counterLocalService = counterLocalService;
265     }
266 
267     public CounterService getCounterService() {
268         return counterService;
269     }
270 
271     public void setCounterService(CounterService counterService) {
272         this.counterService = counterService;
273     }
274 
275     public UserLocalService getUserLocalService() {
276         return userLocalService;
277     }
278 
279     public void setUserLocalService(UserLocalService userLocalService) {
280         this.userLocalService = userLocalService;
281     }
282 
283     public UserService getUserService() {
284         return userService;
285     }
286 
287     public void setUserService(UserService userService) {
288         this.userService = userService;
289     }
290 
291     public UserPersistence getUserPersistence() {
292         return userPersistence;
293     }
294 
295     public void setUserPersistence(UserPersistence userPersistence) {
296         this.userPersistence = userPersistence;
297     }
298 
299     public UserFinder getUserFinder() {
300         return userFinder;
301     }
302 
303     public void setUserFinder(UserFinder userFinder) {
304         this.userFinder = userFinder;
305     }
306 
307     protected void runSQL(String sql) throws SystemException {
308         try {
309             PortalUtil.runSQL(sql);
310         }
311         catch (Exception e) {
312             throw new SystemException(e);
313         }
314     }
315 
316     @BeanReference(name = "com.liferay.portlet.tags.service.TagsAssetLocalService.impl")
317     protected TagsAssetLocalService tagsAssetLocalService;
318     @BeanReference(name = "com.liferay.portlet.tags.service.TagsAssetService.impl")
319     protected TagsAssetService tagsAssetService;
320     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsAssetPersistence.impl")
321     protected TagsAssetPersistence tagsAssetPersistence;
322     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsAssetFinder.impl")
323     protected TagsAssetFinder tagsAssetFinder;
324     @BeanReference(name = "com.liferay.portlet.tags.service.TagsEntryLocalService.impl")
325     protected TagsEntryLocalService tagsEntryLocalService;
326     @BeanReference(name = "com.liferay.portlet.tags.service.TagsEntryService.impl")
327     protected TagsEntryService tagsEntryService;
328     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsEntryPersistence.impl")
329     protected TagsEntryPersistence tagsEntryPersistence;
330     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsEntryFinder.impl")
331     protected TagsEntryFinder tagsEntryFinder;
332     @BeanReference(name = "com.liferay.portlet.tags.service.TagsPropertyLocalService.impl")
333     protected TagsPropertyLocalService tagsPropertyLocalService;
334     @BeanReference(name = "com.liferay.portlet.tags.service.TagsPropertyService.impl")
335     protected TagsPropertyService tagsPropertyService;
336     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsPropertyPersistence.impl")
337     protected TagsPropertyPersistence tagsPropertyPersistence;
338     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsPropertyFinder.impl")
339     protected TagsPropertyFinder tagsPropertyFinder;
340     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsPropertyKeyFinder.impl")
341     protected TagsPropertyKeyFinder tagsPropertyKeyFinder;
342     @BeanReference(name = "com.liferay.portlet.tags.service.TagsSourceLocalService.impl")
343     protected TagsSourceLocalService tagsSourceLocalService;
344     @BeanReference(name = "com.liferay.portlet.tags.service.TagsSourceService.impl")
345     protected TagsSourceService tagsSourceService;
346     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsSourcePersistence.impl")
347     protected TagsSourcePersistence tagsSourcePersistence;
348     @BeanReference(name = "com.liferay.counter.service.CounterLocalService.impl")
349     protected CounterLocalService counterLocalService;
350     @BeanReference(name = "com.liferay.counter.service.CounterService.impl")
351     protected CounterService counterService;
352     @BeanReference(name = "com.liferay.portal.service.UserLocalService.impl")
353     protected UserLocalService userLocalService;
354     @BeanReference(name = "com.liferay.portal.service.UserService.impl")
355     protected UserService userService;
356     @BeanReference(name = "com.liferay.portal.service.persistence.UserPersistence.impl")
357     protected UserPersistence userPersistence;
358     @BeanReference(name = "com.liferay.portal.service.persistence.UserFinder.impl")
359     protected UserFinder userFinder;
360 }