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.social.service.base;
24  
25  import com.liferay.portlet.social.service.SocialActivityInterpreterLocalService;
26  import com.liferay.portlet.social.service.SocialActivityLocalService;
27  import com.liferay.portlet.social.service.SocialActivityLocalServiceFactory;
28  import com.liferay.portlet.social.service.SocialRelationLocalService;
29  import com.liferay.portlet.social.service.SocialRelationLocalServiceFactory;
30  import com.liferay.portlet.social.service.persistence.SocialActivityFinder;
31  import com.liferay.portlet.social.service.persistence.SocialActivityFinderUtil;
32  import com.liferay.portlet.social.service.persistence.SocialActivityPersistence;
33  import com.liferay.portlet.social.service.persistence.SocialActivityUtil;
34  import com.liferay.portlet.social.service.persistence.SocialRelationFinder;
35  import com.liferay.portlet.social.service.persistence.SocialRelationFinderUtil;
36  import com.liferay.portlet.social.service.persistence.SocialRelationPersistence;
37  import com.liferay.portlet.social.service.persistence.SocialRelationUtil;
38  
39  import org.springframework.beans.factory.InitializingBean;
40  
41  /**
42   * <a href="SocialActivityInterpreterLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
43   *
44   * @author Brian Wing Shun Chan
45   *
46   */
47  public abstract class SocialActivityInterpreterLocalServiceBaseImpl
48      implements SocialActivityInterpreterLocalService, InitializingBean {
49      public SocialActivityLocalService getSocialActivityLocalService() {
50          return socialActivityLocalService;
51      }
52  
53      public void setSocialActivityLocalService(
54          SocialActivityLocalService socialActivityLocalService) {
55          this.socialActivityLocalService = socialActivityLocalService;
56      }
57  
58      public SocialActivityPersistence getSocialActivityPersistence() {
59          return socialActivityPersistence;
60      }
61  
62      public void setSocialActivityPersistence(
63          SocialActivityPersistence socialActivityPersistence) {
64          this.socialActivityPersistence = socialActivityPersistence;
65      }
66  
67      public SocialActivityFinder getSocialActivityFinder() {
68          return socialActivityFinder;
69      }
70  
71      public void setSocialActivityFinder(
72          SocialActivityFinder socialActivityFinder) {
73          this.socialActivityFinder = socialActivityFinder;
74      }
75  
76      public SocialRelationLocalService getSocialRelationLocalService() {
77          return socialRelationLocalService;
78      }
79  
80      public void setSocialRelationLocalService(
81          SocialRelationLocalService socialRelationLocalService) {
82          this.socialRelationLocalService = socialRelationLocalService;
83      }
84  
85      public SocialRelationPersistence getSocialRelationPersistence() {
86          return socialRelationPersistence;
87      }
88  
89      public void setSocialRelationPersistence(
90          SocialRelationPersistence socialRelationPersistence) {
91          this.socialRelationPersistence = socialRelationPersistence;
92      }
93  
94      public SocialRelationFinder getSocialRelationFinder() {
95          return socialRelationFinder;
96      }
97  
98      public void setSocialRelationFinder(
99          SocialRelationFinder socialRelationFinder) {
100         this.socialRelationFinder = socialRelationFinder;
101     }
102 
103     public void afterPropertiesSet() {
104         if (socialActivityLocalService == null) {
105             socialActivityLocalService = SocialActivityLocalServiceFactory.getImpl();
106         }
107 
108         if (socialActivityPersistence == null) {
109             socialActivityPersistence = SocialActivityUtil.getPersistence();
110         }
111 
112         if (socialActivityFinder == null) {
113             socialActivityFinder = SocialActivityFinderUtil.getFinder();
114         }
115 
116         if (socialRelationLocalService == null) {
117             socialRelationLocalService = SocialRelationLocalServiceFactory.getImpl();
118         }
119 
120         if (socialRelationPersistence == null) {
121             socialRelationPersistence = SocialRelationUtil.getPersistence();
122         }
123 
124         if (socialRelationFinder == null) {
125             socialRelationFinder = SocialRelationFinderUtil.getFinder();
126         }
127     }
128 
129     protected SocialActivityLocalService socialActivityLocalService;
130     protected SocialActivityPersistence socialActivityPersistence;
131     protected SocialActivityFinder socialActivityFinder;
132     protected SocialRelationLocalService socialRelationLocalService;
133     protected SocialRelationPersistence socialRelationPersistence;
134     protected SocialRelationFinder socialRelationFinder;
135 }