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.dynamicdatamapping.service.base;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.BeanReference;
020    import com.liferay.portal.kernel.bean.IdentifiableBean;
021    import com.liferay.portal.kernel.dao.db.DB;
022    import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
023    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
024    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
025    import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
026    import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery;
027    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
028    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
029    import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery;
030    import com.liferay.portal.kernel.dao.orm.Projection;
031    import com.liferay.portal.kernel.exception.PortalException;
032    import com.liferay.portal.kernel.exception.SystemException;
033    import com.liferay.portal.kernel.search.Indexable;
034    import com.liferay.portal.kernel.search.IndexableType;
035    import com.liferay.portal.kernel.util.OrderByComparator;
036    import com.liferay.portal.model.PersistedModel;
037    import com.liferay.portal.service.BaseLocalServiceImpl;
038    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
039    import com.liferay.portal.service.persistence.UserFinder;
040    import com.liferay.portal.service.persistence.UserPersistence;
041    import com.liferay.portal.util.PortalUtil;
042    
043    import com.liferay.portlet.dynamicdatamapping.model.DDMStructureLayout;
044    import com.liferay.portlet.dynamicdatamapping.service.DDMStructureLayoutLocalService;
045    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureLayoutPersistence;
046    import com.liferay.portlet.exportimport.lar.ExportImportHelperUtil;
047    import com.liferay.portlet.exportimport.lar.ManifestSummary;
048    import com.liferay.portlet.exportimport.lar.PortletDataContext;
049    import com.liferay.portlet.exportimport.lar.StagedModelDataHandlerUtil;
050    import com.liferay.portlet.exportimport.lar.StagedModelType;
051    
052    import java.io.Serializable;
053    
054    import java.util.List;
055    
056    import javax.sql.DataSource;
057    
058    /**
059     * Provides the base implementation for the d d m structure layout local service.
060     *
061     * <p>
062     * 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.dynamicdatamapping.service.impl.DDMStructureLayoutLocalServiceImpl}.
063     * </p>
064     *
065     * @author Brian Wing Shun Chan
066     * @see com.liferay.portlet.dynamicdatamapping.service.impl.DDMStructureLayoutLocalServiceImpl
067     * @see com.liferay.portlet.dynamicdatamapping.service.DDMStructureLayoutLocalServiceUtil
068     * @generated
069     */
070    @ProviderType
071    public abstract class DDMStructureLayoutLocalServiceBaseImpl
072            extends BaseLocalServiceImpl implements DDMStructureLayoutLocalService,
073                    IdentifiableBean {
074            /*
075             * NOTE FOR DEVELOPERS:
076             *
077             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.dynamicdatamapping.service.DDMStructureLayoutLocalServiceUtil} to access the d d m structure layout local service.
078             */
079    
080            /**
081             * Adds the d d m structure layout to the database. Also notifies the appropriate model listeners.
082             *
083             * @param ddmStructureLayout the d d m structure layout
084             * @return the d d m structure layout that was added
085             */
086            @Indexable(type = IndexableType.REINDEX)
087            @Override
088            public DDMStructureLayout addDDMStructureLayout(
089                    DDMStructureLayout ddmStructureLayout) {
090                    ddmStructureLayout.setNew(true);
091    
092                    return ddmStructureLayoutPersistence.update(ddmStructureLayout);
093            }
094    
095            /**
096             * Creates a new d d m structure layout with the primary key. Does not add the d d m structure layout to the database.
097             *
098             * @param structureLayoutId the primary key for the new d d m structure layout
099             * @return the new d d m structure layout
100             */
101            @Override
102            public DDMStructureLayout createDDMStructureLayout(long structureLayoutId) {
103                    return ddmStructureLayoutPersistence.create(structureLayoutId);
104            }
105    
106            /**
107             * Deletes the d d m structure layout with the primary key from the database. Also notifies the appropriate model listeners.
108             *
109             * @param structureLayoutId the primary key of the d d m structure layout
110             * @return the d d m structure layout that was removed
111             * @throws PortalException if a d d m structure layout with the primary key could not be found
112             */
113            @Indexable(type = IndexableType.DELETE)
114            @Override
115            public DDMStructureLayout deleteDDMStructureLayout(long structureLayoutId)
116                    throws PortalException {
117                    return ddmStructureLayoutPersistence.remove(structureLayoutId);
118            }
119    
120            /**
121             * Deletes the d d m structure layout from the database. Also notifies the appropriate model listeners.
122             *
123             * @param ddmStructureLayout the d d m structure layout
124             * @return the d d m structure layout that was removed
125             */
126            @Indexable(type = IndexableType.DELETE)
127            @Override
128            public DDMStructureLayout deleteDDMStructureLayout(
129                    DDMStructureLayout ddmStructureLayout) {
130                    return ddmStructureLayoutPersistence.remove(ddmStructureLayout);
131            }
132    
133            @Override
134            public DynamicQuery dynamicQuery() {
135                    Class<?> clazz = getClass();
136    
137                    return DynamicQueryFactoryUtil.forClass(DDMStructureLayout.class,
138                            clazz.getClassLoader());
139            }
140    
141            /**
142             * Performs a dynamic query on the database and returns the matching rows.
143             *
144             * @param dynamicQuery the dynamic query
145             * @return the matching rows
146             */
147            @Override
148            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
149                    return ddmStructureLayoutPersistence.findWithDynamicQuery(dynamicQuery);
150            }
151    
152            /**
153             * Performs a dynamic query on the database and returns a range of the matching rows.
154             *
155             * <p>
156             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.dynamicdatamapping.model.impl.DDMStructureLayoutModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
157             * </p>
158             *
159             * @param dynamicQuery the dynamic query
160             * @param start the lower bound of the range of model instances
161             * @param end the upper bound of the range of model instances (not inclusive)
162             * @return the range of matching rows
163             */
164            @Override
165            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
166                    int end) {
167                    return ddmStructureLayoutPersistence.findWithDynamicQuery(dynamicQuery,
168                            start, end);
169            }
170    
171            /**
172             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
173             *
174             * <p>
175             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.dynamicdatamapping.model.impl.DDMStructureLayoutModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
176             * </p>
177             *
178             * @param dynamicQuery the dynamic query
179             * @param start the lower bound of the range of model instances
180             * @param end the upper bound of the range of model instances (not inclusive)
181             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
182             * @return the ordered range of matching rows
183             */
184            @Override
185            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
186                    int end, OrderByComparator<T> orderByComparator) {
187                    return ddmStructureLayoutPersistence.findWithDynamicQuery(dynamicQuery,
188                            start, end, orderByComparator);
189            }
190    
191            /**
192             * Returns the number of rows matching the dynamic query.
193             *
194             * @param dynamicQuery the dynamic query
195             * @return the number of rows matching the dynamic query
196             */
197            @Override
198            public long dynamicQueryCount(DynamicQuery dynamicQuery) {
199                    return ddmStructureLayoutPersistence.countWithDynamicQuery(dynamicQuery);
200            }
201    
202            /**
203             * Returns the number of rows matching the dynamic query.
204             *
205             * @param dynamicQuery the dynamic query
206             * @param projection the projection to apply to the query
207             * @return the number of rows matching the dynamic query
208             */
209            @Override
210            public long dynamicQueryCount(DynamicQuery dynamicQuery,
211                    Projection projection) {
212                    return ddmStructureLayoutPersistence.countWithDynamicQuery(dynamicQuery,
213                            projection);
214            }
215    
216            @Override
217            public DDMStructureLayout fetchDDMStructureLayout(long structureLayoutId) {
218                    return ddmStructureLayoutPersistence.fetchByPrimaryKey(structureLayoutId);
219            }
220    
221            /**
222             * Returns the d d m structure layout matching the UUID and group.
223             *
224             * @param uuid the d d m structure layout's UUID
225             * @param groupId the primary key of the group
226             * @return the matching d d m structure layout, or <code>null</code> if a matching d d m structure layout could not be found
227             */
228            @Override
229            public DDMStructureLayout fetchDDMStructureLayoutByUuidAndGroupId(
230                    String uuid, long groupId) {
231                    return ddmStructureLayoutPersistence.fetchByUUID_G(uuid, groupId);
232            }
233    
234            /**
235             * Returns the d d m structure layout with the primary key.
236             *
237             * @param structureLayoutId the primary key of the d d m structure layout
238             * @return the d d m structure layout
239             * @throws PortalException if a d d m structure layout with the primary key could not be found
240             */
241            @Override
242            public DDMStructureLayout getDDMStructureLayout(long structureLayoutId)
243                    throws PortalException {
244                    return ddmStructureLayoutPersistence.findByPrimaryKey(structureLayoutId);
245            }
246    
247            @Override
248            public ActionableDynamicQuery getActionableDynamicQuery() {
249                    ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
250    
251                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.dynamicdatamapping.service.DDMStructureLayoutLocalServiceUtil.getService());
252                    actionableDynamicQuery.setClass(DDMStructureLayout.class);
253                    actionableDynamicQuery.setClassLoader(getClassLoader());
254    
255                    actionableDynamicQuery.setPrimaryKeyPropertyName("structureLayoutId");
256    
257                    return actionableDynamicQuery;
258            }
259    
260            protected void initActionableDynamicQuery(
261                    ActionableDynamicQuery actionableDynamicQuery) {
262                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.dynamicdatamapping.service.DDMStructureLayoutLocalServiceUtil.getService());
263                    actionableDynamicQuery.setClass(DDMStructureLayout.class);
264                    actionableDynamicQuery.setClassLoader(getClassLoader());
265    
266                    actionableDynamicQuery.setPrimaryKeyPropertyName("structureLayoutId");
267            }
268    
269            @Override
270            public ExportActionableDynamicQuery getExportActionableDynamicQuery(
271                    final PortletDataContext portletDataContext) {
272                    final ExportActionableDynamicQuery exportActionableDynamicQuery = new ExportActionableDynamicQuery() {
273                                    @Override
274                                    public long performCount() throws PortalException {
275                                            ManifestSummary manifestSummary = portletDataContext.getManifestSummary();
276    
277                                            StagedModelType stagedModelType = getStagedModelType();
278    
279                                            long modelAdditionCount = super.performCount();
280    
281                                            manifestSummary.addModelAdditionCount(stagedModelType.toString(),
282                                                    modelAdditionCount);
283    
284                                            long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(portletDataContext,
285                                                            stagedModelType);
286    
287                                            manifestSummary.addModelDeletionCount(stagedModelType.toString(),
288                                                    modelDeletionCount);
289    
290                                            return modelAdditionCount;
291                                    }
292                            };
293    
294                    initActionableDynamicQuery(exportActionableDynamicQuery);
295    
296                    exportActionableDynamicQuery.setAddCriteriaMethod(new ActionableDynamicQuery.AddCriteriaMethod() {
297                                    @Override
298                                    public void addCriteria(DynamicQuery dynamicQuery) {
299                                            portletDataContext.addDateRangeCriteria(dynamicQuery,
300                                                    "modifiedDate");
301                                    }
302                            });
303    
304                    exportActionableDynamicQuery.setCompanyId(portletDataContext.getCompanyId());
305    
306                    exportActionableDynamicQuery.setGroupId(portletDataContext.getScopeGroupId());
307    
308                    exportActionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod() {
309                                    @Override
310                                    public void performAction(Object object)
311                                            throws PortalException {
312                                            DDMStructureLayout stagedModel = (DDMStructureLayout)object;
313    
314                                            StagedModelDataHandlerUtil.exportStagedModel(portletDataContext,
315                                                    stagedModel);
316                                    }
317                            });
318                    exportActionableDynamicQuery.setStagedModelType(new StagedModelType(
319                                    PortalUtil.getClassNameId(DDMStructureLayout.class.getName())));
320    
321                    return exportActionableDynamicQuery;
322            }
323    
324            /**
325             * @throws PortalException
326             */
327            @Override
328            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
329                    throws PortalException {
330                    return ddmStructureLayoutLocalService.deleteDDMStructureLayout((DDMStructureLayout)persistedModel);
331            }
332    
333            @Override
334            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
335                    throws PortalException {
336                    return ddmStructureLayoutPersistence.findByPrimaryKey(primaryKeyObj);
337            }
338    
339            /**
340             * Returns all the d d m structure layouts matching the UUID and company.
341             *
342             * @param uuid the UUID of the d d m structure layouts
343             * @param companyId the primary key of the company
344             * @return the matching d d m structure layouts, or an empty list if no matches were found
345             */
346            @Override
347            public List<DDMStructureLayout> getDDMStructureLayoutsByUuidAndCompanyId(
348                    String uuid, long companyId) {
349                    return ddmStructureLayoutPersistence.findByUuid_C(uuid, companyId);
350            }
351    
352            /**
353             * Returns a range of d d m structure layouts matching the UUID and company.
354             *
355             * @param uuid the UUID of the d d m structure layouts
356             * @param companyId the primary key of the company
357             * @param start the lower bound of the range of d d m structure layouts
358             * @param end the upper bound of the range of d d m structure layouts (not inclusive)
359             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
360             * @return the range of matching d d m structure layouts, or an empty list if no matches were found
361             */
362            @Override
363            public List<DDMStructureLayout> getDDMStructureLayoutsByUuidAndCompanyId(
364                    String uuid, long companyId, int start, int end,
365                    OrderByComparator<DDMStructureLayout> orderByComparator) {
366                    return ddmStructureLayoutPersistence.findByUuid_C(uuid, companyId,
367                            start, end, orderByComparator);
368            }
369    
370            /**
371             * Returns the d d m structure layout matching the UUID and group.
372             *
373             * @param uuid the d d m structure layout's UUID
374             * @param groupId the primary key of the group
375             * @return the matching d d m structure layout
376             * @throws PortalException if a matching d d m structure layout could not be found
377             */
378            @Override
379            public DDMStructureLayout getDDMStructureLayoutByUuidAndGroupId(
380                    String uuid, long groupId) throws PortalException {
381                    return ddmStructureLayoutPersistence.findByUUID_G(uuid, groupId);
382            }
383    
384            /**
385             * Returns a range of all the d d m structure layouts.
386             *
387             * <p>
388             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.dynamicdatamapping.model.impl.DDMStructureLayoutModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
389             * </p>
390             *
391             * @param start the lower bound of the range of d d m structure layouts
392             * @param end the upper bound of the range of d d m structure layouts (not inclusive)
393             * @return the range of d d m structure layouts
394             */
395            @Override
396            public List<DDMStructureLayout> getDDMStructureLayouts(int start, int end) {
397                    return ddmStructureLayoutPersistence.findAll(start, end);
398            }
399    
400            /**
401             * Returns the number of d d m structure layouts.
402             *
403             * @return the number of d d m structure layouts
404             */
405            @Override
406            public int getDDMStructureLayoutsCount() {
407                    return ddmStructureLayoutPersistence.countAll();
408            }
409    
410            /**
411             * Updates the d d m structure layout in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
412             *
413             * @param ddmStructureLayout the d d m structure layout
414             * @return the d d m structure layout that was updated
415             */
416            @Indexable(type = IndexableType.REINDEX)
417            @Override
418            public DDMStructureLayout updateDDMStructureLayout(
419                    DDMStructureLayout ddmStructureLayout) {
420                    return ddmStructureLayoutPersistence.update(ddmStructureLayout);
421            }
422    
423            /**
424             * Returns the d d m structure layout local service.
425             *
426             * @return the d d m structure layout local service
427             */
428            public DDMStructureLayoutLocalService getDDMStructureLayoutLocalService() {
429                    return ddmStructureLayoutLocalService;
430            }
431    
432            /**
433             * Sets the d d m structure layout local service.
434             *
435             * @param ddmStructureLayoutLocalService the d d m structure layout local service
436             */
437            public void setDDMStructureLayoutLocalService(
438                    DDMStructureLayoutLocalService ddmStructureLayoutLocalService) {
439                    this.ddmStructureLayoutLocalService = ddmStructureLayoutLocalService;
440            }
441    
442            /**
443             * Returns the d d m structure layout persistence.
444             *
445             * @return the d d m structure layout persistence
446             */
447            public DDMStructureLayoutPersistence getDDMStructureLayoutPersistence() {
448                    return ddmStructureLayoutPersistence;
449            }
450    
451            /**
452             * Sets the d d m structure layout persistence.
453             *
454             * @param ddmStructureLayoutPersistence the d d m structure layout persistence
455             */
456            public void setDDMStructureLayoutPersistence(
457                    DDMStructureLayoutPersistence ddmStructureLayoutPersistence) {
458                    this.ddmStructureLayoutPersistence = ddmStructureLayoutPersistence;
459            }
460    
461            /**
462             * Returns the counter local service.
463             *
464             * @return the counter local service
465             */
466            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
467                    return counterLocalService;
468            }
469    
470            /**
471             * Sets the counter local service.
472             *
473             * @param counterLocalService the counter local service
474             */
475            public void setCounterLocalService(
476                    com.liferay.counter.service.CounterLocalService counterLocalService) {
477                    this.counterLocalService = counterLocalService;
478            }
479    
480            /**
481             * Returns the user local service.
482             *
483             * @return the user local service
484             */
485            public com.liferay.portal.service.UserLocalService getUserLocalService() {
486                    return userLocalService;
487            }
488    
489            /**
490             * Sets the user local service.
491             *
492             * @param userLocalService the user local service
493             */
494            public void setUserLocalService(
495                    com.liferay.portal.service.UserLocalService userLocalService) {
496                    this.userLocalService = userLocalService;
497            }
498    
499            /**
500             * Returns the user remote service.
501             *
502             * @return the user remote service
503             */
504            public com.liferay.portal.service.UserService getUserService() {
505                    return userService;
506            }
507    
508            /**
509             * Sets the user remote service.
510             *
511             * @param userService the user remote service
512             */
513            public void setUserService(
514                    com.liferay.portal.service.UserService userService) {
515                    this.userService = userService;
516            }
517    
518            /**
519             * Returns the user persistence.
520             *
521             * @return the user persistence
522             */
523            public UserPersistence getUserPersistence() {
524                    return userPersistence;
525            }
526    
527            /**
528             * Sets the user persistence.
529             *
530             * @param userPersistence the user persistence
531             */
532            public void setUserPersistence(UserPersistence userPersistence) {
533                    this.userPersistence = userPersistence;
534            }
535    
536            /**
537             * Returns the user finder.
538             *
539             * @return the user finder
540             */
541            public UserFinder getUserFinder() {
542                    return userFinder;
543            }
544    
545            /**
546             * Sets the user finder.
547             *
548             * @param userFinder the user finder
549             */
550            public void setUserFinder(UserFinder userFinder) {
551                    this.userFinder = userFinder;
552            }
553    
554            public void afterPropertiesSet() {
555                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.dynamicdatamapping.model.DDMStructureLayout",
556                            ddmStructureLayoutLocalService);
557            }
558    
559            public void destroy() {
560                    persistedModelLocalServiceRegistry.unregister(
561                            "com.liferay.portlet.dynamicdatamapping.model.DDMStructureLayout");
562            }
563    
564            /**
565             * Returns the Spring bean ID for this bean.
566             *
567             * @return the Spring bean ID for this bean
568             */
569            @Override
570            public String getBeanIdentifier() {
571                    return _beanIdentifier;
572            }
573    
574            /**
575             * Sets the Spring bean ID for this bean.
576             *
577             * @param beanIdentifier the Spring bean ID for this bean
578             */
579            @Override
580            public void setBeanIdentifier(String beanIdentifier) {
581                    _beanIdentifier = beanIdentifier;
582            }
583    
584            protected Class<?> getModelClass() {
585                    return DDMStructureLayout.class;
586            }
587    
588            protected String getModelClassName() {
589                    return DDMStructureLayout.class.getName();
590            }
591    
592            /**
593             * Performs a SQL query.
594             *
595             * @param sql the sql query
596             */
597            protected void runSQL(String sql) {
598                    try {
599                            DataSource dataSource = ddmStructureLayoutPersistence.getDataSource();
600    
601                            DB db = DBFactoryUtil.getDB();
602    
603                            sql = db.buildSQL(sql);
604                            sql = PortalUtil.transformSQL(sql);
605    
606                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
607                                            sql, new int[0]);
608    
609                            sqlUpdate.update();
610                    }
611                    catch (Exception e) {
612                            throw new SystemException(e);
613                    }
614            }
615    
616            @BeanReference(type = DDMStructureLayoutLocalService.class)
617            protected DDMStructureLayoutLocalService ddmStructureLayoutLocalService;
618            @BeanReference(type = DDMStructureLayoutPersistence.class)
619            protected DDMStructureLayoutPersistence ddmStructureLayoutPersistence;
620            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
621            protected com.liferay.counter.service.CounterLocalService counterLocalService;
622            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
623            protected com.liferay.portal.service.UserLocalService userLocalService;
624            @BeanReference(type = com.liferay.portal.service.UserService.class)
625            protected com.liferay.portal.service.UserService userService;
626            @BeanReference(type = UserPersistence.class)
627            protected UserPersistence userPersistence;
628            @BeanReference(type = UserFinder.class)
629            protected UserFinder userFinder;
630            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
631            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
632            private String _beanIdentifier;
633    }