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.dynamicdatamapping.service.base;
016    
017    import com.liferay.counter.service.CounterLocalService;
018    
019    import com.liferay.portal.kernel.bean.BeanReference;
020    import com.liferay.portal.kernel.bean.IdentifiableBean;
021    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
023    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
024    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
025    import com.liferay.portal.kernel.exception.PortalException;
026    import com.liferay.portal.kernel.exception.SystemException;
027    import com.liferay.portal.kernel.search.Indexable;
028    import com.liferay.portal.kernel.search.IndexableType;
029    import com.liferay.portal.kernel.util.OrderByComparator;
030    import com.liferay.portal.model.PersistedModel;
031    import com.liferay.portal.service.BaseLocalServiceImpl;
032    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
033    import com.liferay.portal.service.ResourceLocalService;
034    import com.liferay.portal.service.ResourceService;
035    import com.liferay.portal.service.UserLocalService;
036    import com.liferay.portal.service.UserService;
037    import com.liferay.portal.service.persistence.ResourceFinder;
038    import com.liferay.portal.service.persistence.ResourcePersistence;
039    import com.liferay.portal.service.persistence.UserFinder;
040    import com.liferay.portal.service.persistence.UserPersistence;
041    
042    import com.liferay.portlet.documentlibrary.service.DLFileEntryTypeLocalService;
043    import com.liferay.portlet.documentlibrary.service.DLFileEntryTypeService;
044    import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryTypeFinder;
045    import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryTypePersistence;
046    import com.liferay.portlet.dynamicdatamapping.model.DDMStructure;
047    import com.liferay.portlet.dynamicdatamapping.service.DDMContentLocalService;
048    import com.liferay.portlet.dynamicdatamapping.service.DDMStorageLinkLocalService;
049    import com.liferay.portlet.dynamicdatamapping.service.DDMStructureLinkLocalService;
050    import com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService;
051    import com.liferay.portlet.dynamicdatamapping.service.DDMStructureService;
052    import com.liferay.portlet.dynamicdatamapping.service.DDMTemplateLocalService;
053    import com.liferay.portlet.dynamicdatamapping.service.DDMTemplateService;
054    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMContentPersistence;
055    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStorageLinkPersistence;
056    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureFinder;
057    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureLinkPersistence;
058    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructurePersistence;
059    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMTemplateFinder;
060    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMTemplatePersistence;
061    
062    import java.io.Serializable;
063    
064    import java.util.List;
065    
066    import javax.sql.DataSource;
067    
068    /**
069     * The base implementation of the d d m structure local service.
070     *
071     * <p>
072     * 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.DDMStructureLocalServiceImpl}.
073     * </p>
074     *
075     * @author Brian Wing Shun Chan
076     * @see com.liferay.portlet.dynamicdatamapping.service.impl.DDMStructureLocalServiceImpl
077     * @see com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalServiceUtil
078     * @generated
079     */
080    public abstract class DDMStructureLocalServiceBaseImpl
081            extends BaseLocalServiceImpl implements DDMStructureLocalService,
082                    IdentifiableBean {
083            /*
084             * NOTE FOR DEVELOPERS:
085             *
086             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalServiceUtil} to access the d d m structure local service.
087             */
088    
089            /**
090             * Adds the d d m structure to the database. Also notifies the appropriate model listeners.
091             *
092             * @param ddmStructure the d d m structure
093             * @return the d d m structure that was added
094             * @throws SystemException if a system exception occurred
095             */
096            @Indexable(type = IndexableType.REINDEX)
097            public DDMStructure addDDMStructure(DDMStructure ddmStructure)
098                    throws SystemException {
099                    ddmStructure.setNew(true);
100    
101                    return ddmStructurePersistence.update(ddmStructure, false);
102            }
103    
104            /**
105             * Creates a new d d m structure with the primary key. Does not add the d d m structure to the database.
106             *
107             * @param structureId the primary key for the new d d m structure
108             * @return the new d d m structure
109             */
110            public DDMStructure createDDMStructure(long structureId) {
111                    return ddmStructurePersistence.create(structureId);
112            }
113    
114            /**
115             * Deletes the d d m structure with the primary key from the database. Also notifies the appropriate model listeners.
116             *
117             * @param structureId the primary key of the d d m structure
118             * @return the d d m structure that was removed
119             * @throws PortalException if a d d m structure with the primary key could not be found
120             * @throws SystemException if a system exception occurred
121             */
122            @Indexable(type = IndexableType.DELETE)
123            public DDMStructure deleteDDMStructure(long structureId)
124                    throws PortalException, SystemException {
125                    return ddmStructurePersistence.remove(structureId);
126            }
127    
128            /**
129             * Deletes the d d m structure from the database. Also notifies the appropriate model listeners.
130             *
131             * @param ddmStructure the d d m structure
132             * @return the d d m structure that was removed
133             * @throws SystemException if a system exception occurred
134             */
135            @Indexable(type = IndexableType.DELETE)
136            public DDMStructure deleteDDMStructure(DDMStructure ddmStructure)
137                    throws SystemException {
138                    return ddmStructurePersistence.remove(ddmStructure);
139            }
140    
141            public DynamicQuery dynamicQuery() {
142                    Class<?> clazz = getClass();
143    
144                    return DynamicQueryFactoryUtil.forClass(DDMStructure.class,
145                            clazz.getClassLoader());
146            }
147    
148            /**
149             * Performs a dynamic query on the database and returns the matching rows.
150             *
151             * @param dynamicQuery the dynamic query
152             * @return the matching rows
153             * @throws SystemException if a system exception occurred
154             */
155            @SuppressWarnings("rawtypes")
156            public List dynamicQuery(DynamicQuery dynamicQuery)
157                    throws SystemException {
158                    return ddmStructurePersistence.findWithDynamicQuery(dynamicQuery);
159            }
160    
161            /**
162             * Performs a dynamic query on the database and returns a range of the matching rows.
163             *
164             * <p>
165             * 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.
166             * </p>
167             *
168             * @param dynamicQuery the dynamic query
169             * @param start the lower bound of the range of model instances
170             * @param end the upper bound of the range of model instances (not inclusive)
171             * @return the range of matching rows
172             * @throws SystemException if a system exception occurred
173             */
174            @SuppressWarnings("rawtypes")
175            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
176                    throws SystemException {
177                    return ddmStructurePersistence.findWithDynamicQuery(dynamicQuery,
178                            start, end);
179            }
180    
181            /**
182             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
183             *
184             * <p>
185             * 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.
186             * </p>
187             *
188             * @param dynamicQuery the dynamic query
189             * @param start the lower bound of the range of model instances
190             * @param end the upper bound of the range of model instances (not inclusive)
191             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
192             * @return the ordered range of matching rows
193             * @throws SystemException if a system exception occurred
194             */
195            @SuppressWarnings("rawtypes")
196            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
197                    OrderByComparator orderByComparator) throws SystemException {
198                    return ddmStructurePersistence.findWithDynamicQuery(dynamicQuery,
199                            start, end, orderByComparator);
200            }
201    
202            /**
203             * Returns the number of rows that match the dynamic query.
204             *
205             * @param dynamicQuery the dynamic query
206             * @return the number of rows that match the dynamic query
207             * @throws SystemException if a system exception occurred
208             */
209            public long dynamicQueryCount(DynamicQuery dynamicQuery)
210                    throws SystemException {
211                    return ddmStructurePersistence.countWithDynamicQuery(dynamicQuery);
212            }
213    
214            public DDMStructure fetchDDMStructure(long structureId)
215                    throws SystemException {
216                    return ddmStructurePersistence.fetchByPrimaryKey(structureId);
217            }
218    
219            /**
220             * Returns the d d m structure with the primary key.
221             *
222             * @param structureId the primary key of the d d m structure
223             * @return the d d m structure
224             * @throws PortalException if a d d m structure with the primary key could not be found
225             * @throws SystemException if a system exception occurred
226             */
227            public DDMStructure getDDMStructure(long structureId)
228                    throws PortalException, SystemException {
229                    return ddmStructurePersistence.findByPrimaryKey(structureId);
230            }
231    
232            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
233                    throws PortalException, SystemException {
234                    return ddmStructurePersistence.findByPrimaryKey(primaryKeyObj);
235            }
236    
237            /**
238             * Returns the d d m structure with the UUID in the group.
239             *
240             * @param uuid the UUID of d d m structure
241             * @param groupId the group id of the d d m structure
242             * @return the d d m structure
243             * @throws PortalException if a d d m structure with the UUID in the group could not be found
244             * @throws SystemException if a system exception occurred
245             */
246            public DDMStructure getDDMStructureByUuidAndGroupId(String uuid,
247                    long groupId) throws PortalException, SystemException {
248                    return ddmStructurePersistence.findByUUID_G(uuid, groupId);
249            }
250    
251            /**
252             * Returns a range of all the d d m structures.
253             *
254             * <p>
255             * 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.
256             * </p>
257             *
258             * @param start the lower bound of the range of d d m structures
259             * @param end the upper bound of the range of d d m structures (not inclusive)
260             * @return the range of d d m structures
261             * @throws SystemException if a system exception occurred
262             */
263            public List<DDMStructure> getDDMStructures(int start, int end)
264                    throws SystemException {
265                    return ddmStructurePersistence.findAll(start, end);
266            }
267    
268            /**
269             * Returns the number of d d m structures.
270             *
271             * @return the number of d d m structures
272             * @throws SystemException if a system exception occurred
273             */
274            public int getDDMStructuresCount() throws SystemException {
275                    return ddmStructurePersistence.countAll();
276            }
277    
278            /**
279             * Updates the d d m structure in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
280             *
281             * @param ddmStructure the d d m structure
282             * @return the d d m structure that was updated
283             * @throws SystemException if a system exception occurred
284             */
285            @Indexable(type = IndexableType.REINDEX)
286            public DDMStructure updateDDMStructure(DDMStructure ddmStructure)
287                    throws SystemException {
288                    return updateDDMStructure(ddmStructure, true);
289            }
290    
291            /**
292             * Updates the d d m structure in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
293             *
294             * @param ddmStructure the d d m structure
295             * @param merge whether to merge the d d m structure with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
296             * @return the d d m structure that was updated
297             * @throws SystemException if a system exception occurred
298             */
299            @Indexable(type = IndexableType.REINDEX)
300            public DDMStructure updateDDMStructure(DDMStructure ddmStructure,
301                    boolean merge) throws SystemException {
302                    ddmStructure.setNew(false);
303    
304                    return ddmStructurePersistence.update(ddmStructure, merge);
305            }
306    
307            /**
308             * @throws SystemException if a system exception occurred
309             */
310            public void addDLFileEntryTypeDDMStructure(long fileEntryTypeId,
311                    long structureId) throws SystemException {
312                    dlFileEntryTypePersistence.addDDMStructure(fileEntryTypeId, structureId);
313            }
314    
315            /**
316             * @throws SystemException if a system exception occurred
317             */
318            public void addDLFileEntryTypeDDMStructure(long fileEntryTypeId,
319                    DDMStructure ddmStructure) throws SystemException {
320                    dlFileEntryTypePersistence.addDDMStructure(fileEntryTypeId, ddmStructure);
321            }
322    
323            /**
324             * @throws SystemException if a system exception occurred
325             */
326            public void addDLFileEntryTypeDDMStructures(long fileEntryTypeId,
327                    long[] structureIds) throws SystemException {
328                    dlFileEntryTypePersistence.addDDMStructures(fileEntryTypeId,
329                            structureIds);
330            }
331    
332            /**
333             * @throws SystemException if a system exception occurred
334             */
335            public void addDLFileEntryTypeDDMStructures(long fileEntryTypeId,
336                    List<DDMStructure> DDMStructures) throws SystemException {
337                    dlFileEntryTypePersistence.addDDMStructures(fileEntryTypeId,
338                            DDMStructures);
339            }
340    
341            /**
342             * @throws SystemException if a system exception occurred
343             */
344            public void clearDLFileEntryTypeDDMStructures(long fileEntryTypeId)
345                    throws SystemException {
346                    dlFileEntryTypePersistence.clearDDMStructures(fileEntryTypeId);
347            }
348    
349            /**
350             * @throws SystemException if a system exception occurred
351             */
352            public void deleteDLFileEntryTypeDDMStructure(long fileEntryTypeId,
353                    long structureId) throws SystemException {
354                    dlFileEntryTypePersistence.removeDDMStructure(fileEntryTypeId,
355                            structureId);
356            }
357    
358            /**
359             * @throws SystemException if a system exception occurred
360             */
361            public void deleteDLFileEntryTypeDDMStructure(long fileEntryTypeId,
362                    DDMStructure ddmStructure) throws SystemException {
363                    dlFileEntryTypePersistence.removeDDMStructure(fileEntryTypeId,
364                            ddmStructure);
365            }
366    
367            /**
368             * @throws SystemException if a system exception occurred
369             */
370            public void deleteDLFileEntryTypeDDMStructures(long fileEntryTypeId,
371                    long[] structureIds) throws SystemException {
372                    dlFileEntryTypePersistence.removeDDMStructures(fileEntryTypeId,
373                            structureIds);
374            }
375    
376            /**
377             * @throws SystemException if a system exception occurred
378             */
379            public void deleteDLFileEntryTypeDDMStructures(long fileEntryTypeId,
380                    List<DDMStructure> DDMStructures) throws SystemException {
381                    dlFileEntryTypePersistence.removeDDMStructures(fileEntryTypeId,
382                            DDMStructures);
383            }
384    
385            /**
386             * @throws SystemException if a system exception occurred
387             */
388            public List<DDMStructure> getDLFileEntryTypeDDMStructures(
389                    long fileEntryTypeId) throws SystemException {
390                    return dlFileEntryTypePersistence.getDDMStructures(fileEntryTypeId);
391            }
392    
393            /**
394             * @throws SystemException if a system exception occurred
395             */
396            public List<DDMStructure> getDLFileEntryTypeDDMStructures(
397                    long fileEntryTypeId, int start, int end) throws SystemException {
398                    return dlFileEntryTypePersistence.getDDMStructures(fileEntryTypeId,
399                            start, end);
400            }
401    
402            /**
403             * @throws SystemException if a system exception occurred
404             */
405            public List<DDMStructure> getDLFileEntryTypeDDMStructures(
406                    long fileEntryTypeId, int start, int end,
407                    OrderByComparator orderByComparator) throws SystemException {
408                    return dlFileEntryTypePersistence.getDDMStructures(fileEntryTypeId,
409                            start, end, orderByComparator);
410            }
411    
412            /**
413             * @throws SystemException if a system exception occurred
414             */
415            public int getDLFileEntryTypeDDMStructuresCount(long fileEntryTypeId)
416                    throws SystemException {
417                    return dlFileEntryTypePersistence.getDDMStructuresSize(fileEntryTypeId);
418            }
419    
420            /**
421             * @throws SystemException if a system exception occurred
422             */
423            public boolean hasDLFileEntryTypeDDMStructure(long fileEntryTypeId,
424                    long structureId) throws SystemException {
425                    return dlFileEntryTypePersistence.containsDDMStructure(fileEntryTypeId,
426                            structureId);
427            }
428    
429            /**
430             * @throws SystemException if a system exception occurred
431             */
432            public boolean hasDLFileEntryTypeDDMStructures(long fileEntryTypeId)
433                    throws SystemException {
434                    return dlFileEntryTypePersistence.containsDDMStructures(fileEntryTypeId);
435            }
436    
437            /**
438             * @throws SystemException if a system exception occurred
439             */
440            public void setDLFileEntryTypeDDMStructures(long fileEntryTypeId,
441                    long[] structureIds) throws SystemException {
442                    dlFileEntryTypePersistence.setDDMStructures(fileEntryTypeId,
443                            structureIds);
444            }
445    
446            /**
447             * Returns the d d m content local service.
448             *
449             * @return the d d m content local service
450             */
451            public DDMContentLocalService getDDMContentLocalService() {
452                    return ddmContentLocalService;
453            }
454    
455            /**
456             * Sets the d d m content local service.
457             *
458             * @param ddmContentLocalService the d d m content local service
459             */
460            public void setDDMContentLocalService(
461                    DDMContentLocalService ddmContentLocalService) {
462                    this.ddmContentLocalService = ddmContentLocalService;
463            }
464    
465            /**
466             * Returns the d d m content persistence.
467             *
468             * @return the d d m content persistence
469             */
470            public DDMContentPersistence getDDMContentPersistence() {
471                    return ddmContentPersistence;
472            }
473    
474            /**
475             * Sets the d d m content persistence.
476             *
477             * @param ddmContentPersistence the d d m content persistence
478             */
479            public void setDDMContentPersistence(
480                    DDMContentPersistence ddmContentPersistence) {
481                    this.ddmContentPersistence = ddmContentPersistence;
482            }
483    
484            /**
485             * Returns the d d m storage link local service.
486             *
487             * @return the d d m storage link local service
488             */
489            public DDMStorageLinkLocalService getDDMStorageLinkLocalService() {
490                    return ddmStorageLinkLocalService;
491            }
492    
493            /**
494             * Sets the d d m storage link local service.
495             *
496             * @param ddmStorageLinkLocalService the d d m storage link local service
497             */
498            public void setDDMStorageLinkLocalService(
499                    DDMStorageLinkLocalService ddmStorageLinkLocalService) {
500                    this.ddmStorageLinkLocalService = ddmStorageLinkLocalService;
501            }
502    
503            /**
504             * Returns the d d m storage link persistence.
505             *
506             * @return the d d m storage link persistence
507             */
508            public DDMStorageLinkPersistence getDDMStorageLinkPersistence() {
509                    return ddmStorageLinkPersistence;
510            }
511    
512            /**
513             * Sets the d d m storage link persistence.
514             *
515             * @param ddmStorageLinkPersistence the d d m storage link persistence
516             */
517            public void setDDMStorageLinkPersistence(
518                    DDMStorageLinkPersistence ddmStorageLinkPersistence) {
519                    this.ddmStorageLinkPersistence = ddmStorageLinkPersistence;
520            }
521    
522            /**
523             * Returns the d d m structure local service.
524             *
525             * @return the d d m structure local service
526             */
527            public DDMStructureLocalService getDDMStructureLocalService() {
528                    return ddmStructureLocalService;
529            }
530    
531            /**
532             * Sets the d d m structure local service.
533             *
534             * @param ddmStructureLocalService the d d m structure local service
535             */
536            public void setDDMStructureLocalService(
537                    DDMStructureLocalService ddmStructureLocalService) {
538                    this.ddmStructureLocalService = ddmStructureLocalService;
539            }
540    
541            /**
542             * Returns the d d m structure remote service.
543             *
544             * @return the d d m structure remote service
545             */
546            public DDMStructureService getDDMStructureService() {
547                    return ddmStructureService;
548            }
549    
550            /**
551             * Sets the d d m structure remote service.
552             *
553             * @param ddmStructureService the d d m structure remote service
554             */
555            public void setDDMStructureService(DDMStructureService ddmStructureService) {
556                    this.ddmStructureService = ddmStructureService;
557            }
558    
559            /**
560             * Returns the d d m structure persistence.
561             *
562             * @return the d d m structure persistence
563             */
564            public DDMStructurePersistence getDDMStructurePersistence() {
565                    return ddmStructurePersistence;
566            }
567    
568            /**
569             * Sets the d d m structure persistence.
570             *
571             * @param ddmStructurePersistence the d d m structure persistence
572             */
573            public void setDDMStructurePersistence(
574                    DDMStructurePersistence ddmStructurePersistence) {
575                    this.ddmStructurePersistence = ddmStructurePersistence;
576            }
577    
578            /**
579             * Returns the d d m structure finder.
580             *
581             * @return the d d m structure finder
582             */
583            public DDMStructureFinder getDDMStructureFinder() {
584                    return ddmStructureFinder;
585            }
586    
587            /**
588             * Sets the d d m structure finder.
589             *
590             * @param ddmStructureFinder the d d m structure finder
591             */
592            public void setDDMStructureFinder(DDMStructureFinder ddmStructureFinder) {
593                    this.ddmStructureFinder = ddmStructureFinder;
594            }
595    
596            /**
597             * Returns the d d m structure link local service.
598             *
599             * @return the d d m structure link local service
600             */
601            public DDMStructureLinkLocalService getDDMStructureLinkLocalService() {
602                    return ddmStructureLinkLocalService;
603            }
604    
605            /**
606             * Sets the d d m structure link local service.
607             *
608             * @param ddmStructureLinkLocalService the d d m structure link local service
609             */
610            public void setDDMStructureLinkLocalService(
611                    DDMStructureLinkLocalService ddmStructureLinkLocalService) {
612                    this.ddmStructureLinkLocalService = ddmStructureLinkLocalService;
613            }
614    
615            /**
616             * Returns the d d m structure link persistence.
617             *
618             * @return the d d m structure link persistence
619             */
620            public DDMStructureLinkPersistence getDDMStructureLinkPersistence() {
621                    return ddmStructureLinkPersistence;
622            }
623    
624            /**
625             * Sets the d d m structure link persistence.
626             *
627             * @param ddmStructureLinkPersistence the d d m structure link persistence
628             */
629            public void setDDMStructureLinkPersistence(
630                    DDMStructureLinkPersistence ddmStructureLinkPersistence) {
631                    this.ddmStructureLinkPersistence = ddmStructureLinkPersistence;
632            }
633    
634            /**
635             * Returns the d d m template local service.
636             *
637             * @return the d d m template local service
638             */
639            public DDMTemplateLocalService getDDMTemplateLocalService() {
640                    return ddmTemplateLocalService;
641            }
642    
643            /**
644             * Sets the d d m template local service.
645             *
646             * @param ddmTemplateLocalService the d d m template local service
647             */
648            public void setDDMTemplateLocalService(
649                    DDMTemplateLocalService ddmTemplateLocalService) {
650                    this.ddmTemplateLocalService = ddmTemplateLocalService;
651            }
652    
653            /**
654             * Returns the d d m template remote service.
655             *
656             * @return the d d m template remote service
657             */
658            public DDMTemplateService getDDMTemplateService() {
659                    return ddmTemplateService;
660            }
661    
662            /**
663             * Sets the d d m template remote service.
664             *
665             * @param ddmTemplateService the d d m template remote service
666             */
667            public void setDDMTemplateService(DDMTemplateService ddmTemplateService) {
668                    this.ddmTemplateService = ddmTemplateService;
669            }
670    
671            /**
672             * Returns the d d m template persistence.
673             *
674             * @return the d d m template persistence
675             */
676            public DDMTemplatePersistence getDDMTemplatePersistence() {
677                    return ddmTemplatePersistence;
678            }
679    
680            /**
681             * Sets the d d m template persistence.
682             *
683             * @param ddmTemplatePersistence the d d m template persistence
684             */
685            public void setDDMTemplatePersistence(
686                    DDMTemplatePersistence ddmTemplatePersistence) {
687                    this.ddmTemplatePersistence = ddmTemplatePersistence;
688            }
689    
690            /**
691             * Returns the d d m template finder.
692             *
693             * @return the d d m template finder
694             */
695            public DDMTemplateFinder getDDMTemplateFinder() {
696                    return ddmTemplateFinder;
697            }
698    
699            /**
700             * Sets the d d m template finder.
701             *
702             * @param ddmTemplateFinder the d d m template finder
703             */
704            public void setDDMTemplateFinder(DDMTemplateFinder ddmTemplateFinder) {
705                    this.ddmTemplateFinder = ddmTemplateFinder;
706            }
707    
708            /**
709             * Returns the counter local service.
710             *
711             * @return the counter local service
712             */
713            public CounterLocalService getCounterLocalService() {
714                    return counterLocalService;
715            }
716    
717            /**
718             * Sets the counter local service.
719             *
720             * @param counterLocalService the counter local service
721             */
722            public void setCounterLocalService(CounterLocalService counterLocalService) {
723                    this.counterLocalService = counterLocalService;
724            }
725    
726            /**
727             * Returns the resource local service.
728             *
729             * @return the resource local service
730             */
731            public ResourceLocalService getResourceLocalService() {
732                    return resourceLocalService;
733            }
734    
735            /**
736             * Sets the resource local service.
737             *
738             * @param resourceLocalService the resource local service
739             */
740            public void setResourceLocalService(
741                    ResourceLocalService resourceLocalService) {
742                    this.resourceLocalService = resourceLocalService;
743            }
744    
745            /**
746             * Returns the resource remote service.
747             *
748             * @return the resource remote service
749             */
750            public ResourceService getResourceService() {
751                    return resourceService;
752            }
753    
754            /**
755             * Sets the resource remote service.
756             *
757             * @param resourceService the resource remote service
758             */
759            public void setResourceService(ResourceService resourceService) {
760                    this.resourceService = resourceService;
761            }
762    
763            /**
764             * Returns the resource persistence.
765             *
766             * @return the resource persistence
767             */
768            public ResourcePersistence getResourcePersistence() {
769                    return resourcePersistence;
770            }
771    
772            /**
773             * Sets the resource persistence.
774             *
775             * @param resourcePersistence the resource persistence
776             */
777            public void setResourcePersistence(ResourcePersistence resourcePersistence) {
778                    this.resourcePersistence = resourcePersistence;
779            }
780    
781            /**
782             * Returns the resource finder.
783             *
784             * @return the resource finder
785             */
786            public ResourceFinder getResourceFinder() {
787                    return resourceFinder;
788            }
789    
790            /**
791             * Sets the resource finder.
792             *
793             * @param resourceFinder the resource finder
794             */
795            public void setResourceFinder(ResourceFinder resourceFinder) {
796                    this.resourceFinder = resourceFinder;
797            }
798    
799            /**
800             * Returns the user local service.
801             *
802             * @return the user local service
803             */
804            public UserLocalService getUserLocalService() {
805                    return userLocalService;
806            }
807    
808            /**
809             * Sets the user local service.
810             *
811             * @param userLocalService the user local service
812             */
813            public void setUserLocalService(UserLocalService userLocalService) {
814                    this.userLocalService = userLocalService;
815            }
816    
817            /**
818             * Returns the user remote service.
819             *
820             * @return the user remote service
821             */
822            public UserService getUserService() {
823                    return userService;
824            }
825    
826            /**
827             * Sets the user remote service.
828             *
829             * @param userService the user remote service
830             */
831            public void setUserService(UserService userService) {
832                    this.userService = userService;
833            }
834    
835            /**
836             * Returns the user persistence.
837             *
838             * @return the user persistence
839             */
840            public UserPersistence getUserPersistence() {
841                    return userPersistence;
842            }
843    
844            /**
845             * Sets the user persistence.
846             *
847             * @param userPersistence the user persistence
848             */
849            public void setUserPersistence(UserPersistence userPersistence) {
850                    this.userPersistence = userPersistence;
851            }
852    
853            /**
854             * Returns the user finder.
855             *
856             * @return the user finder
857             */
858            public UserFinder getUserFinder() {
859                    return userFinder;
860            }
861    
862            /**
863             * Sets the user finder.
864             *
865             * @param userFinder the user finder
866             */
867            public void setUserFinder(UserFinder userFinder) {
868                    this.userFinder = userFinder;
869            }
870    
871            /**
872             * Returns the document library file entry type local service.
873             *
874             * @return the document library file entry type local service
875             */
876            public DLFileEntryTypeLocalService getDLFileEntryTypeLocalService() {
877                    return dlFileEntryTypeLocalService;
878            }
879    
880            /**
881             * Sets the document library file entry type local service.
882             *
883             * @param dlFileEntryTypeLocalService the document library file entry type local service
884             */
885            public void setDLFileEntryTypeLocalService(
886                    DLFileEntryTypeLocalService dlFileEntryTypeLocalService) {
887                    this.dlFileEntryTypeLocalService = dlFileEntryTypeLocalService;
888            }
889    
890            /**
891             * Returns the document library file entry type remote service.
892             *
893             * @return the document library file entry type remote service
894             */
895            public DLFileEntryTypeService getDLFileEntryTypeService() {
896                    return dlFileEntryTypeService;
897            }
898    
899            /**
900             * Sets the document library file entry type remote service.
901             *
902             * @param dlFileEntryTypeService the document library file entry type remote service
903             */
904            public void setDLFileEntryTypeService(
905                    DLFileEntryTypeService dlFileEntryTypeService) {
906                    this.dlFileEntryTypeService = dlFileEntryTypeService;
907            }
908    
909            /**
910             * Returns the document library file entry type persistence.
911             *
912             * @return the document library file entry type persistence
913             */
914            public DLFileEntryTypePersistence getDLFileEntryTypePersistence() {
915                    return dlFileEntryTypePersistence;
916            }
917    
918            /**
919             * Sets the document library file entry type persistence.
920             *
921             * @param dlFileEntryTypePersistence the document library file entry type persistence
922             */
923            public void setDLFileEntryTypePersistence(
924                    DLFileEntryTypePersistence dlFileEntryTypePersistence) {
925                    this.dlFileEntryTypePersistence = dlFileEntryTypePersistence;
926            }
927    
928            /**
929             * Returns the document library file entry type finder.
930             *
931             * @return the document library file entry type finder
932             */
933            public DLFileEntryTypeFinder getDLFileEntryTypeFinder() {
934                    return dlFileEntryTypeFinder;
935            }
936    
937            /**
938             * Sets the document library file entry type finder.
939             *
940             * @param dlFileEntryTypeFinder the document library file entry type finder
941             */
942            public void setDLFileEntryTypeFinder(
943                    DLFileEntryTypeFinder dlFileEntryTypeFinder) {
944                    this.dlFileEntryTypeFinder = dlFileEntryTypeFinder;
945            }
946    
947            public void afterPropertiesSet() {
948                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.dynamicdatamapping.model.DDMStructure",
949                            ddmStructureLocalService);
950            }
951    
952            public void destroy() {
953                    persistedModelLocalServiceRegistry.unregister(
954                            "com.liferay.portlet.dynamicdatamapping.model.DDMStructure");
955            }
956    
957            /**
958             * Returns the Spring bean ID for this bean.
959             *
960             * @return the Spring bean ID for this bean
961             */
962            public String getBeanIdentifier() {
963                    return _beanIdentifier;
964            }
965    
966            /**
967             * Sets the Spring bean ID for this bean.
968             *
969             * @param beanIdentifier the Spring bean ID for this bean
970             */
971            public void setBeanIdentifier(String beanIdentifier) {
972                    _beanIdentifier = beanIdentifier;
973            }
974    
975            protected Class<?> getModelClass() {
976                    return DDMStructure.class;
977            }
978    
979            protected String getModelClassName() {
980                    return DDMStructure.class.getName();
981            }
982    
983            /**
984             * Performs an SQL query.
985             *
986             * @param sql the sql query
987             */
988            protected void runSQL(String sql) throws SystemException {
989                    try {
990                            DataSource dataSource = ddmStructurePersistence.getDataSource();
991    
992                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
993                                            sql, new int[0]);
994    
995                            sqlUpdate.update();
996                    }
997                    catch (Exception e) {
998                            throw new SystemException(e);
999                    }
1000            }
1001    
1002            @BeanReference(type = DDMContentLocalService.class)
1003            protected DDMContentLocalService ddmContentLocalService;
1004            @BeanReference(type = DDMContentPersistence.class)
1005            protected DDMContentPersistence ddmContentPersistence;
1006            @BeanReference(type = DDMStorageLinkLocalService.class)
1007            protected DDMStorageLinkLocalService ddmStorageLinkLocalService;
1008            @BeanReference(type = DDMStorageLinkPersistence.class)
1009            protected DDMStorageLinkPersistence ddmStorageLinkPersistence;
1010            @BeanReference(type = DDMStructureLocalService.class)
1011            protected DDMStructureLocalService ddmStructureLocalService;
1012            @BeanReference(type = DDMStructureService.class)
1013            protected DDMStructureService ddmStructureService;
1014            @BeanReference(type = DDMStructurePersistence.class)
1015            protected DDMStructurePersistence ddmStructurePersistence;
1016            @BeanReference(type = DDMStructureFinder.class)
1017            protected DDMStructureFinder ddmStructureFinder;
1018            @BeanReference(type = DDMStructureLinkLocalService.class)
1019            protected DDMStructureLinkLocalService ddmStructureLinkLocalService;
1020            @BeanReference(type = DDMStructureLinkPersistence.class)
1021            protected DDMStructureLinkPersistence ddmStructureLinkPersistence;
1022            @BeanReference(type = DDMTemplateLocalService.class)
1023            protected DDMTemplateLocalService ddmTemplateLocalService;
1024            @BeanReference(type = DDMTemplateService.class)
1025            protected DDMTemplateService ddmTemplateService;
1026            @BeanReference(type = DDMTemplatePersistence.class)
1027            protected DDMTemplatePersistence ddmTemplatePersistence;
1028            @BeanReference(type = DDMTemplateFinder.class)
1029            protected DDMTemplateFinder ddmTemplateFinder;
1030            @BeanReference(type = CounterLocalService.class)
1031            protected CounterLocalService counterLocalService;
1032            @BeanReference(type = ResourceLocalService.class)
1033            protected ResourceLocalService resourceLocalService;
1034            @BeanReference(type = ResourceService.class)
1035            protected ResourceService resourceService;
1036            @BeanReference(type = ResourcePersistence.class)
1037            protected ResourcePersistence resourcePersistence;
1038            @BeanReference(type = ResourceFinder.class)
1039            protected ResourceFinder resourceFinder;
1040            @BeanReference(type = UserLocalService.class)
1041            protected UserLocalService userLocalService;
1042            @BeanReference(type = UserService.class)
1043            protected UserService userService;
1044            @BeanReference(type = UserPersistence.class)
1045            protected UserPersistence userPersistence;
1046            @BeanReference(type = UserFinder.class)
1047            protected UserFinder userFinder;
1048            @BeanReference(type = DLFileEntryTypeLocalService.class)
1049            protected DLFileEntryTypeLocalService dlFileEntryTypeLocalService;
1050            @BeanReference(type = DLFileEntryTypeService.class)
1051            protected DLFileEntryTypeService dlFileEntryTypeService;
1052            @BeanReference(type = DLFileEntryTypePersistence.class)
1053            protected DLFileEntryTypePersistence dlFileEntryTypePersistence;
1054            @BeanReference(type = DLFileEntryTypeFinder.class)
1055            protected DLFileEntryTypeFinder dlFileEntryTypeFinder;
1056            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1057            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1058            private String _beanIdentifier;
1059    }