001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.asset.service.base;
016    
017    import com.liferay.portal.kernel.bean.BeanReference;
018    import com.liferay.portal.kernel.bean.IdentifiableBean;
019    import com.liferay.portal.kernel.dao.db.DB;
020    import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
021    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
023    import com.liferay.portal.kernel.exception.SystemException;
024    import com.liferay.portal.service.BaseServiceImpl;
025    import com.liferay.portal.service.persistence.UserFinder;
026    import com.liferay.portal.service.persistence.UserPersistence;
027    import com.liferay.portal.util.PortalUtil;
028    
029    import com.liferay.portlet.asset.model.AssetCategoryProperty;
030    import com.liferay.portlet.asset.service.AssetCategoryPropertyService;
031    import com.liferay.portlet.asset.service.persistence.AssetCategoryPropertyFinder;
032    import com.liferay.portlet.asset.service.persistence.AssetCategoryPropertyPersistence;
033    
034    import javax.sql.DataSource;
035    
036    /**
037     * Provides the base implementation for the asset category property remote service.
038     *
039     * <p>
040     * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link com.liferay.portlet.asset.service.impl.AssetCategoryPropertyServiceImpl}.
041     * </p>
042     *
043     * @author Brian Wing Shun Chan
044     * @see com.liferay.portlet.asset.service.impl.AssetCategoryPropertyServiceImpl
045     * @see com.liferay.portlet.asset.service.AssetCategoryPropertyServiceUtil
046     * @generated
047     */
048    public abstract class AssetCategoryPropertyServiceBaseImpl
049            extends BaseServiceImpl implements AssetCategoryPropertyService,
050                    IdentifiableBean {
051            /*
052             * NOTE FOR DEVELOPERS:
053             *
054             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.asset.service.AssetCategoryPropertyServiceUtil} to access the asset category property remote service.
055             */
056    
057            /**
058             * Returns the asset category property local service.
059             *
060             * @return the asset category property local service
061             */
062            public com.liferay.portlet.asset.service.AssetCategoryPropertyLocalService getAssetCategoryPropertyLocalService() {
063                    return assetCategoryPropertyLocalService;
064            }
065    
066            /**
067             * Sets the asset category property local service.
068             *
069             * @param assetCategoryPropertyLocalService the asset category property local service
070             */
071            public void setAssetCategoryPropertyLocalService(
072                    com.liferay.portlet.asset.service.AssetCategoryPropertyLocalService assetCategoryPropertyLocalService) {
073                    this.assetCategoryPropertyLocalService = assetCategoryPropertyLocalService;
074            }
075    
076            /**
077             * Returns the asset category property remote service.
078             *
079             * @return the asset category property remote service
080             */
081            public com.liferay.portlet.asset.service.AssetCategoryPropertyService getAssetCategoryPropertyService() {
082                    return assetCategoryPropertyService;
083            }
084    
085            /**
086             * Sets the asset category property remote service.
087             *
088             * @param assetCategoryPropertyService the asset category property remote service
089             */
090            public void setAssetCategoryPropertyService(
091                    com.liferay.portlet.asset.service.AssetCategoryPropertyService assetCategoryPropertyService) {
092                    this.assetCategoryPropertyService = assetCategoryPropertyService;
093            }
094    
095            /**
096             * Returns the asset category property persistence.
097             *
098             * @return the asset category property persistence
099             */
100            public AssetCategoryPropertyPersistence getAssetCategoryPropertyPersistence() {
101                    return assetCategoryPropertyPersistence;
102            }
103    
104            /**
105             * Sets the asset category property persistence.
106             *
107             * @param assetCategoryPropertyPersistence the asset category property persistence
108             */
109            public void setAssetCategoryPropertyPersistence(
110                    AssetCategoryPropertyPersistence assetCategoryPropertyPersistence) {
111                    this.assetCategoryPropertyPersistence = assetCategoryPropertyPersistence;
112            }
113    
114            /**
115             * Returns the asset category property finder.
116             *
117             * @return the asset category property finder
118             */
119            public AssetCategoryPropertyFinder getAssetCategoryPropertyFinder() {
120                    return assetCategoryPropertyFinder;
121            }
122    
123            /**
124             * Sets the asset category property finder.
125             *
126             * @param assetCategoryPropertyFinder the asset category property finder
127             */
128            public void setAssetCategoryPropertyFinder(
129                    AssetCategoryPropertyFinder assetCategoryPropertyFinder) {
130                    this.assetCategoryPropertyFinder = assetCategoryPropertyFinder;
131            }
132    
133            /**
134             * Returns the counter local service.
135             *
136             * @return the counter local service
137             */
138            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
139                    return counterLocalService;
140            }
141    
142            /**
143             * Sets the counter local service.
144             *
145             * @param counterLocalService the counter local service
146             */
147            public void setCounterLocalService(
148                    com.liferay.counter.service.CounterLocalService counterLocalService) {
149                    this.counterLocalService = counterLocalService;
150            }
151    
152            /**
153             * Returns the user local service.
154             *
155             * @return the user local service
156             */
157            public com.liferay.portal.service.UserLocalService getUserLocalService() {
158                    return userLocalService;
159            }
160    
161            /**
162             * Sets the user local service.
163             *
164             * @param userLocalService the user local service
165             */
166            public void setUserLocalService(
167                    com.liferay.portal.service.UserLocalService userLocalService) {
168                    this.userLocalService = userLocalService;
169            }
170    
171            /**
172             * Returns the user remote service.
173             *
174             * @return the user remote service
175             */
176            public com.liferay.portal.service.UserService getUserService() {
177                    return userService;
178            }
179    
180            /**
181             * Sets the user remote service.
182             *
183             * @param userService the user remote service
184             */
185            public void setUserService(
186                    com.liferay.portal.service.UserService userService) {
187                    this.userService = userService;
188            }
189    
190            /**
191             * Returns the user persistence.
192             *
193             * @return the user persistence
194             */
195            public UserPersistence getUserPersistence() {
196                    return userPersistence;
197            }
198    
199            /**
200             * Sets the user persistence.
201             *
202             * @param userPersistence the user persistence
203             */
204            public void setUserPersistence(UserPersistence userPersistence) {
205                    this.userPersistence = userPersistence;
206            }
207    
208            /**
209             * Returns the user finder.
210             *
211             * @return the user finder
212             */
213            public UserFinder getUserFinder() {
214                    return userFinder;
215            }
216    
217            /**
218             * Sets the user finder.
219             *
220             * @param userFinder the user finder
221             */
222            public void setUserFinder(UserFinder userFinder) {
223                    this.userFinder = userFinder;
224            }
225    
226            public void afterPropertiesSet() {
227            }
228    
229            public void destroy() {
230            }
231    
232            /**
233             * Returns the Spring bean ID for this bean.
234             *
235             * @return the Spring bean ID for this bean
236             */
237            @Override
238            public String getBeanIdentifier() {
239                    return _beanIdentifier;
240            }
241    
242            /**
243             * Sets the Spring bean ID for this bean.
244             *
245             * @param beanIdentifier the Spring bean ID for this bean
246             */
247            @Override
248            public void setBeanIdentifier(String beanIdentifier) {
249                    _beanIdentifier = beanIdentifier;
250            }
251    
252            protected Class<?> getModelClass() {
253                    return AssetCategoryProperty.class;
254            }
255    
256            protected String getModelClassName() {
257                    return AssetCategoryProperty.class.getName();
258            }
259    
260            /**
261             * Performs a SQL query.
262             *
263             * @param sql the sql query
264             */
265            protected void runSQL(String sql) {
266                    try {
267                            DataSource dataSource = assetCategoryPropertyPersistence.getDataSource();
268    
269                            DB db = DBFactoryUtil.getDB();
270    
271                            sql = db.buildSQL(sql);
272                            sql = PortalUtil.transformSQL(sql);
273    
274                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
275                                            sql, new int[0]);
276    
277                            sqlUpdate.update();
278                    }
279                    catch (Exception e) {
280                            throw new SystemException(e);
281                    }
282            }
283    
284            @BeanReference(type = com.liferay.portlet.asset.service.AssetCategoryPropertyLocalService.class)
285            protected com.liferay.portlet.asset.service.AssetCategoryPropertyLocalService assetCategoryPropertyLocalService;
286            @BeanReference(type = com.liferay.portlet.asset.service.AssetCategoryPropertyService.class)
287            protected com.liferay.portlet.asset.service.AssetCategoryPropertyService assetCategoryPropertyService;
288            @BeanReference(type = AssetCategoryPropertyPersistence.class)
289            protected AssetCategoryPropertyPersistence assetCategoryPropertyPersistence;
290            @BeanReference(type = AssetCategoryPropertyFinder.class)
291            protected AssetCategoryPropertyFinder assetCategoryPropertyFinder;
292            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
293            protected com.liferay.counter.service.CounterLocalService counterLocalService;
294            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
295            protected com.liferay.portal.service.UserLocalService userLocalService;
296            @BeanReference(type = com.liferay.portal.service.UserService.class)
297            protected com.liferay.portal.service.UserService userService;
298            @BeanReference(type = UserPersistence.class)
299            protected UserPersistence userPersistence;
300            @BeanReference(type = UserFinder.class)
301            protected UserFinder userFinder;
302            private String _beanIdentifier;
303    }