1
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.bean.InitializingBean;
31 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
32 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
33
34 import com.liferay.portlet.expando.model.ExpandoValue;
35 import com.liferay.portlet.expando.service.ExpandoColumnLocalService;
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.persistence.ExpandoColumnFinder;
40 import com.liferay.portlet.expando.service.persistence.ExpandoColumnPersistence;
41 import com.liferay.portlet.expando.service.persistence.ExpandoRowFinder;
42 import com.liferay.portlet.expando.service.persistence.ExpandoRowPersistence;
43 import com.liferay.portlet.expando.service.persistence.ExpandoTablePersistence;
44 import com.liferay.portlet.expando.service.persistence.ExpandoValueFinder;
45 import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
46
47 import java.util.List;
48
49
55 public abstract class ExpandoValueLocalServiceBaseImpl
56 implements ExpandoValueLocalService, InitializingBean {
57 public ExpandoValue addExpandoValue(ExpandoValue expandoValue)
58 throws SystemException {
59 expandoValue.setNew(true);
60
61 return expandoValuePersistence.update(expandoValue, false);
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 ExpandoValuePersistence getExpandoValuePersistence() {
177 return expandoValuePersistence;
178 }
179
180 public void setExpandoValuePersistence(
181 ExpandoValuePersistence expandoValuePersistence) {
182 this.expandoValuePersistence = expandoValuePersistence;
183 }
184
185 public ExpandoValueFinder getExpandoValueFinder() {
186 return expandoValueFinder;
187 }
188
189 public void setExpandoValueFinder(ExpandoValueFinder expandoValueFinder) {
190 this.expandoValueFinder = expandoValueFinder;
191 }
192
193 public CounterLocalService getCounterLocalService() {
194 return counterLocalService;
195 }
196
197 public void setCounterLocalService(CounterLocalService counterLocalService) {
198 this.counterLocalService = counterLocalService;
199 }
200
201 public CounterService getCounterService() {
202 return counterService;
203 }
204
205 public void setCounterService(CounterService counterService) {
206 this.counterService = counterService;
207 }
208
209 public void afterPropertiesSet() {
210 if (expandoColumnLocalService == null) {
211 expandoColumnLocalService = (ExpandoColumnLocalService)PortalBeanLocatorUtil.locate(ExpandoColumnLocalService.class.getName() +
212 ".impl");
213 }
214
215 if (expandoColumnPersistence == null) {
216 expandoColumnPersistence = (ExpandoColumnPersistence)PortalBeanLocatorUtil.locate(ExpandoColumnPersistence.class.getName() +
217 ".impl");
218 }
219
220 if (expandoColumnFinder == null) {
221 expandoColumnFinder = (ExpandoColumnFinder)PortalBeanLocatorUtil.locate(ExpandoColumnFinder.class.getName() +
222 ".impl");
223 }
224
225 if (expandoRowLocalService == null) {
226 expandoRowLocalService = (ExpandoRowLocalService)PortalBeanLocatorUtil.locate(ExpandoRowLocalService.class.getName() +
227 ".impl");
228 }
229
230 if (expandoRowPersistence == null) {
231 expandoRowPersistence = (ExpandoRowPersistence)PortalBeanLocatorUtil.locate(ExpandoRowPersistence.class.getName() +
232 ".impl");
233 }
234
235 if (expandoRowFinder == null) {
236 expandoRowFinder = (ExpandoRowFinder)PortalBeanLocatorUtil.locate(ExpandoRowFinder.class.getName() +
237 ".impl");
238 }
239
240 if (expandoTableLocalService == null) {
241 expandoTableLocalService = (ExpandoTableLocalService)PortalBeanLocatorUtil.locate(ExpandoTableLocalService.class.getName() +
242 ".impl");
243 }
244
245 if (expandoTablePersistence == null) {
246 expandoTablePersistence = (ExpandoTablePersistence)PortalBeanLocatorUtil.locate(ExpandoTablePersistence.class.getName() +
247 ".impl");
248 }
249
250 if (expandoValuePersistence == null) {
251 expandoValuePersistence = (ExpandoValuePersistence)PortalBeanLocatorUtil.locate(ExpandoValuePersistence.class.getName() +
252 ".impl");
253 }
254
255 if (expandoValueFinder == null) {
256 expandoValueFinder = (ExpandoValueFinder)PortalBeanLocatorUtil.locate(ExpandoValueFinder.class.getName() +
257 ".impl");
258 }
259
260 if (counterLocalService == null) {
261 counterLocalService = (CounterLocalService)PortalBeanLocatorUtil.locate(CounterLocalService.class.getName() +
262 ".impl");
263 }
264
265 if (counterService == null) {
266 counterService = (CounterService)PortalBeanLocatorUtil.locate(CounterService.class.getName() +
267 ".impl");
268 }
269 }
270
271 protected ExpandoColumnLocalService expandoColumnLocalService;
272 protected ExpandoColumnPersistence expandoColumnPersistence;
273 protected ExpandoColumnFinder expandoColumnFinder;
274 protected ExpandoRowLocalService expandoRowLocalService;
275 protected ExpandoRowPersistence expandoRowPersistence;
276 protected ExpandoRowFinder expandoRowFinder;
277 protected ExpandoTableLocalService expandoTableLocalService;
278 protected ExpandoTablePersistence expandoTablePersistence;
279 protected ExpandoValuePersistence expandoValuePersistence;
280 protected ExpandoValueFinder expandoValueFinder;
281 protected CounterLocalService counterLocalService;
282 protected CounterService counterService;
283 }