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