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.TagsProperty;
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="TagsPropertyLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
57   *
58   * @author Brian Wing Shun Chan
59   *
60   */
61  public abstract class TagsPropertyLocalServiceBaseImpl
62      implements TagsPropertyLocalService {
63      public TagsProperty addTagsProperty(TagsProperty tagsProperty)
64          throws SystemException {
65          tagsProperty.setNew(true);
66  
67          return tagsPropertyPersistence.update(tagsProperty, false);
68      }
69  
70      public TagsProperty createTagsProperty(long propertyId) {
71          return tagsPropertyPersistence.create(propertyId);
72      }
73  
74      public void deleteTagsProperty(long propertyId)
75          throws PortalException, SystemException {
76          tagsPropertyPersistence.remove(propertyId);
77      }
78  
79      public void deleteTagsProperty(TagsProperty tagsProperty)
80          throws SystemException {
81          tagsPropertyPersistence.remove(tagsProperty);
82      }
83  
84      public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
85          throws SystemException {
86          return tagsPropertyPersistence.findWithDynamicQuery(dynamicQuery);
87      }
88  
89      public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
90          int end) throws SystemException {
91          return tagsPropertyPersistence.findWithDynamicQuery(dynamicQuery,
92              start, end);
93      }
94  
95      public TagsProperty getTagsProperty(long propertyId)
96          throws PortalException, SystemException {
97          return tagsPropertyPersistence.findByPrimaryKey(propertyId);
98      }
99  
100     public List<TagsProperty> getTagsProperties(int start, int end)
101         throws SystemException {
102         return tagsPropertyPersistence.findAll(start, end);
103     }
104 
105     public int getTagsPropertiesCount() throws SystemException {
106         return tagsPropertyPersistence.countAll();
107     }
108 
109     public TagsProperty updateTagsProperty(TagsProperty tagsProperty)
110         throws SystemException {
111         tagsProperty.setNew(false);
112 
113         return tagsPropertyPersistence.update(tagsProperty, true);
114     }
115 
116     public TagsProperty updateTagsProperty(TagsProperty tagsProperty,
117         boolean merge) throws SystemException {
118         tagsProperty.setNew(false);
119 
120         return tagsPropertyPersistence.update(tagsProperty, merge);
121     }
122 
123     public TagsAssetLocalService getTagsAssetLocalService() {
124         return tagsAssetLocalService;
125     }
126 
127     public void setTagsAssetLocalService(
128         TagsAssetLocalService tagsAssetLocalService) {
129         this.tagsAssetLocalService = tagsAssetLocalService;
130     }
131 
132     public TagsAssetService getTagsAssetService() {
133         return tagsAssetService;
134     }
135 
136     public void setTagsAssetService(TagsAssetService tagsAssetService) {
137         this.tagsAssetService = tagsAssetService;
138     }
139 
140     public TagsAssetPersistence getTagsAssetPersistence() {
141         return tagsAssetPersistence;
142     }
143 
144     public void setTagsAssetPersistence(
145         TagsAssetPersistence tagsAssetPersistence) {
146         this.tagsAssetPersistence = tagsAssetPersistence;
147     }
148 
149     public TagsAssetFinder getTagsAssetFinder() {
150         return tagsAssetFinder;
151     }
152 
153     public void setTagsAssetFinder(TagsAssetFinder tagsAssetFinder) {
154         this.tagsAssetFinder = tagsAssetFinder;
155     }
156 
157     public TagsEntryLocalService getTagsEntryLocalService() {
158         return tagsEntryLocalService;
159     }
160 
161     public void setTagsEntryLocalService(
162         TagsEntryLocalService tagsEntryLocalService) {
163         this.tagsEntryLocalService = tagsEntryLocalService;
164     }
165 
166     public TagsEntryService getTagsEntryService() {
167         return tagsEntryService;
168     }
169 
170     public void setTagsEntryService(TagsEntryService tagsEntryService) {
171         this.tagsEntryService = tagsEntryService;
172     }
173 
174     public TagsEntryPersistence getTagsEntryPersistence() {
175         return tagsEntryPersistence;
176     }
177 
178     public void setTagsEntryPersistence(
179         TagsEntryPersistence tagsEntryPersistence) {
180         this.tagsEntryPersistence = tagsEntryPersistence;
181     }
182 
183     public TagsEntryFinder getTagsEntryFinder() {
184         return tagsEntryFinder;
185     }
186 
187     public void setTagsEntryFinder(TagsEntryFinder tagsEntryFinder) {
188         this.tagsEntryFinder = tagsEntryFinder;
189     }
190 
191     public TagsPropertyLocalService getTagsPropertyLocalService() {
192         return tagsPropertyLocalService;
193     }
194 
195     public void setTagsPropertyLocalService(
196         TagsPropertyLocalService tagsPropertyLocalService) {
197         this.tagsPropertyLocalService = tagsPropertyLocalService;
198     }
199 
200     public TagsPropertyService getTagsPropertyService() {
201         return tagsPropertyService;
202     }
203 
204     public void setTagsPropertyService(TagsPropertyService tagsPropertyService) {
205         this.tagsPropertyService = tagsPropertyService;
206     }
207 
208     public TagsPropertyPersistence getTagsPropertyPersistence() {
209         return tagsPropertyPersistence;
210     }
211 
212     public void setTagsPropertyPersistence(
213         TagsPropertyPersistence tagsPropertyPersistence) {
214         this.tagsPropertyPersistence = tagsPropertyPersistence;
215     }
216 
217     public TagsPropertyFinder getTagsPropertyFinder() {
218         return tagsPropertyFinder;
219     }
220 
221     public void setTagsPropertyFinder(TagsPropertyFinder tagsPropertyFinder) {
222         this.tagsPropertyFinder = tagsPropertyFinder;
223     }
224 
225     public TagsPropertyKeyFinder getTagsPropertyKeyFinder() {
226         return tagsPropertyKeyFinder;
227     }
228 
229     public void setTagsPropertyKeyFinder(
230         TagsPropertyKeyFinder tagsPropertyKeyFinder) {
231         this.tagsPropertyKeyFinder = tagsPropertyKeyFinder;
232     }
233 
234     public TagsSourceLocalService getTagsSourceLocalService() {
235         return tagsSourceLocalService;
236     }
237 
238     public void setTagsSourceLocalService(
239         TagsSourceLocalService tagsSourceLocalService) {
240         this.tagsSourceLocalService = tagsSourceLocalService;
241     }
242 
243     public TagsSourceService getTagsSourceService() {
244         return tagsSourceService;
245     }
246 
247     public void setTagsSourceService(TagsSourceService tagsSourceService) {
248         this.tagsSourceService = tagsSourceService;
249     }
250 
251     public TagsSourcePersistence getTagsSourcePersistence() {
252         return tagsSourcePersistence;
253     }
254 
255     public void setTagsSourcePersistence(
256         TagsSourcePersistence tagsSourcePersistence) {
257         this.tagsSourcePersistence = tagsSourcePersistence;
258     }
259 
260     public CounterLocalService getCounterLocalService() {
261         return counterLocalService;
262     }
263 
264     public void setCounterLocalService(CounterLocalService counterLocalService) {
265         this.counterLocalService = counterLocalService;
266     }
267 
268     public CounterService getCounterService() {
269         return counterService;
270     }
271 
272     public void setCounterService(CounterService counterService) {
273         this.counterService = counterService;
274     }
275 
276     public UserLocalService getUserLocalService() {
277         return userLocalService;
278     }
279 
280     public void setUserLocalService(UserLocalService userLocalService) {
281         this.userLocalService = userLocalService;
282     }
283 
284     public UserService getUserService() {
285         return userService;
286     }
287 
288     public void setUserService(UserService userService) {
289         this.userService = userService;
290     }
291 
292     public UserPersistence getUserPersistence() {
293         return userPersistence;
294     }
295 
296     public void setUserPersistence(UserPersistence userPersistence) {
297         this.userPersistence = userPersistence;
298     }
299 
300     public UserFinder getUserFinder() {
301         return userFinder;
302     }
303 
304     public void setUserFinder(UserFinder userFinder) {
305         this.userFinder = userFinder;
306     }
307 
308     protected void runSQL(String sql) throws SystemException {
309         try {
310             PortalUtil.runSQL(sql);
311         }
312         catch (Exception e) {
313             throw new SystemException(e);
314         }
315     }
316 
317     @BeanReference(name = "com.liferay.portlet.tags.service.TagsAssetLocalService.impl")
318     protected TagsAssetLocalService tagsAssetLocalService;
319     @BeanReference(name = "com.liferay.portlet.tags.service.TagsAssetService.impl")
320     protected TagsAssetService tagsAssetService;
321     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsAssetPersistence.impl")
322     protected TagsAssetPersistence tagsAssetPersistence;
323     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsAssetFinder.impl")
324     protected TagsAssetFinder tagsAssetFinder;
325     @BeanReference(name = "com.liferay.portlet.tags.service.TagsEntryLocalService.impl")
326     protected TagsEntryLocalService tagsEntryLocalService;
327     @BeanReference(name = "com.liferay.portlet.tags.service.TagsEntryService.impl")
328     protected TagsEntryService tagsEntryService;
329     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsEntryPersistence.impl")
330     protected TagsEntryPersistence tagsEntryPersistence;
331     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsEntryFinder.impl")
332     protected TagsEntryFinder tagsEntryFinder;
333     @BeanReference(name = "com.liferay.portlet.tags.service.TagsPropertyLocalService.impl")
334     protected TagsPropertyLocalService tagsPropertyLocalService;
335     @BeanReference(name = "com.liferay.portlet.tags.service.TagsPropertyService.impl")
336     protected TagsPropertyService tagsPropertyService;
337     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsPropertyPersistence.impl")
338     protected TagsPropertyPersistence tagsPropertyPersistence;
339     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsPropertyFinder.impl")
340     protected TagsPropertyFinder tagsPropertyFinder;
341     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsPropertyKeyFinder.impl")
342     protected TagsPropertyKeyFinder tagsPropertyKeyFinder;
343     @BeanReference(name = "com.liferay.portlet.tags.service.TagsSourceLocalService.impl")
344     protected TagsSourceLocalService tagsSourceLocalService;
345     @BeanReference(name = "com.liferay.portlet.tags.service.TagsSourceService.impl")
346     protected TagsSourceService tagsSourceService;
347     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsSourcePersistence.impl")
348     protected TagsSourcePersistence tagsSourcePersistence;
349     @BeanReference(name = "com.liferay.counter.service.CounterLocalService.impl")
350     protected CounterLocalService counterLocalService;
351     @BeanReference(name = "com.liferay.counter.service.CounterService.impl")
352     protected CounterService counterService;
353     @BeanReference(name = "com.liferay.portal.service.UserLocalService.impl")
354     protected UserLocalService userLocalService;
355     @BeanReference(name = "com.liferay.portal.service.UserService.impl")
356     protected UserService userService;
357     @BeanReference(name = "com.liferay.portal.service.persistence.UserPersistence.impl")
358     protected UserPersistence userPersistence;
359     @BeanReference(name = "com.liferay.portal.service.persistence.UserFinder.impl")
360     protected UserFinder userFinder;
361 }