1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.expando.service.base;
21  
22  import com.liferay.counter.service.CounterLocalService;
23  import com.liferay.counter.service.CounterService;
24  
25  import com.liferay.portal.PortalException;
26  import com.liferay.portal.SystemException;
27  import com.liferay.portal.kernel.annotation.BeanReference;
28  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
29  
30  import com.liferay.portlet.expando.model.ExpandoValue;
31  import com.liferay.portlet.expando.service.ExpandoColumnLocalService;
32  import com.liferay.portlet.expando.service.ExpandoRowLocalService;
33  import com.liferay.portlet.expando.service.ExpandoTableLocalService;
34  import com.liferay.portlet.expando.service.ExpandoValueLocalService;
35  import com.liferay.portlet.expando.service.persistence.ExpandoColumnFinder;
36  import com.liferay.portlet.expando.service.persistence.ExpandoColumnPersistence;
37  import com.liferay.portlet.expando.service.persistence.ExpandoRowFinder;
38  import com.liferay.portlet.expando.service.persistence.ExpandoRowPersistence;
39  import com.liferay.portlet.expando.service.persistence.ExpandoTablePersistence;
40  import com.liferay.portlet.expando.service.persistence.ExpandoValueFinder;
41  import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
42  
43  import java.util.List;
44  
45  /**
46   * <a href="ExpandoValueLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
47   *
48   * @author Brian Wing Shun Chan
49   *
50   */
51  public abstract class ExpandoValueLocalServiceBaseImpl
52      implements ExpandoValueLocalService {
53      public ExpandoValue addExpandoValue(ExpandoValue expandoValue)
54          throws SystemException {
55          expandoValue.setNew(true);
56  
57          return expandoValuePersistence.update(expandoValue, false);
58      }
59  
60      public ExpandoValue createExpandoValue(long valueId) {
61          return expandoValuePersistence.create(valueId);
62      }
63  
64      public void deleteExpandoValue(long valueId)
65          throws PortalException, SystemException {
66          expandoValuePersistence.remove(valueId);
67      }
68  
69      public void deleteExpandoValue(ExpandoValue expandoValue)
70          throws SystemException {
71          expandoValuePersistence.remove(expandoValue);
72      }
73  
74      public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
75          throws SystemException {
76          return expandoValuePersistence.findWithDynamicQuery(dynamicQuery);
77      }
78  
79      public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
80          int end) throws SystemException {
81          return expandoValuePersistence.findWithDynamicQuery(dynamicQuery,
82              start, end);
83      }
84  
85      public ExpandoValue getExpandoValue(long valueId)
86          throws PortalException, SystemException {
87          return expandoValuePersistence.findByPrimaryKey(valueId);
88      }
89  
90      public List<ExpandoValue> getExpandoValues(int start, int end)
91          throws SystemException {
92          return expandoValuePersistence.findAll(start, end);
93      }
94  
95      public int getExpandoValuesCount() throws SystemException {
96          return expandoValuePersistence.countAll();
97      }
98  
99      public ExpandoValue updateExpandoValue(ExpandoValue expandoValue)
100         throws SystemException {
101         expandoValue.setNew(false);
102 
103         return expandoValuePersistence.update(expandoValue, true);
104     }
105 
106     public ExpandoColumnLocalService getExpandoColumnLocalService() {
107         return expandoColumnLocalService;
108     }
109 
110     public void setExpandoColumnLocalService(
111         ExpandoColumnLocalService expandoColumnLocalService) {
112         this.expandoColumnLocalService = expandoColumnLocalService;
113     }
114 
115     public ExpandoColumnPersistence getExpandoColumnPersistence() {
116         return expandoColumnPersistence;
117     }
118 
119     public void setExpandoColumnPersistence(
120         ExpandoColumnPersistence expandoColumnPersistence) {
121         this.expandoColumnPersistence = expandoColumnPersistence;
122     }
123 
124     public ExpandoColumnFinder getExpandoColumnFinder() {
125         return expandoColumnFinder;
126     }
127 
128     public void setExpandoColumnFinder(ExpandoColumnFinder expandoColumnFinder) {
129         this.expandoColumnFinder = expandoColumnFinder;
130     }
131 
132     public ExpandoRowLocalService getExpandoRowLocalService() {
133         return expandoRowLocalService;
134     }
135 
136     public void setExpandoRowLocalService(
137         ExpandoRowLocalService expandoRowLocalService) {
138         this.expandoRowLocalService = expandoRowLocalService;
139     }
140 
141     public ExpandoRowPersistence getExpandoRowPersistence() {
142         return expandoRowPersistence;
143     }
144 
145     public void setExpandoRowPersistence(
146         ExpandoRowPersistence expandoRowPersistence) {
147         this.expandoRowPersistence = expandoRowPersistence;
148     }
149 
150     public ExpandoRowFinder getExpandoRowFinder() {
151         return expandoRowFinder;
152     }
153 
154     public void setExpandoRowFinder(ExpandoRowFinder expandoRowFinder) {
155         this.expandoRowFinder = expandoRowFinder;
156     }
157 
158     public ExpandoTableLocalService getExpandoTableLocalService() {
159         return expandoTableLocalService;
160     }
161 
162     public void setExpandoTableLocalService(
163         ExpandoTableLocalService expandoTableLocalService) {
164         this.expandoTableLocalService = expandoTableLocalService;
165     }
166 
167     public ExpandoTablePersistence getExpandoTablePersistence() {
168         return expandoTablePersistence;
169     }
170 
171     public void setExpandoTablePersistence(
172         ExpandoTablePersistence expandoTablePersistence) {
173         this.expandoTablePersistence = expandoTablePersistence;
174     }
175 
176     public ExpandoValueLocalService getExpandoValueLocalService() {
177         return expandoValueLocalService;
178     }
179 
180     public void setExpandoValueLocalService(
181         ExpandoValueLocalService expandoValueLocalService) {
182         this.expandoValueLocalService = expandoValueLocalService;
183     }
184 
185     public ExpandoValuePersistence getExpandoValuePersistence() {
186         return expandoValuePersistence;
187     }
188 
189     public void setExpandoValuePersistence(
190         ExpandoValuePersistence expandoValuePersistence) {
191         this.expandoValuePersistence = expandoValuePersistence;
192     }
193 
194     public ExpandoValueFinder getExpandoValueFinder() {
195         return expandoValueFinder;
196     }
197 
198     public void setExpandoValueFinder(ExpandoValueFinder expandoValueFinder) {
199         this.expandoValueFinder = expandoValueFinder;
200     }
201 
202     public CounterLocalService getCounterLocalService() {
203         return counterLocalService;
204     }
205 
206     public void setCounterLocalService(CounterLocalService counterLocalService) {
207         this.counterLocalService = counterLocalService;
208     }
209 
210     public CounterService getCounterService() {
211         return counterService;
212     }
213 
214     public void setCounterService(CounterService counterService) {
215         this.counterService = counterService;
216     }
217 
218     @BeanReference(name = "com.liferay.portlet.expando.service.ExpandoColumnLocalService.impl")
219     protected ExpandoColumnLocalService expandoColumnLocalService;
220     @BeanReference(name = "com.liferay.portlet.expando.service.persistence.ExpandoColumnPersistence.impl")
221     protected ExpandoColumnPersistence expandoColumnPersistence;
222     @BeanReference(name = "com.liferay.portlet.expando.service.persistence.ExpandoColumnFinder.impl")
223     protected ExpandoColumnFinder expandoColumnFinder;
224     @BeanReference(name = "com.liferay.portlet.expando.service.ExpandoRowLocalService.impl")
225     protected ExpandoRowLocalService expandoRowLocalService;
226     @BeanReference(name = "com.liferay.portlet.expando.service.persistence.ExpandoRowPersistence.impl")
227     protected ExpandoRowPersistence expandoRowPersistence;
228     @BeanReference(name = "com.liferay.portlet.expando.service.persistence.ExpandoRowFinder.impl")
229     protected ExpandoRowFinder expandoRowFinder;
230     @BeanReference(name = "com.liferay.portlet.expando.service.ExpandoTableLocalService.impl")
231     protected ExpandoTableLocalService expandoTableLocalService;
232     @BeanReference(name = "com.liferay.portlet.expando.service.persistence.ExpandoTablePersistence.impl")
233     protected ExpandoTablePersistence expandoTablePersistence;
234     @BeanReference(name = "com.liferay.portlet.expando.service.ExpandoValueLocalService.impl")
235     protected ExpandoValueLocalService expandoValueLocalService;
236     @BeanReference(name = "com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence.impl")
237     protected ExpandoValuePersistence expandoValuePersistence;
238     @BeanReference(name = "com.liferay.portlet.expando.service.persistence.ExpandoValueFinder.impl")
239     protected ExpandoValueFinder expandoValueFinder;
240     @BeanReference(name = "com.liferay.counter.service.CounterLocalService.impl")
241     protected CounterLocalService counterLocalService;
242     @BeanReference(name = "com.liferay.counter.service.CounterService.impl")
243     protected CounterService counterService;
244 }