1
22
23 package com.liferay.portlet.expando.service.base;
24
25 import com.liferay.counter.service.CounterLocalService;
26 import com.liferay.counter.service.CounterLocalServiceFactory;
27 import com.liferay.counter.service.CounterService;
28 import com.liferay.counter.service.CounterServiceFactory;
29
30 import com.liferay.portal.PortalException;
31 import com.liferay.portal.SystemException;
32 import com.liferay.portal.kernel.bean.InitializingBean;
33 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
34
35 import com.liferay.portlet.expando.model.ExpandoColumn;
36 import com.liferay.portlet.expando.service.ExpandoColumnLocalService;
37 import com.liferay.portlet.expando.service.ExpandoRowLocalService;
38 import com.liferay.portlet.expando.service.ExpandoRowLocalServiceFactory;
39 import com.liferay.portlet.expando.service.ExpandoTableLocalService;
40 import com.liferay.portlet.expando.service.ExpandoTableLocalServiceFactory;
41 import com.liferay.portlet.expando.service.ExpandoValueLocalService;
42 import com.liferay.portlet.expando.service.ExpandoValueLocalServiceFactory;
43 import com.liferay.portlet.expando.service.persistence.ExpandoColumnFinder;
44 import com.liferay.portlet.expando.service.persistence.ExpandoColumnFinderUtil;
45 import com.liferay.portlet.expando.service.persistence.ExpandoColumnPersistence;
46 import com.liferay.portlet.expando.service.persistence.ExpandoColumnUtil;
47 import com.liferay.portlet.expando.service.persistence.ExpandoRowFinder;
48 import com.liferay.portlet.expando.service.persistence.ExpandoRowFinderUtil;
49 import com.liferay.portlet.expando.service.persistence.ExpandoRowPersistence;
50 import com.liferay.portlet.expando.service.persistence.ExpandoRowUtil;
51 import com.liferay.portlet.expando.service.persistence.ExpandoTablePersistence;
52 import com.liferay.portlet.expando.service.persistence.ExpandoTableUtil;
53 import com.liferay.portlet.expando.service.persistence.ExpandoValueFinder;
54 import com.liferay.portlet.expando.service.persistence.ExpandoValueFinderUtil;
55 import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
56 import com.liferay.portlet.expando.service.persistence.ExpandoValueUtil;
57
58 import java.util.List;
59
60
66 public abstract class ExpandoColumnLocalServiceBaseImpl
67 implements ExpandoColumnLocalService, InitializingBean {
68 public ExpandoColumn addExpandoColumn(ExpandoColumn expandoColumn)
69 throws SystemException {
70 expandoColumn.setNew(true);
71
72 return expandoColumnPersistence.update(expandoColumn, false);
73 }
74
75 public void deleteExpandoColumn(long columnId)
76 throws PortalException, SystemException {
77 expandoColumnPersistence.remove(columnId);
78 }
79
80 public void deleteExpandoColumn(ExpandoColumn expandoColumn)
81 throws SystemException {
82 expandoColumnPersistence.remove(expandoColumn);
83 }
84
85 public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
86 throws SystemException {
87 return expandoColumnPersistence.findWithDynamicQuery(dynamicQuery);
88 }
89
90 public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
91 int end) throws SystemException {
92 return expandoColumnPersistence.findWithDynamicQuery(dynamicQuery,
93 start, end);
94 }
95
96 public ExpandoColumn getExpandoColumn(long columnId)
97 throws PortalException, SystemException {
98 return expandoColumnPersistence.findByPrimaryKey(columnId);
99 }
100
101 public ExpandoColumn updateExpandoColumn(ExpandoColumn expandoColumn)
102 throws SystemException {
103 expandoColumn.setNew(false);
104
105 return expandoColumnPersistence.update(expandoColumn, true);
106 }
107
108 public ExpandoColumnPersistence getExpandoColumnPersistence() {
109 return expandoColumnPersistence;
110 }
111
112 public void setExpandoColumnPersistence(
113 ExpandoColumnPersistence expandoColumnPersistence) {
114 this.expandoColumnPersistence = expandoColumnPersistence;
115 }
116
117 public ExpandoColumnFinder getExpandoColumnFinder() {
118 return expandoColumnFinder;
119 }
120
121 public void setExpandoColumnFinder(ExpandoColumnFinder expandoColumnFinder) {
122 this.expandoColumnFinder = expandoColumnFinder;
123 }
124
125 public ExpandoRowLocalService getExpandoRowLocalService() {
126 return expandoRowLocalService;
127 }
128
129 public void setExpandoRowLocalService(
130 ExpandoRowLocalService expandoRowLocalService) {
131 this.expandoRowLocalService = expandoRowLocalService;
132 }
133
134 public ExpandoRowPersistence getExpandoRowPersistence() {
135 return expandoRowPersistence;
136 }
137
138 public void setExpandoRowPersistence(
139 ExpandoRowPersistence expandoRowPersistence) {
140 this.expandoRowPersistence = expandoRowPersistence;
141 }
142
143 public ExpandoRowFinder getExpandoRowFinder() {
144 return expandoRowFinder;
145 }
146
147 public void setExpandoRowFinder(ExpandoRowFinder expandoRowFinder) {
148 this.expandoRowFinder = expandoRowFinder;
149 }
150
151 public ExpandoTableLocalService getExpandoTableLocalService() {
152 return expandoTableLocalService;
153 }
154
155 public void setExpandoTableLocalService(
156 ExpandoTableLocalService expandoTableLocalService) {
157 this.expandoTableLocalService = expandoTableLocalService;
158 }
159
160 public ExpandoTablePersistence getExpandoTablePersistence() {
161 return expandoTablePersistence;
162 }
163
164 public void setExpandoTablePersistence(
165 ExpandoTablePersistence expandoTablePersistence) {
166 this.expandoTablePersistence = expandoTablePersistence;
167 }
168
169 public ExpandoValueLocalService getExpandoValueLocalService() {
170 return expandoValueLocalService;
171 }
172
173 public void setExpandoValueLocalService(
174 ExpandoValueLocalService expandoValueLocalService) {
175 this.expandoValueLocalService = expandoValueLocalService;
176 }
177
178 public ExpandoValuePersistence getExpandoValuePersistence() {
179 return expandoValuePersistence;
180 }
181
182 public void setExpandoValuePersistence(
183 ExpandoValuePersistence expandoValuePersistence) {
184 this.expandoValuePersistence = expandoValuePersistence;
185 }
186
187 public ExpandoValueFinder getExpandoValueFinder() {
188 return expandoValueFinder;
189 }
190
191 public void setExpandoValueFinder(ExpandoValueFinder expandoValueFinder) {
192 this.expandoValueFinder = expandoValueFinder;
193 }
194
195 public CounterLocalService getCounterLocalService() {
196 return counterLocalService;
197 }
198
199 public void setCounterLocalService(CounterLocalService counterLocalService) {
200 this.counterLocalService = counterLocalService;
201 }
202
203 public CounterService getCounterService() {
204 return counterService;
205 }
206
207 public void setCounterService(CounterService counterService) {
208 this.counterService = counterService;
209 }
210
211 public void afterPropertiesSet() {
212 if (expandoColumnPersistence == null) {
213 expandoColumnPersistence = ExpandoColumnUtil.getPersistence();
214 }
215
216 if (expandoColumnFinder == null) {
217 expandoColumnFinder = ExpandoColumnFinderUtil.getFinder();
218 }
219
220 if (expandoRowLocalService == null) {
221 expandoRowLocalService = ExpandoRowLocalServiceFactory.getImpl();
222 }
223
224 if (expandoRowPersistence == null) {
225 expandoRowPersistence = ExpandoRowUtil.getPersistence();
226 }
227
228 if (expandoRowFinder == null) {
229 expandoRowFinder = ExpandoRowFinderUtil.getFinder();
230 }
231
232 if (expandoTableLocalService == null) {
233 expandoTableLocalService = ExpandoTableLocalServiceFactory.getImpl();
234 }
235
236 if (expandoTablePersistence == null) {
237 expandoTablePersistence = ExpandoTableUtil.getPersistence();
238 }
239
240 if (expandoValueLocalService == null) {
241 expandoValueLocalService = ExpandoValueLocalServiceFactory.getImpl();
242 }
243
244 if (expandoValuePersistence == null) {
245 expandoValuePersistence = ExpandoValueUtil.getPersistence();
246 }
247
248 if (expandoValueFinder == null) {
249 expandoValueFinder = ExpandoValueFinderUtil.getFinder();
250 }
251
252 if (counterLocalService == null) {
253 counterLocalService = CounterLocalServiceFactory.getImpl();
254 }
255
256 if (counterService == null) {
257 counterService = CounterServiceFactory.getImpl();
258 }
259 }
260
261 protected ExpandoColumnPersistence expandoColumnPersistence;
262 protected ExpandoColumnFinder expandoColumnFinder;
263 protected ExpandoRowLocalService expandoRowLocalService;
264 protected ExpandoRowPersistence expandoRowPersistence;
265 protected ExpandoRowFinder expandoRowFinder;
266 protected ExpandoTableLocalService expandoTableLocalService;
267 protected ExpandoTablePersistence expandoTablePersistence;
268 protected ExpandoValueLocalService expandoValueLocalService;
269 protected ExpandoValuePersistence expandoValuePersistence;
270 protected ExpandoValueFinder expandoValueFinder;
271 protected CounterLocalService counterLocalService;
272 protected CounterService counterService;
273 }