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.base;
24  
25  import com.liferay.counter.service.CounterLocalService;
26  import com.liferay.counter.service.CounterLocalServiceFactory;
27  import com.liferay.counter.service.CounterService;
28  import com.liferay.counter.service.CounterServiceFactory;
29  
30  import com.liferay.portal.SystemException;
31  import com.liferay.portal.kernel.dao.DynamicQueryInitializer;
32  import com.liferay.portal.service.UserLocalService;
33  import com.liferay.portal.service.UserLocalServiceFactory;
34  import com.liferay.portal.service.UserService;
35  import com.liferay.portal.service.UserServiceFactory;
36  import com.liferay.portal.service.persistence.UserFinder;
37  import com.liferay.portal.service.persistence.UserFinderUtil;
38  import com.liferay.portal.service.persistence.UserPersistence;
39  import com.liferay.portal.service.persistence.UserUtil;
40  
41  import com.liferay.portlet.tags.model.TagsProperty;
42  import com.liferay.portlet.tags.model.impl.TagsPropertyImpl;
43  import com.liferay.portlet.tags.service.TagsAssetLocalService;
44  import com.liferay.portlet.tags.service.TagsAssetLocalServiceFactory;
45  import com.liferay.portlet.tags.service.TagsAssetService;
46  import com.liferay.portlet.tags.service.TagsAssetServiceFactory;
47  import com.liferay.portlet.tags.service.TagsEntryLocalService;
48  import com.liferay.portlet.tags.service.TagsEntryLocalServiceFactory;
49  import com.liferay.portlet.tags.service.TagsEntryService;
50  import com.liferay.portlet.tags.service.TagsEntryServiceFactory;
51  import com.liferay.portlet.tags.service.TagsPropertyLocalService;
52  import com.liferay.portlet.tags.service.TagsSourceLocalService;
53  import com.liferay.portlet.tags.service.TagsSourceLocalServiceFactory;
54  import com.liferay.portlet.tags.service.TagsSourceService;
55  import com.liferay.portlet.tags.service.TagsSourceServiceFactory;
56  import com.liferay.portlet.tags.service.persistence.TagsAssetFinder;
57  import com.liferay.portlet.tags.service.persistence.TagsAssetFinderUtil;
58  import com.liferay.portlet.tags.service.persistence.TagsAssetPersistence;
59  import com.liferay.portlet.tags.service.persistence.TagsAssetUtil;
60  import com.liferay.portlet.tags.service.persistence.TagsEntryFinder;
61  import com.liferay.portlet.tags.service.persistence.TagsEntryFinderUtil;
62  import com.liferay.portlet.tags.service.persistence.TagsEntryPersistence;
63  import com.liferay.portlet.tags.service.persistence.TagsEntryUtil;
64  import com.liferay.portlet.tags.service.persistence.TagsPropertyFinder;
65  import com.liferay.portlet.tags.service.persistence.TagsPropertyFinderUtil;
66  import com.liferay.portlet.tags.service.persistence.TagsPropertyKeyFinder;
67  import com.liferay.portlet.tags.service.persistence.TagsPropertyKeyFinderUtil;
68  import com.liferay.portlet.tags.service.persistence.TagsPropertyPersistence;
69  import com.liferay.portlet.tags.service.persistence.TagsPropertyUtil;
70  import com.liferay.portlet.tags.service.persistence.TagsSourcePersistence;
71  import com.liferay.portlet.tags.service.persistence.TagsSourceUtil;
72  
73  import org.springframework.beans.factory.InitializingBean;
74  
75  import java.util.List;
76  
77  /**
78   * <a href="TagsPropertyLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
79   *
80   * @author Brian Wing Shun Chan
81   *
82   */
83  public abstract class TagsPropertyLocalServiceBaseImpl
84      implements TagsPropertyLocalService, InitializingBean {
85      public TagsProperty addTagsProperty(TagsProperty model)
86          throws SystemException {
87          TagsProperty tagsProperty = new TagsPropertyImpl();
88  
89          tagsProperty.setNew(true);
90  
91          tagsProperty.setPropertyId(model.getPropertyId());
92          tagsProperty.setCompanyId(model.getCompanyId());
93          tagsProperty.setUserId(model.getUserId());
94          tagsProperty.setUserName(model.getUserName());
95          tagsProperty.setCreateDate(model.getCreateDate());
96          tagsProperty.setModifiedDate(model.getModifiedDate());
97          tagsProperty.setEntryId(model.getEntryId());
98          tagsProperty.setKey(model.getKey());
99          tagsProperty.setValue(model.getValue());
100 
101         return tagsPropertyPersistence.update(tagsProperty);
102     }
103 
104     public List dynamicQuery(DynamicQueryInitializer queryInitializer)
105         throws SystemException {
106         return tagsPropertyPersistence.findWithDynamicQuery(queryInitializer);
107     }
108 
109     public List dynamicQuery(DynamicQueryInitializer queryInitializer,
110         int begin, int end) throws SystemException {
111         return tagsPropertyPersistence.findWithDynamicQuery(queryInitializer,
112             begin, end);
113     }
114 
115     public TagsProperty updateTagsProperty(TagsProperty model)
116         throws SystemException {
117         return tagsPropertyPersistence.update(model, true);
118     }
119 
120     public TagsAssetLocalService getTagsAssetLocalService() {
121         return tagsAssetLocalService;
122     }
123 
124     public void setTagsAssetLocalService(
125         TagsAssetLocalService tagsAssetLocalService) {
126         this.tagsAssetLocalService = tagsAssetLocalService;
127     }
128 
129     public TagsAssetService getTagsAssetService() {
130         return tagsAssetService;
131     }
132 
133     public void setTagsAssetService(TagsAssetService tagsAssetService) {
134         this.tagsAssetService = tagsAssetService;
135     }
136 
137     public TagsAssetPersistence getTagsAssetPersistence() {
138         return tagsAssetPersistence;
139     }
140 
141     public void setTagsAssetPersistence(
142         TagsAssetPersistence tagsAssetPersistence) {
143         this.tagsAssetPersistence = tagsAssetPersistence;
144     }
145 
146     public TagsAssetFinder getTagsAssetFinder() {
147         return tagsAssetFinder;
148     }
149 
150     public void setTagsAssetFinder(TagsAssetFinder tagsAssetFinder) {
151         this.tagsAssetFinder = tagsAssetFinder;
152     }
153 
154     public TagsEntryLocalService getTagsEntryLocalService() {
155         return tagsEntryLocalService;
156     }
157 
158     public void setTagsEntryLocalService(
159         TagsEntryLocalService tagsEntryLocalService) {
160         this.tagsEntryLocalService = tagsEntryLocalService;
161     }
162 
163     public TagsEntryService getTagsEntryService() {
164         return tagsEntryService;
165     }
166 
167     public void setTagsEntryService(TagsEntryService tagsEntryService) {
168         this.tagsEntryService = tagsEntryService;
169     }
170 
171     public TagsEntryPersistence getTagsEntryPersistence() {
172         return tagsEntryPersistence;
173     }
174 
175     public void setTagsEntryPersistence(
176         TagsEntryPersistence tagsEntryPersistence) {
177         this.tagsEntryPersistence = tagsEntryPersistence;
178     }
179 
180     public TagsEntryFinder getTagsEntryFinder() {
181         return tagsEntryFinder;
182     }
183 
184     public void setTagsEntryFinder(TagsEntryFinder tagsEntryFinder) {
185         this.tagsEntryFinder = tagsEntryFinder;
186     }
187 
188     public TagsPropertyPersistence getTagsPropertyPersistence() {
189         return tagsPropertyPersistence;
190     }
191 
192     public void setTagsPropertyPersistence(
193         TagsPropertyPersistence tagsPropertyPersistence) {
194         this.tagsPropertyPersistence = tagsPropertyPersistence;
195     }
196 
197     public TagsPropertyFinder getTagsPropertyFinder() {
198         return tagsPropertyFinder;
199     }
200 
201     public void setTagsPropertyFinder(TagsPropertyFinder tagsPropertyFinder) {
202         this.tagsPropertyFinder = tagsPropertyFinder;
203     }
204 
205     public TagsPropertyKeyFinder getTagsPropertyKeyFinder() {
206         return tagsPropertyKeyFinder;
207     }
208 
209     public void setTagsPropertyKeyFinder(
210         TagsPropertyKeyFinder tagsPropertyKeyFinder) {
211         this.tagsPropertyKeyFinder = tagsPropertyKeyFinder;
212     }
213 
214     public TagsSourceLocalService getTagsSourceLocalService() {
215         return tagsSourceLocalService;
216     }
217 
218     public void setTagsSourceLocalService(
219         TagsSourceLocalService tagsSourceLocalService) {
220         this.tagsSourceLocalService = tagsSourceLocalService;
221     }
222 
223     public TagsSourceService getTagsSourceService() {
224         return tagsSourceService;
225     }
226 
227     public void setTagsSourceService(TagsSourceService tagsSourceService) {
228         this.tagsSourceService = tagsSourceService;
229     }
230 
231     public TagsSourcePersistence getTagsSourcePersistence() {
232         return tagsSourcePersistence;
233     }
234 
235     public void setTagsSourcePersistence(
236         TagsSourcePersistence tagsSourcePersistence) {
237         this.tagsSourcePersistence = tagsSourcePersistence;
238     }
239 
240     public CounterLocalService getCounterLocalService() {
241         return counterLocalService;
242     }
243 
244     public void setCounterLocalService(CounterLocalService counterLocalService) {
245         this.counterLocalService = counterLocalService;
246     }
247 
248     public CounterService getCounterService() {
249         return counterService;
250     }
251 
252     public void setCounterService(CounterService counterService) {
253         this.counterService = counterService;
254     }
255 
256     public UserLocalService getUserLocalService() {
257         return userLocalService;
258     }
259 
260     public void setUserLocalService(UserLocalService userLocalService) {
261         this.userLocalService = userLocalService;
262     }
263 
264     public UserService getUserService() {
265         return userService;
266     }
267 
268     public void setUserService(UserService userService) {
269         this.userService = userService;
270     }
271 
272     public UserPersistence getUserPersistence() {
273         return userPersistence;
274     }
275 
276     public void setUserPersistence(UserPersistence userPersistence) {
277         this.userPersistence = userPersistence;
278     }
279 
280     public UserFinder getUserFinder() {
281         return userFinder;
282     }
283 
284     public void setUserFinder(UserFinder userFinder) {
285         this.userFinder = userFinder;
286     }
287 
288     public void afterPropertiesSet() {
289         if (tagsAssetLocalService == null) {
290             tagsAssetLocalService = TagsAssetLocalServiceFactory.getImpl();
291         }
292 
293         if (tagsAssetService == null) {
294             tagsAssetService = TagsAssetServiceFactory.getImpl();
295         }
296 
297         if (tagsAssetPersistence == null) {
298             tagsAssetPersistence = TagsAssetUtil.getPersistence();
299         }
300 
301         if (tagsAssetFinder == null) {
302             tagsAssetFinder = TagsAssetFinderUtil.getFinder();
303         }
304 
305         if (tagsEntryLocalService == null) {
306             tagsEntryLocalService = TagsEntryLocalServiceFactory.getImpl();
307         }
308 
309         if (tagsEntryService == null) {
310             tagsEntryService = TagsEntryServiceFactory.getImpl();
311         }
312 
313         if (tagsEntryPersistence == null) {
314             tagsEntryPersistence = TagsEntryUtil.getPersistence();
315         }
316 
317         if (tagsEntryFinder == null) {
318             tagsEntryFinder = TagsEntryFinderUtil.getFinder();
319         }
320 
321         if (tagsPropertyPersistence == null) {
322             tagsPropertyPersistence = TagsPropertyUtil.getPersistence();
323         }
324 
325         if (tagsPropertyFinder == null) {
326             tagsPropertyFinder = TagsPropertyFinderUtil.getFinder();
327         }
328 
329         if (tagsPropertyKeyFinder == null) {
330             tagsPropertyKeyFinder = TagsPropertyKeyFinderUtil.getFinder();
331         }
332 
333         if (tagsSourceLocalService == null) {
334             tagsSourceLocalService = TagsSourceLocalServiceFactory.getImpl();
335         }
336 
337         if (tagsSourceService == null) {
338             tagsSourceService = TagsSourceServiceFactory.getImpl();
339         }
340 
341         if (tagsSourcePersistence == null) {
342             tagsSourcePersistence = TagsSourceUtil.getPersistence();
343         }
344 
345         if (counterLocalService == null) {
346             counterLocalService = CounterLocalServiceFactory.getImpl();
347         }
348 
349         if (counterService == null) {
350             counterService = CounterServiceFactory.getImpl();
351         }
352 
353         if (userLocalService == null) {
354             userLocalService = UserLocalServiceFactory.getImpl();
355         }
356 
357         if (userService == null) {
358             userService = UserServiceFactory.getImpl();
359         }
360 
361         if (userPersistence == null) {
362             userPersistence = UserUtil.getPersistence();
363         }
364 
365         if (userFinder == null) {
366             userFinder = UserFinderUtil.getFinder();
367         }
368     }
369 
370     protected TagsAssetLocalService tagsAssetLocalService;
371     protected TagsAssetService tagsAssetService;
372     protected TagsAssetPersistence tagsAssetPersistence;
373     protected TagsAssetFinder tagsAssetFinder;
374     protected TagsEntryLocalService tagsEntryLocalService;
375     protected TagsEntryService tagsEntryService;
376     protected TagsEntryPersistence tagsEntryPersistence;
377     protected TagsEntryFinder tagsEntryFinder;
378     protected TagsPropertyPersistence tagsPropertyPersistence;
379     protected TagsPropertyFinder tagsPropertyFinder;
380     protected TagsPropertyKeyFinder tagsPropertyKeyFinder;
381     protected TagsSourceLocalService tagsSourceLocalService;
382     protected TagsSourceService tagsSourceService;
383     protected TagsSourcePersistence tagsSourcePersistence;
384     protected CounterLocalService counterLocalService;
385     protected CounterService counterService;
386     protected UserLocalService userLocalService;
387     protected UserService userService;
388     protected UserPersistence userPersistence;
389     protected UserFinder userFinder;
390 }