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