1   /**
2    * Copyright (c) 2000-2009 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.expando.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.persistence.ResourceFinder;
35  import com.liferay.portal.service.persistence.ResourcePersistence;
36  
37  import com.liferay.portlet.expando.model.ExpandoColumn;
38  import com.liferay.portlet.expando.service.ExpandoColumnLocalService;
39  import com.liferay.portlet.expando.service.ExpandoColumnService;
40  import com.liferay.portlet.expando.service.ExpandoRowLocalService;
41  import com.liferay.portlet.expando.service.ExpandoTableLocalService;
42  import com.liferay.portlet.expando.service.ExpandoValueLocalService;
43  import com.liferay.portlet.expando.service.ExpandoValueService;
44  import com.liferay.portlet.expando.service.persistence.ExpandoColumnFinder;
45  import com.liferay.portlet.expando.service.persistence.ExpandoColumnPersistence;
46  import com.liferay.portlet.expando.service.persistence.ExpandoRowFinder;
47  import com.liferay.portlet.expando.service.persistence.ExpandoRowPersistence;
48  import com.liferay.portlet.expando.service.persistence.ExpandoTablePersistence;
49  import com.liferay.portlet.expando.service.persistence.ExpandoValueFinder;
50  import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
51  
52  import java.util.List;
53  
54  /**
55   * <a href="ExpandoColumnLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
56   *
57   * @author Brian Wing Shun Chan
58   *
59   */
60  public abstract class ExpandoColumnLocalServiceBaseImpl
61      implements ExpandoColumnLocalService {
62      public ExpandoColumn addExpandoColumn(ExpandoColumn expandoColumn)
63          throws SystemException {
64          expandoColumn.setNew(true);
65  
66          return expandoColumnPersistence.update(expandoColumn, false);
67      }
68  
69      public ExpandoColumn createExpandoColumn(long columnId) {
70          return expandoColumnPersistence.create(columnId);
71      }
72  
73      public void deleteExpandoColumn(long columnId)
74          throws PortalException, SystemException {
75          expandoColumnPersistence.remove(columnId);
76      }
77  
78      public void deleteExpandoColumn(ExpandoColumn expandoColumn)
79          throws SystemException {
80          expandoColumnPersistence.remove(expandoColumn);
81      }
82  
83      public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
84          throws SystemException {
85          return expandoColumnPersistence.findWithDynamicQuery(dynamicQuery);
86      }
87  
88      public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
89          int end) throws SystemException {
90          return expandoColumnPersistence.findWithDynamicQuery(dynamicQuery,
91              start, end);
92      }
93  
94      public ExpandoColumn getExpandoColumn(long columnId)
95          throws PortalException, SystemException {
96          return expandoColumnPersistence.findByPrimaryKey(columnId);
97      }
98  
99      public List<ExpandoColumn> getExpandoColumns(int start, int end)
100         throws SystemException {
101         return expandoColumnPersistence.findAll(start, end);
102     }
103 
104     public int getExpandoColumnsCount() throws SystemException {
105         return expandoColumnPersistence.countAll();
106     }
107 
108     public ExpandoColumn updateExpandoColumn(ExpandoColumn expandoColumn)
109         throws SystemException {
110         expandoColumn.setNew(false);
111 
112         return expandoColumnPersistence.update(expandoColumn, true);
113     }
114 
115     public ExpandoColumnLocalService getExpandoColumnLocalService() {
116         return expandoColumnLocalService;
117     }
118 
119     public void setExpandoColumnLocalService(
120         ExpandoColumnLocalService expandoColumnLocalService) {
121         this.expandoColumnLocalService = expandoColumnLocalService;
122     }
123 
124     public ExpandoColumnService getExpandoColumnService() {
125         return expandoColumnService;
126     }
127 
128     public void setExpandoColumnService(
129         ExpandoColumnService expandoColumnService) {
130         this.expandoColumnService = expandoColumnService;
131     }
132 
133     public ExpandoColumnPersistence getExpandoColumnPersistence() {
134         return expandoColumnPersistence;
135     }
136 
137     public void setExpandoColumnPersistence(
138         ExpandoColumnPersistence expandoColumnPersistence) {
139         this.expandoColumnPersistence = expandoColumnPersistence;
140     }
141 
142     public ExpandoColumnFinder getExpandoColumnFinder() {
143         return expandoColumnFinder;
144     }
145 
146     public void setExpandoColumnFinder(ExpandoColumnFinder expandoColumnFinder) {
147         this.expandoColumnFinder = expandoColumnFinder;
148     }
149 
150     public ExpandoRowLocalService getExpandoRowLocalService() {
151         return expandoRowLocalService;
152     }
153 
154     public void setExpandoRowLocalService(
155         ExpandoRowLocalService expandoRowLocalService) {
156         this.expandoRowLocalService = expandoRowLocalService;
157     }
158 
159     public ExpandoRowPersistence getExpandoRowPersistence() {
160         return expandoRowPersistence;
161     }
162 
163     public void setExpandoRowPersistence(
164         ExpandoRowPersistence expandoRowPersistence) {
165         this.expandoRowPersistence = expandoRowPersistence;
166     }
167 
168     public ExpandoRowFinder getExpandoRowFinder() {
169         return expandoRowFinder;
170     }
171 
172     public void setExpandoRowFinder(ExpandoRowFinder expandoRowFinder) {
173         this.expandoRowFinder = expandoRowFinder;
174     }
175 
176     public ExpandoTableLocalService getExpandoTableLocalService() {
177         return expandoTableLocalService;
178     }
179 
180     public void setExpandoTableLocalService(
181         ExpandoTableLocalService expandoTableLocalService) {
182         this.expandoTableLocalService = expandoTableLocalService;
183     }
184 
185     public ExpandoTablePersistence getExpandoTablePersistence() {
186         return expandoTablePersistence;
187     }
188 
189     public void setExpandoTablePersistence(
190         ExpandoTablePersistence expandoTablePersistence) {
191         this.expandoTablePersistence = expandoTablePersistence;
192     }
193 
194     public ExpandoValueLocalService getExpandoValueLocalService() {
195         return expandoValueLocalService;
196     }
197 
198     public void setExpandoValueLocalService(
199         ExpandoValueLocalService expandoValueLocalService) {
200         this.expandoValueLocalService = expandoValueLocalService;
201     }
202 
203     public ExpandoValueService getExpandoValueService() {
204         return expandoValueService;
205     }
206 
207     public void setExpandoValueService(ExpandoValueService expandoValueService) {
208         this.expandoValueService = expandoValueService;
209     }
210 
211     public ExpandoValuePersistence getExpandoValuePersistence() {
212         return expandoValuePersistence;
213     }
214 
215     public void setExpandoValuePersistence(
216         ExpandoValuePersistence expandoValuePersistence) {
217         this.expandoValuePersistence = expandoValuePersistence;
218     }
219 
220     public ExpandoValueFinder getExpandoValueFinder() {
221         return expandoValueFinder;
222     }
223 
224     public void setExpandoValueFinder(ExpandoValueFinder expandoValueFinder) {
225         this.expandoValueFinder = expandoValueFinder;
226     }
227 
228     public CounterLocalService getCounterLocalService() {
229         return counterLocalService;
230     }
231 
232     public void setCounterLocalService(CounterLocalService counterLocalService) {
233         this.counterLocalService = counterLocalService;
234     }
235 
236     public CounterService getCounterService() {
237         return counterService;
238     }
239 
240     public void setCounterService(CounterService counterService) {
241         this.counterService = counterService;
242     }
243 
244     public ResourceLocalService getResourceLocalService() {
245         return resourceLocalService;
246     }
247 
248     public void setResourceLocalService(
249         ResourceLocalService resourceLocalService) {
250         this.resourceLocalService = resourceLocalService;
251     }
252 
253     public ResourceService getResourceService() {
254         return resourceService;
255     }
256 
257     public void setResourceService(ResourceService resourceService) {
258         this.resourceService = resourceService;
259     }
260 
261     public ResourcePersistence getResourcePersistence() {
262         return resourcePersistence;
263     }
264 
265     public void setResourcePersistence(ResourcePersistence resourcePersistence) {
266         this.resourcePersistence = resourcePersistence;
267     }
268 
269     public ResourceFinder getResourceFinder() {
270         return resourceFinder;
271     }
272 
273     public void setResourceFinder(ResourceFinder resourceFinder) {
274         this.resourceFinder = resourceFinder;
275     }
276 
277     @BeanReference(name = "com.liferay.portlet.expando.service.ExpandoColumnLocalService.impl")
278     protected ExpandoColumnLocalService expandoColumnLocalService;
279     @BeanReference(name = "com.liferay.portlet.expando.service.ExpandoColumnService.impl")
280     protected ExpandoColumnService expandoColumnService;
281     @BeanReference(name = "com.liferay.portlet.expando.service.persistence.ExpandoColumnPersistence.impl")
282     protected ExpandoColumnPersistence expandoColumnPersistence;
283     @BeanReference(name = "com.liferay.portlet.expando.service.persistence.ExpandoColumnFinder.impl")
284     protected ExpandoColumnFinder expandoColumnFinder;
285     @BeanReference(name = "com.liferay.portlet.expando.service.ExpandoRowLocalService.impl")
286     protected ExpandoRowLocalService expandoRowLocalService;
287     @BeanReference(name = "com.liferay.portlet.expando.service.persistence.ExpandoRowPersistence.impl")
288     protected ExpandoRowPersistence expandoRowPersistence;
289     @BeanReference(name = "com.liferay.portlet.expando.service.persistence.ExpandoRowFinder.impl")
290     protected ExpandoRowFinder expandoRowFinder;
291     @BeanReference(name = "com.liferay.portlet.expando.service.ExpandoTableLocalService.impl")
292     protected ExpandoTableLocalService expandoTableLocalService;
293     @BeanReference(name = "com.liferay.portlet.expando.service.persistence.ExpandoTablePersistence.impl")
294     protected ExpandoTablePersistence expandoTablePersistence;
295     @BeanReference(name = "com.liferay.portlet.expando.service.ExpandoValueLocalService.impl")
296     protected ExpandoValueLocalService expandoValueLocalService;
297     @BeanReference(name = "com.liferay.portlet.expando.service.ExpandoValueService.impl")
298     protected ExpandoValueService expandoValueService;
299     @BeanReference(name = "com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence.impl")
300     protected ExpandoValuePersistence expandoValuePersistence;
301     @BeanReference(name = "com.liferay.portlet.expando.service.persistence.ExpandoValueFinder.impl")
302     protected ExpandoValueFinder expandoValueFinder;
303     @BeanReference(name = "com.liferay.counter.service.CounterLocalService.impl")
304     protected CounterLocalService counterLocalService;
305     @BeanReference(name = "com.liferay.counter.service.CounterService.impl")
306     protected CounterService counterService;
307     @BeanReference(name = "com.liferay.portal.service.ResourceLocalService.impl")
308     protected ResourceLocalService resourceLocalService;
309     @BeanReference(name = "com.liferay.portal.service.ResourceService.impl")
310     protected ResourceService resourceService;
311     @BeanReference(name = "com.liferay.portal.service.persistence.ResourcePersistence.impl")
312     protected ResourcePersistence resourcePersistence;
313     @BeanReference(name = "com.liferay.portal.service.persistence.ResourceFinder.impl")
314     protected ResourceFinder resourceFinder;
315 }