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