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.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  
33  import com.liferay.portlet.expando.model.ExpandoRow;
34  import com.liferay.portlet.expando.service.ExpandoColumnLocalService;
35  import com.liferay.portlet.expando.service.ExpandoRowLocalService;
36  import com.liferay.portlet.expando.service.ExpandoTableLocalService;
37  import com.liferay.portlet.expando.service.ExpandoValueLocalService;
38  import com.liferay.portlet.expando.service.persistence.ExpandoColumnFinder;
39  import com.liferay.portlet.expando.service.persistence.ExpandoColumnPersistence;
40  import com.liferay.portlet.expando.service.persistence.ExpandoRowFinder;
41  import com.liferay.portlet.expando.service.persistence.ExpandoRowPersistence;
42  import com.liferay.portlet.expando.service.persistence.ExpandoTablePersistence;
43  import com.liferay.portlet.expando.service.persistence.ExpandoValueFinder;
44  import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
45  
46  import java.util.List;
47  
48  /**
49   * <a href="ExpandoRowLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
50   *
51   * @author Brian Wing Shun Chan
52   *
53   */
54  public abstract class ExpandoRowLocalServiceBaseImpl
55      implements ExpandoRowLocalService {
56      public ExpandoRow addExpandoRow(ExpandoRow expandoRow)
57          throws SystemException {
58          expandoRow.setNew(true);
59  
60          return expandoRowPersistence.update(expandoRow, false);
61      }
62  
63      public ExpandoRow createExpandoRow(long rowId) {
64          return expandoRowPersistence.create(rowId);
65      }
66  
67      public void deleteExpandoRow(long rowId)
68          throws PortalException, SystemException {
69          expandoRowPersistence.remove(rowId);
70      }
71  
72      public void deleteExpandoRow(ExpandoRow expandoRow)
73          throws SystemException {
74          expandoRowPersistence.remove(expandoRow);
75      }
76  
77      public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
78          throws SystemException {
79          return expandoRowPersistence.findWithDynamicQuery(dynamicQuery);
80      }
81  
82      public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
83          int end) throws SystemException {
84          return expandoRowPersistence.findWithDynamicQuery(dynamicQuery, start,
85              end);
86      }
87  
88      public ExpandoRow getExpandoRow(long rowId)
89          throws PortalException, SystemException {
90          return expandoRowPersistence.findByPrimaryKey(rowId);
91      }
92  
93      public List<ExpandoRow> getExpandoRows(int start, int end)
94          throws SystemException {
95          return expandoRowPersistence.findAll(start, end);
96      }
97  
98      public int getExpandoRowsCount() throws SystemException {
99          return expandoRowPersistence.countAll();
100     }
101 
102     public ExpandoRow updateExpandoRow(ExpandoRow expandoRow)
103         throws SystemException {
104         expandoRow.setNew(false);
105 
106         return expandoRowPersistence.update(expandoRow, true);
107     }
108 
109     public ExpandoColumnLocalService getExpandoColumnLocalService() {
110         return expandoColumnLocalService;
111     }
112 
113     public void setExpandoColumnLocalService(
114         ExpandoColumnLocalService expandoColumnLocalService) {
115         this.expandoColumnLocalService = expandoColumnLocalService;
116     }
117 
118     public ExpandoColumnPersistence getExpandoColumnPersistence() {
119         return expandoColumnPersistence;
120     }
121 
122     public void setExpandoColumnPersistence(
123         ExpandoColumnPersistence expandoColumnPersistence) {
124         this.expandoColumnPersistence = expandoColumnPersistence;
125     }
126 
127     public ExpandoColumnFinder getExpandoColumnFinder() {
128         return expandoColumnFinder;
129     }
130 
131     public void setExpandoColumnFinder(ExpandoColumnFinder expandoColumnFinder) {
132         this.expandoColumnFinder = expandoColumnFinder;
133     }
134 
135     public ExpandoRowLocalService getExpandoRowLocalService() {
136         return expandoRowLocalService;
137     }
138 
139     public void setExpandoRowLocalService(
140         ExpandoRowLocalService expandoRowLocalService) {
141         this.expandoRowLocalService = expandoRowLocalService;
142     }
143 
144     public ExpandoRowPersistence getExpandoRowPersistence() {
145         return expandoRowPersistence;
146     }
147 
148     public void setExpandoRowPersistence(
149         ExpandoRowPersistence expandoRowPersistence) {
150         this.expandoRowPersistence = expandoRowPersistence;
151     }
152 
153     public ExpandoRowFinder getExpandoRowFinder() {
154         return expandoRowFinder;
155     }
156 
157     public void setExpandoRowFinder(ExpandoRowFinder expandoRowFinder) {
158         this.expandoRowFinder = expandoRowFinder;
159     }
160 
161     public ExpandoTableLocalService getExpandoTableLocalService() {
162         return expandoTableLocalService;
163     }
164 
165     public void setExpandoTableLocalService(
166         ExpandoTableLocalService expandoTableLocalService) {
167         this.expandoTableLocalService = expandoTableLocalService;
168     }
169 
170     public ExpandoTablePersistence getExpandoTablePersistence() {
171         return expandoTablePersistence;
172     }
173 
174     public void setExpandoTablePersistence(
175         ExpandoTablePersistence expandoTablePersistence) {
176         this.expandoTablePersistence = expandoTablePersistence;
177     }
178 
179     public ExpandoValueLocalService getExpandoValueLocalService() {
180         return expandoValueLocalService;
181     }
182 
183     public void setExpandoValueLocalService(
184         ExpandoValueLocalService expandoValueLocalService) {
185         this.expandoValueLocalService = expandoValueLocalService;
186     }
187 
188     public ExpandoValuePersistence getExpandoValuePersistence() {
189         return expandoValuePersistence;
190     }
191 
192     public void setExpandoValuePersistence(
193         ExpandoValuePersistence expandoValuePersistence) {
194         this.expandoValuePersistence = expandoValuePersistence;
195     }
196 
197     public ExpandoValueFinder getExpandoValueFinder() {
198         return expandoValueFinder;
199     }
200 
201     public void setExpandoValueFinder(ExpandoValueFinder expandoValueFinder) {
202         this.expandoValueFinder = expandoValueFinder;
203     }
204 
205     public CounterLocalService getCounterLocalService() {
206         return counterLocalService;
207     }
208 
209     public void setCounterLocalService(CounterLocalService counterLocalService) {
210         this.counterLocalService = counterLocalService;
211     }
212 
213     public CounterService getCounterService() {
214         return counterService;
215     }
216 
217     public void setCounterService(CounterService counterService) {
218         this.counterService = counterService;
219     }
220 
221     @BeanReference(name = "com.liferay.portlet.expando.service.ExpandoColumnLocalService.impl")
222     protected ExpandoColumnLocalService expandoColumnLocalService;
223     @BeanReference(name = "com.liferay.portlet.expando.service.persistence.ExpandoColumnPersistence.impl")
224     protected ExpandoColumnPersistence expandoColumnPersistence;
225     @BeanReference(name = "com.liferay.portlet.expando.service.persistence.ExpandoColumnFinder.impl")
226     protected ExpandoColumnFinder expandoColumnFinder;
227     @BeanReference(name = "com.liferay.portlet.expando.service.ExpandoRowLocalService.impl")
228     protected ExpandoRowLocalService expandoRowLocalService;
229     @BeanReference(name = "com.liferay.portlet.expando.service.persistence.ExpandoRowPersistence.impl")
230     protected ExpandoRowPersistence expandoRowPersistence;
231     @BeanReference(name = "com.liferay.portlet.expando.service.persistence.ExpandoRowFinder.impl")
232     protected ExpandoRowFinder expandoRowFinder;
233     @BeanReference(name = "com.liferay.portlet.expando.service.ExpandoTableLocalService.impl")
234     protected ExpandoTableLocalService expandoTableLocalService;
235     @BeanReference(name = "com.liferay.portlet.expando.service.persistence.ExpandoTablePersistence.impl")
236     protected ExpandoTablePersistence expandoTablePersistence;
237     @BeanReference(name = "com.liferay.portlet.expando.service.ExpandoValueLocalService.impl")
238     protected ExpandoValueLocalService expandoValueLocalService;
239     @BeanReference(name = "com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence.impl")
240     protected ExpandoValuePersistence expandoValuePersistence;
241     @BeanReference(name = "com.liferay.portlet.expando.service.persistence.ExpandoValueFinder.impl")
242     protected ExpandoValueFinder expandoValueFinder;
243     @BeanReference(name = "com.liferay.counter.service.CounterLocalService.impl")
244     protected CounterLocalService counterLocalService;
245     @BeanReference(name = "com.liferay.counter.service.CounterService.impl")
246     protected CounterService counterService;
247 }