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