001    /**
002     * Copyright (c) 2000-2013 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.dynamicdatalists.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.jdbc.SqlUpdate;
020    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
021    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
022    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
023    import com.liferay.portal.kernel.dao.orm.Projection;
024    import com.liferay.portal.kernel.exception.PortalException;
025    import com.liferay.portal.kernel.exception.SystemException;
026    import com.liferay.portal.kernel.search.Indexable;
027    import com.liferay.portal.kernel.search.IndexableType;
028    import com.liferay.portal.kernel.util.OrderByComparator;
029    import com.liferay.portal.model.PersistedModel;
030    import com.liferay.portal.service.BaseLocalServiceImpl;
031    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
032    import com.liferay.portal.service.persistence.UserFinder;
033    import com.liferay.portal.service.persistence.UserPersistence;
034    import com.liferay.portal.service.persistence.WorkflowInstanceLinkPersistence;
035    
036    import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
037    import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
038    import com.liferay.portlet.dynamicdatalists.model.DDLRecord;
039    import com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService;
040    import com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordFinder;
041    import com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordPersistence;
042    import com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordSetFinder;
043    import com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordSetPersistence;
044    import com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordVersionPersistence;
045    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureFinder;
046    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructurePersistence;
047    
048    import java.io.Serializable;
049    
050    import java.util.List;
051    
052    import javax.sql.DataSource;
053    
054    /**
055     * Provides the base implementation for the d d l record local service.
056     *
057     * <p>
058     * 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.dynamicdatalists.service.impl.DDLRecordLocalServiceImpl}.
059     * </p>
060     *
061     * @author Brian Wing Shun Chan
062     * @see com.liferay.portlet.dynamicdatalists.service.impl.DDLRecordLocalServiceImpl
063     * @see com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalServiceUtil
064     * @generated
065     */
066    public abstract class DDLRecordLocalServiceBaseImpl extends BaseLocalServiceImpl
067            implements DDLRecordLocalService, IdentifiableBean {
068            /*
069             * NOTE FOR DEVELOPERS:
070             *
071             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalServiceUtil} to access the d d l record local service.
072             */
073    
074            /**
075             * Adds the d d l record to the database. Also notifies the appropriate model listeners.
076             *
077             * @param ddlRecord the d d l record
078             * @return the d d l record that was added
079             * @throws SystemException if a system exception occurred
080             */
081            @Indexable(type = IndexableType.REINDEX)
082            @Override
083            public DDLRecord addDDLRecord(DDLRecord ddlRecord)
084                    throws SystemException {
085                    ddlRecord.setNew(true);
086    
087                    return ddlRecordPersistence.update(ddlRecord);
088            }
089    
090            /**
091             * Creates a new d d l record with the primary key. Does not add the d d l record to the database.
092             *
093             * @param recordId the primary key for the new d d l record
094             * @return the new d d l record
095             */
096            @Override
097            public DDLRecord createDDLRecord(long recordId) {
098                    return ddlRecordPersistence.create(recordId);
099            }
100    
101            /**
102             * Deletes the d d l record with the primary key from the database. Also notifies the appropriate model listeners.
103             *
104             * @param recordId the primary key of the d d l record
105             * @return the d d l record that was removed
106             * @throws PortalException if a d d l record with the primary key could not be found
107             * @throws SystemException if a system exception occurred
108             */
109            @Indexable(type = IndexableType.DELETE)
110            @Override
111            public DDLRecord deleteDDLRecord(long recordId)
112                    throws PortalException, SystemException {
113                    return ddlRecordPersistence.remove(recordId);
114            }
115    
116            /**
117             * Deletes the d d l record from the database. Also notifies the appropriate model listeners.
118             *
119             * @param ddlRecord the d d l record
120             * @return the d d l record that was removed
121             * @throws SystemException if a system exception occurred
122             */
123            @Indexable(type = IndexableType.DELETE)
124            @Override
125            public DDLRecord deleteDDLRecord(DDLRecord ddlRecord)
126                    throws SystemException {
127                    return ddlRecordPersistence.remove(ddlRecord);
128            }
129    
130            @Override
131            public DynamicQuery dynamicQuery() {
132                    Class<?> clazz = getClass();
133    
134                    return DynamicQueryFactoryUtil.forClass(DDLRecord.class,
135                            clazz.getClassLoader());
136            }
137    
138            /**
139             * Performs a dynamic query on the database and returns the matching rows.
140             *
141             * @param dynamicQuery the dynamic query
142             * @return the matching rows
143             * @throws SystemException if a system exception occurred
144             */
145            @Override
146            @SuppressWarnings("rawtypes")
147            public List dynamicQuery(DynamicQuery dynamicQuery)
148                    throws SystemException {
149                    return ddlRecordPersistence.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.dynamicdatalists.model.impl.DDLRecordModelImpl}. 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             * @throws SystemException if a system exception occurred
164             */
165            @Override
166            @SuppressWarnings("rawtypes")
167            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
168                    throws SystemException {
169                    return ddlRecordPersistence.findWithDynamicQuery(dynamicQuery, start,
170                            end);
171            }
172    
173            /**
174             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
175             *
176             * <p>
177             * 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.dynamicdatalists.model.impl.DDLRecordModelImpl}. 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.
178             * </p>
179             *
180             * @param dynamicQuery the dynamic query
181             * @param start the lower bound of the range of model instances
182             * @param end the upper bound of the range of model instances (not inclusive)
183             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
184             * @return the ordered range of matching rows
185             * @throws SystemException if a system exception occurred
186             */
187            @Override
188            @SuppressWarnings("rawtypes")
189            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
190                    OrderByComparator orderByComparator) throws SystemException {
191                    return ddlRecordPersistence.findWithDynamicQuery(dynamicQuery, start,
192                            end, orderByComparator);
193            }
194    
195            /**
196             * Returns the number of rows that match the dynamic query.
197             *
198             * @param dynamicQuery the dynamic query
199             * @return the number of rows that match the dynamic query
200             * @throws SystemException if a system exception occurred
201             */
202            @Override
203            public long dynamicQueryCount(DynamicQuery dynamicQuery)
204                    throws SystemException {
205                    return ddlRecordPersistence.countWithDynamicQuery(dynamicQuery);
206            }
207    
208            /**
209             * Returns the number of rows that match the dynamic query.
210             *
211             * @param dynamicQuery the dynamic query
212             * @param projection the projection to apply to the query
213             * @return the number of rows that match the dynamic query
214             * @throws SystemException if a system exception occurred
215             */
216            @Override
217            public long dynamicQueryCount(DynamicQuery dynamicQuery,
218                    Projection projection) throws SystemException {
219                    return ddlRecordPersistence.countWithDynamicQuery(dynamicQuery,
220                            projection);
221            }
222    
223            @Override
224            public DDLRecord fetchDDLRecord(long recordId) throws SystemException {
225                    return ddlRecordPersistence.fetchByPrimaryKey(recordId);
226            }
227    
228            /**
229             * Returns the d d l record with the matching UUID and company.
230             *
231             * @param uuid the d d l record's UUID
232             * @param  companyId the primary key of the company
233             * @return the matching d d l record, or <code>null</code> if a matching d d l record could not be found
234             * @throws SystemException if a system exception occurred
235             */
236            @Override
237            public DDLRecord fetchDDLRecordByUuidAndCompanyId(String uuid,
238                    long companyId) throws SystemException {
239                    return ddlRecordPersistence.fetchByUuid_C_First(uuid, companyId, null);
240            }
241    
242            /**
243             * Returns the d d l record matching the UUID and group.
244             *
245             * @param uuid the d d l record's UUID
246             * @param groupId the primary key of the group
247             * @return the matching d d l record, or <code>null</code> if a matching d d l record could not be found
248             * @throws SystemException if a system exception occurred
249             */
250            @Override
251            public DDLRecord fetchDDLRecordByUuidAndGroupId(String uuid, long groupId)
252                    throws SystemException {
253                    return ddlRecordPersistence.fetchByUUID_G(uuid, groupId);
254            }
255    
256            /**
257             * Returns the d d l record with the primary key.
258             *
259             * @param recordId the primary key of the d d l record
260             * @return the d d l record
261             * @throws PortalException if a d d l record with the primary key could not be found
262             * @throws SystemException if a system exception occurred
263             */
264            @Override
265            public DDLRecord getDDLRecord(long recordId)
266                    throws PortalException, SystemException {
267                    return ddlRecordPersistence.findByPrimaryKey(recordId);
268            }
269    
270            @Override
271            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
272                    throws PortalException, SystemException {
273                    return ddlRecordPersistence.findByPrimaryKey(primaryKeyObj);
274            }
275    
276            /**
277             * Returns the d d l record with the matching UUID and company.
278             *
279             * @param uuid the d d l record's UUID
280             * @param  companyId the primary key of the company
281             * @return the matching d d l record
282             * @throws PortalException if a matching d d l record could not be found
283             * @throws SystemException if a system exception occurred
284             */
285            @Override
286            public DDLRecord getDDLRecordByUuidAndCompanyId(String uuid, long companyId)
287                    throws PortalException, SystemException {
288                    return ddlRecordPersistence.findByUuid_C_First(uuid, companyId, null);
289            }
290    
291            /**
292             * Returns the d d l record matching the UUID and group.
293             *
294             * @param uuid the d d l record's UUID
295             * @param groupId the primary key of the group
296             * @return the matching d d l record
297             * @throws PortalException if a matching d d l record could not be found
298             * @throws SystemException if a system exception occurred
299             */
300            @Override
301            public DDLRecord getDDLRecordByUuidAndGroupId(String uuid, long groupId)
302                    throws PortalException, SystemException {
303                    return ddlRecordPersistence.findByUUID_G(uuid, groupId);
304            }
305    
306            /**
307             * Returns a range of all the d d l records.
308             *
309             * <p>
310             * 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.dynamicdatalists.model.impl.DDLRecordModelImpl}. 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.
311             * </p>
312             *
313             * @param start the lower bound of the range of d d l records
314             * @param end the upper bound of the range of d d l records (not inclusive)
315             * @return the range of d d l records
316             * @throws SystemException if a system exception occurred
317             */
318            @Override
319            public List<DDLRecord> getDDLRecords(int start, int end)
320                    throws SystemException {
321                    return ddlRecordPersistence.findAll(start, end);
322            }
323    
324            /**
325             * Returns the number of d d l records.
326             *
327             * @return the number of d d l records
328             * @throws SystemException if a system exception occurred
329             */
330            @Override
331            public int getDDLRecordsCount() throws SystemException {
332                    return ddlRecordPersistence.countAll();
333            }
334    
335            /**
336             * Updates the d d l record in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
337             *
338             * @param ddlRecord the d d l record
339             * @return the d d l record that was updated
340             * @throws SystemException if a system exception occurred
341             */
342            @Indexable(type = IndexableType.REINDEX)
343            @Override
344            public DDLRecord updateDDLRecord(DDLRecord ddlRecord)
345                    throws SystemException {
346                    return ddlRecordPersistence.update(ddlRecord);
347            }
348    
349            /**
350             * Returns the d d l record local service.
351             *
352             * @return the d d l record local service
353             */
354            public com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService getDDLRecordLocalService() {
355                    return ddlRecordLocalService;
356            }
357    
358            /**
359             * Sets the d d l record local service.
360             *
361             * @param ddlRecordLocalService the d d l record local service
362             */
363            public void setDDLRecordLocalService(
364                    com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService ddlRecordLocalService) {
365                    this.ddlRecordLocalService = ddlRecordLocalService;
366            }
367    
368            /**
369             * Returns the d d l record remote service.
370             *
371             * @return the d d l record remote service
372             */
373            public com.liferay.portlet.dynamicdatalists.service.DDLRecordService getDDLRecordService() {
374                    return ddlRecordService;
375            }
376    
377            /**
378             * Sets the d d l record remote service.
379             *
380             * @param ddlRecordService the d d l record remote service
381             */
382            public void setDDLRecordService(
383                    com.liferay.portlet.dynamicdatalists.service.DDLRecordService ddlRecordService) {
384                    this.ddlRecordService = ddlRecordService;
385            }
386    
387            /**
388             * Returns the d d l record persistence.
389             *
390             * @return the d d l record persistence
391             */
392            public DDLRecordPersistence getDDLRecordPersistence() {
393                    return ddlRecordPersistence;
394            }
395    
396            /**
397             * Sets the d d l record persistence.
398             *
399             * @param ddlRecordPersistence the d d l record persistence
400             */
401            public void setDDLRecordPersistence(
402                    DDLRecordPersistence ddlRecordPersistence) {
403                    this.ddlRecordPersistence = ddlRecordPersistence;
404            }
405    
406            /**
407             * Returns the d d l record finder.
408             *
409             * @return the d d l record finder
410             */
411            public DDLRecordFinder getDDLRecordFinder() {
412                    return ddlRecordFinder;
413            }
414    
415            /**
416             * Sets the d d l record finder.
417             *
418             * @param ddlRecordFinder the d d l record finder
419             */
420            public void setDDLRecordFinder(DDLRecordFinder ddlRecordFinder) {
421                    this.ddlRecordFinder = ddlRecordFinder;
422            }
423    
424            /**
425             * Returns the d d l record set local service.
426             *
427             * @return the d d l record set local service
428             */
429            public com.liferay.portlet.dynamicdatalists.service.DDLRecordSetLocalService getDDLRecordSetLocalService() {
430                    return ddlRecordSetLocalService;
431            }
432    
433            /**
434             * Sets the d d l record set local service.
435             *
436             * @param ddlRecordSetLocalService the d d l record set local service
437             */
438            public void setDDLRecordSetLocalService(
439                    com.liferay.portlet.dynamicdatalists.service.DDLRecordSetLocalService ddlRecordSetLocalService) {
440                    this.ddlRecordSetLocalService = ddlRecordSetLocalService;
441            }
442    
443            /**
444             * Returns the d d l record set remote service.
445             *
446             * @return the d d l record set remote service
447             */
448            public com.liferay.portlet.dynamicdatalists.service.DDLRecordSetService getDDLRecordSetService() {
449                    return ddlRecordSetService;
450            }
451    
452            /**
453             * Sets the d d l record set remote service.
454             *
455             * @param ddlRecordSetService the d d l record set remote service
456             */
457            public void setDDLRecordSetService(
458                    com.liferay.portlet.dynamicdatalists.service.DDLRecordSetService ddlRecordSetService) {
459                    this.ddlRecordSetService = ddlRecordSetService;
460            }
461    
462            /**
463             * Returns the d d l record set persistence.
464             *
465             * @return the d d l record set persistence
466             */
467            public DDLRecordSetPersistence getDDLRecordSetPersistence() {
468                    return ddlRecordSetPersistence;
469            }
470    
471            /**
472             * Sets the d d l record set persistence.
473             *
474             * @param ddlRecordSetPersistence the d d l record set persistence
475             */
476            public void setDDLRecordSetPersistence(
477                    DDLRecordSetPersistence ddlRecordSetPersistence) {
478                    this.ddlRecordSetPersistence = ddlRecordSetPersistence;
479            }
480    
481            /**
482             * Returns the d d l record set finder.
483             *
484             * @return the d d l record set finder
485             */
486            public DDLRecordSetFinder getDDLRecordSetFinder() {
487                    return ddlRecordSetFinder;
488            }
489    
490            /**
491             * Sets the d d l record set finder.
492             *
493             * @param ddlRecordSetFinder the d d l record set finder
494             */
495            public void setDDLRecordSetFinder(DDLRecordSetFinder ddlRecordSetFinder) {
496                    this.ddlRecordSetFinder = ddlRecordSetFinder;
497            }
498    
499            /**
500             * Returns the d d l record version persistence.
501             *
502             * @return the d d l record version persistence
503             */
504            public DDLRecordVersionPersistence getDDLRecordVersionPersistence() {
505                    return ddlRecordVersionPersistence;
506            }
507    
508            /**
509             * Sets the d d l record version persistence.
510             *
511             * @param ddlRecordVersionPersistence the d d l record version persistence
512             */
513            public void setDDLRecordVersionPersistence(
514                    DDLRecordVersionPersistence ddlRecordVersionPersistence) {
515                    this.ddlRecordVersionPersistence = ddlRecordVersionPersistence;
516            }
517    
518            /**
519             * Returns the counter local service.
520             *
521             * @return the counter local service
522             */
523            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
524                    return counterLocalService;
525            }
526    
527            /**
528             * Sets the counter local service.
529             *
530             * @param counterLocalService the counter local service
531             */
532            public void setCounterLocalService(
533                    com.liferay.counter.service.CounterLocalService counterLocalService) {
534                    this.counterLocalService = counterLocalService;
535            }
536    
537            /**
538             * Returns the resource local service.
539             *
540             * @return the resource local service
541             */
542            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
543                    return resourceLocalService;
544            }
545    
546            /**
547             * Sets the resource local service.
548             *
549             * @param resourceLocalService the resource local service
550             */
551            public void setResourceLocalService(
552                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
553                    this.resourceLocalService = resourceLocalService;
554            }
555    
556            /**
557             * Returns the user local service.
558             *
559             * @return the user local service
560             */
561            public com.liferay.portal.service.UserLocalService getUserLocalService() {
562                    return userLocalService;
563            }
564    
565            /**
566             * Sets the user local service.
567             *
568             * @param userLocalService the user local service
569             */
570            public void setUserLocalService(
571                    com.liferay.portal.service.UserLocalService userLocalService) {
572                    this.userLocalService = userLocalService;
573            }
574    
575            /**
576             * Returns the user remote service.
577             *
578             * @return the user remote service
579             */
580            public com.liferay.portal.service.UserService getUserService() {
581                    return userService;
582            }
583    
584            /**
585             * Sets the user remote service.
586             *
587             * @param userService the user remote service
588             */
589            public void setUserService(
590                    com.liferay.portal.service.UserService userService) {
591                    this.userService = userService;
592            }
593    
594            /**
595             * Returns the user persistence.
596             *
597             * @return the user persistence
598             */
599            public UserPersistence getUserPersistence() {
600                    return userPersistence;
601            }
602    
603            /**
604             * Sets the user persistence.
605             *
606             * @param userPersistence the user persistence
607             */
608            public void setUserPersistence(UserPersistence userPersistence) {
609                    this.userPersistence = userPersistence;
610            }
611    
612            /**
613             * Returns the user finder.
614             *
615             * @return the user finder
616             */
617            public UserFinder getUserFinder() {
618                    return userFinder;
619            }
620    
621            /**
622             * Sets the user finder.
623             *
624             * @param userFinder the user finder
625             */
626            public void setUserFinder(UserFinder userFinder) {
627                    this.userFinder = userFinder;
628            }
629    
630            /**
631             * Returns the workflow instance link local service.
632             *
633             * @return the workflow instance link local service
634             */
635            public com.liferay.portal.service.WorkflowInstanceLinkLocalService getWorkflowInstanceLinkLocalService() {
636                    return workflowInstanceLinkLocalService;
637            }
638    
639            /**
640             * Sets the workflow instance link local service.
641             *
642             * @param workflowInstanceLinkLocalService the workflow instance link local service
643             */
644            public void setWorkflowInstanceLinkLocalService(
645                    com.liferay.portal.service.WorkflowInstanceLinkLocalService workflowInstanceLinkLocalService) {
646                    this.workflowInstanceLinkLocalService = workflowInstanceLinkLocalService;
647            }
648    
649            /**
650             * Returns the workflow instance link persistence.
651             *
652             * @return the workflow instance link persistence
653             */
654            public WorkflowInstanceLinkPersistence getWorkflowInstanceLinkPersistence() {
655                    return workflowInstanceLinkPersistence;
656            }
657    
658            /**
659             * Sets the workflow instance link persistence.
660             *
661             * @param workflowInstanceLinkPersistence the workflow instance link persistence
662             */
663            public void setWorkflowInstanceLinkPersistence(
664                    WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence) {
665                    this.workflowInstanceLinkPersistence = workflowInstanceLinkPersistence;
666            }
667    
668            /**
669             * Returns the asset entry local service.
670             *
671             * @return the asset entry local service
672             */
673            public com.liferay.portlet.asset.service.AssetEntryLocalService getAssetEntryLocalService() {
674                    return assetEntryLocalService;
675            }
676    
677            /**
678             * Sets the asset entry local service.
679             *
680             * @param assetEntryLocalService the asset entry local service
681             */
682            public void setAssetEntryLocalService(
683                    com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService) {
684                    this.assetEntryLocalService = assetEntryLocalService;
685            }
686    
687            /**
688             * Returns the asset entry remote service.
689             *
690             * @return the asset entry remote service
691             */
692            public com.liferay.portlet.asset.service.AssetEntryService getAssetEntryService() {
693                    return assetEntryService;
694            }
695    
696            /**
697             * Sets the asset entry remote service.
698             *
699             * @param assetEntryService the asset entry remote service
700             */
701            public void setAssetEntryService(
702                    com.liferay.portlet.asset.service.AssetEntryService assetEntryService) {
703                    this.assetEntryService = assetEntryService;
704            }
705    
706            /**
707             * Returns the asset entry persistence.
708             *
709             * @return the asset entry persistence
710             */
711            public AssetEntryPersistence getAssetEntryPersistence() {
712                    return assetEntryPersistence;
713            }
714    
715            /**
716             * Sets the asset entry persistence.
717             *
718             * @param assetEntryPersistence the asset entry persistence
719             */
720            public void setAssetEntryPersistence(
721                    AssetEntryPersistence assetEntryPersistence) {
722                    this.assetEntryPersistence = assetEntryPersistence;
723            }
724    
725            /**
726             * Returns the asset entry finder.
727             *
728             * @return the asset entry finder
729             */
730            public AssetEntryFinder getAssetEntryFinder() {
731                    return assetEntryFinder;
732            }
733    
734            /**
735             * Sets the asset entry finder.
736             *
737             * @param assetEntryFinder the asset entry finder
738             */
739            public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
740                    this.assetEntryFinder = assetEntryFinder;
741            }
742    
743            /**
744             * Returns the d d m structure local service.
745             *
746             * @return the d d m structure local service
747             */
748            public com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService getDDMStructureLocalService() {
749                    return ddmStructureLocalService;
750            }
751    
752            /**
753             * Sets the d d m structure local service.
754             *
755             * @param ddmStructureLocalService the d d m structure local service
756             */
757            public void setDDMStructureLocalService(
758                    com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService ddmStructureLocalService) {
759                    this.ddmStructureLocalService = ddmStructureLocalService;
760            }
761    
762            /**
763             * Returns the d d m structure remote service.
764             *
765             * @return the d d m structure remote service
766             */
767            public com.liferay.portlet.dynamicdatamapping.service.DDMStructureService getDDMStructureService() {
768                    return ddmStructureService;
769            }
770    
771            /**
772             * Sets the d d m structure remote service.
773             *
774             * @param ddmStructureService the d d m structure remote service
775             */
776            public void setDDMStructureService(
777                    com.liferay.portlet.dynamicdatamapping.service.DDMStructureService ddmStructureService) {
778                    this.ddmStructureService = ddmStructureService;
779            }
780    
781            /**
782             * Returns the d d m structure persistence.
783             *
784             * @return the d d m structure persistence
785             */
786            public DDMStructurePersistence getDDMStructurePersistence() {
787                    return ddmStructurePersistence;
788            }
789    
790            /**
791             * Sets the d d m structure persistence.
792             *
793             * @param ddmStructurePersistence the d d m structure persistence
794             */
795            public void setDDMStructurePersistence(
796                    DDMStructurePersistence ddmStructurePersistence) {
797                    this.ddmStructurePersistence = ddmStructurePersistence;
798            }
799    
800            /**
801             * Returns the d d m structure finder.
802             *
803             * @return the d d m structure finder
804             */
805            public DDMStructureFinder getDDMStructureFinder() {
806                    return ddmStructureFinder;
807            }
808    
809            /**
810             * Sets the d d m structure finder.
811             *
812             * @param ddmStructureFinder the d d m structure finder
813             */
814            public void setDDMStructureFinder(DDMStructureFinder ddmStructureFinder) {
815                    this.ddmStructureFinder = ddmStructureFinder;
816            }
817    
818            public void afterPropertiesSet() {
819                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.dynamicdatalists.model.DDLRecord",
820                            ddlRecordLocalService);
821            }
822    
823            public void destroy() {
824                    persistedModelLocalServiceRegistry.unregister(
825                            "com.liferay.portlet.dynamicdatalists.model.DDLRecord");
826            }
827    
828            /**
829             * Returns the Spring bean ID for this bean.
830             *
831             * @return the Spring bean ID for this bean
832             */
833            @Override
834            public String getBeanIdentifier() {
835                    return _beanIdentifier;
836            }
837    
838            /**
839             * Sets the Spring bean ID for this bean.
840             *
841             * @param beanIdentifier the Spring bean ID for this bean
842             */
843            @Override
844            public void setBeanIdentifier(String beanIdentifier) {
845                    _beanIdentifier = beanIdentifier;
846            }
847    
848            protected Class<?> getModelClass() {
849                    return DDLRecord.class;
850            }
851    
852            protected String getModelClassName() {
853                    return DDLRecord.class.getName();
854            }
855    
856            /**
857             * Performs an SQL query.
858             *
859             * @param sql the sql query
860             */
861            protected void runSQL(String sql) throws SystemException {
862                    try {
863                            DataSource dataSource = ddlRecordPersistence.getDataSource();
864    
865                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
866                                            sql, new int[0]);
867    
868                            sqlUpdate.update();
869                    }
870                    catch (Exception e) {
871                            throw new SystemException(e);
872                    }
873            }
874    
875            @BeanReference(type = com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService.class)
876            protected com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService ddlRecordLocalService;
877            @BeanReference(type = com.liferay.portlet.dynamicdatalists.service.DDLRecordService.class)
878            protected com.liferay.portlet.dynamicdatalists.service.DDLRecordService ddlRecordService;
879            @BeanReference(type = DDLRecordPersistence.class)
880            protected DDLRecordPersistence ddlRecordPersistence;
881            @BeanReference(type = DDLRecordFinder.class)
882            protected DDLRecordFinder ddlRecordFinder;
883            @BeanReference(type = com.liferay.portlet.dynamicdatalists.service.DDLRecordSetLocalService.class)
884            protected com.liferay.portlet.dynamicdatalists.service.DDLRecordSetLocalService ddlRecordSetLocalService;
885            @BeanReference(type = com.liferay.portlet.dynamicdatalists.service.DDLRecordSetService.class)
886            protected com.liferay.portlet.dynamicdatalists.service.DDLRecordSetService ddlRecordSetService;
887            @BeanReference(type = DDLRecordSetPersistence.class)
888            protected DDLRecordSetPersistence ddlRecordSetPersistence;
889            @BeanReference(type = DDLRecordSetFinder.class)
890            protected DDLRecordSetFinder ddlRecordSetFinder;
891            @BeanReference(type = DDLRecordVersionPersistence.class)
892            protected DDLRecordVersionPersistence ddlRecordVersionPersistence;
893            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
894            protected com.liferay.counter.service.CounterLocalService counterLocalService;
895            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
896            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
897            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
898            protected com.liferay.portal.service.UserLocalService userLocalService;
899            @BeanReference(type = com.liferay.portal.service.UserService.class)
900            protected com.liferay.portal.service.UserService userService;
901            @BeanReference(type = UserPersistence.class)
902            protected UserPersistence userPersistence;
903            @BeanReference(type = UserFinder.class)
904            protected UserFinder userFinder;
905            @BeanReference(type = com.liferay.portal.service.WorkflowInstanceLinkLocalService.class)
906            protected com.liferay.portal.service.WorkflowInstanceLinkLocalService workflowInstanceLinkLocalService;
907            @BeanReference(type = WorkflowInstanceLinkPersistence.class)
908            protected WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence;
909            @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryLocalService.class)
910            protected com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService;
911            @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryService.class)
912            protected com.liferay.portlet.asset.service.AssetEntryService assetEntryService;
913            @BeanReference(type = AssetEntryPersistence.class)
914            protected AssetEntryPersistence assetEntryPersistence;
915            @BeanReference(type = AssetEntryFinder.class)
916            protected AssetEntryFinder assetEntryFinder;
917            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService.class)
918            protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService ddmStructureLocalService;
919            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureService.class)
920            protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureService ddmStructureService;
921            @BeanReference(type = DDMStructurePersistence.class)
922            protected DDMStructurePersistence ddmStructurePersistence;
923            @BeanReference(type = DDMStructureFinder.class)
924            protected DDMStructureFinder ddmStructureFinder;
925            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
926            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
927            private String _beanIdentifier;
928    }