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.dao.db.DB;
019    import com.liferay.portal.kernel.dao.db.DBManagerUtil;
020    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
021    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
022    import com.liferay.portal.kernel.exception.SystemException;
023    import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService;
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                    IdentifiableOSGiService {
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 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                    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 OSGi service identifier.
234             *
235             * @return the OSGi service identifier
236             */
237            @Override
238            public String getOSGiServiceIdentifier() {
239                    return AssetCategoryPropertyService.class.getName();
240            }
241    
242            protected Class<?> getModelClass() {
243                    return AssetCategoryProperty.class;
244            }
245    
246            protected String getModelClassName() {
247                    return AssetCategoryProperty.class.getName();
248            }
249    
250            /**
251             * Performs a SQL query.
252             *
253             * @param sql the sql query
254             */
255            protected void runSQL(String sql) {
256                    try {
257                            DataSource dataSource = assetCategoryPropertyPersistence.getDataSource();
258    
259                            DB db = DBManagerUtil.getDB();
260    
261                            sql = db.buildSQL(sql);
262                            sql = PortalUtil.transformSQL(sql);
263    
264                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
265                                            sql, new int[0]);
266    
267                            sqlUpdate.update();
268                    }
269                    catch (Exception e) {
270                            throw new SystemException(e);
271                    }
272            }
273    
274            @BeanReference(type = com.liferay.portlet.asset.service.AssetCategoryPropertyLocalService.class)
275            protected com.liferay.portlet.asset.service.AssetCategoryPropertyLocalService assetCategoryPropertyLocalService;
276            @BeanReference(type = com.liferay.portlet.asset.service.AssetCategoryPropertyService.class)
277            protected AssetCategoryPropertyService assetCategoryPropertyService;
278            @BeanReference(type = AssetCategoryPropertyPersistence.class)
279            protected AssetCategoryPropertyPersistence assetCategoryPropertyPersistence;
280            @BeanReference(type = AssetCategoryPropertyFinder.class)
281            protected AssetCategoryPropertyFinder assetCategoryPropertyFinder;
282            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
283            protected com.liferay.counter.service.CounterLocalService counterLocalService;
284            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
285            protected com.liferay.portal.service.UserLocalService userLocalService;
286            @BeanReference(type = com.liferay.portal.service.UserService.class)
287            protected com.liferay.portal.service.UserService userService;
288            @BeanReference(type = UserPersistence.class)
289            protected UserPersistence userPersistence;
290            @BeanReference(type = UserFinder.class)
291            protected UserFinder userFinder;
292    }