001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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             * Returns the d d m content local service.
309             *
310             * @return the d d m content local service
311             */
312            public DDMContentLocalService getDDMContentLocalService() {
313                    return ddmContentLocalService;
314            }
315    
316            /**
317             * Sets the d d m content local service.
318             *
319             * @param ddmContentLocalService the d d m content local service
320             */
321            public void setDDMContentLocalService(
322                    DDMContentLocalService ddmContentLocalService) {
323                    this.ddmContentLocalService = ddmContentLocalService;
324            }
325    
326            /**
327             * Returns the d d m content persistence.
328             *
329             * @return the d d m content persistence
330             */
331            public DDMContentPersistence getDDMContentPersistence() {
332                    return ddmContentPersistence;
333            }
334    
335            /**
336             * Sets the d d m content persistence.
337             *
338             * @param ddmContentPersistence the d d m content persistence
339             */
340            public void setDDMContentPersistence(
341                    DDMContentPersistence ddmContentPersistence) {
342                    this.ddmContentPersistence = ddmContentPersistence;
343            }
344    
345            /**
346             * Returns the d d m storage link local service.
347             *
348             * @return the d d m storage link local service
349             */
350            public DDMStorageLinkLocalService getDDMStorageLinkLocalService() {
351                    return ddmStorageLinkLocalService;
352            }
353    
354            /**
355             * Sets the d d m storage link local service.
356             *
357             * @param ddmStorageLinkLocalService the d d m storage link local service
358             */
359            public void setDDMStorageLinkLocalService(
360                    DDMStorageLinkLocalService ddmStorageLinkLocalService) {
361                    this.ddmStorageLinkLocalService = ddmStorageLinkLocalService;
362            }
363    
364            /**
365             * Returns the d d m storage link persistence.
366             *
367             * @return the d d m storage link persistence
368             */
369            public DDMStorageLinkPersistence getDDMStorageLinkPersistence() {
370                    return ddmStorageLinkPersistence;
371            }
372    
373            /**
374             * Sets the d d m storage link persistence.
375             *
376             * @param ddmStorageLinkPersistence the d d m storage link persistence
377             */
378            public void setDDMStorageLinkPersistence(
379                    DDMStorageLinkPersistence ddmStorageLinkPersistence) {
380                    this.ddmStorageLinkPersistence = ddmStorageLinkPersistence;
381            }
382    
383            /**
384             * Returns the d d m structure local service.
385             *
386             * @return the d d m structure local service
387             */
388            public DDMStructureLocalService getDDMStructureLocalService() {
389                    return ddmStructureLocalService;
390            }
391    
392            /**
393             * Sets the d d m structure local service.
394             *
395             * @param ddmStructureLocalService the d d m structure local service
396             */
397            public void setDDMStructureLocalService(
398                    DDMStructureLocalService ddmStructureLocalService) {
399                    this.ddmStructureLocalService = ddmStructureLocalService;
400            }
401    
402            /**
403             * Returns the d d m structure remote service.
404             *
405             * @return the d d m structure remote service
406             */
407            public DDMStructureService getDDMStructureService() {
408                    return ddmStructureService;
409            }
410    
411            /**
412             * Sets the d d m structure remote service.
413             *
414             * @param ddmStructureService the d d m structure remote service
415             */
416            public void setDDMStructureService(DDMStructureService ddmStructureService) {
417                    this.ddmStructureService = ddmStructureService;
418            }
419    
420            /**
421             * Returns the d d m structure persistence.
422             *
423             * @return the d d m structure persistence
424             */
425            public DDMStructurePersistence getDDMStructurePersistence() {
426                    return ddmStructurePersistence;
427            }
428    
429            /**
430             * Sets the d d m structure persistence.
431             *
432             * @param ddmStructurePersistence the d d m structure persistence
433             */
434            public void setDDMStructurePersistence(
435                    DDMStructurePersistence ddmStructurePersistence) {
436                    this.ddmStructurePersistence = ddmStructurePersistence;
437            }
438    
439            /**
440             * Returns the d d m structure finder.
441             *
442             * @return the d d m structure finder
443             */
444            public DDMStructureFinder getDDMStructureFinder() {
445                    return ddmStructureFinder;
446            }
447    
448            /**
449             * Sets the d d m structure finder.
450             *
451             * @param ddmStructureFinder the d d m structure finder
452             */
453            public void setDDMStructureFinder(DDMStructureFinder ddmStructureFinder) {
454                    this.ddmStructureFinder = ddmStructureFinder;
455            }
456    
457            /**
458             * Returns the d d m structure link local service.
459             *
460             * @return the d d m structure link local service
461             */
462            public DDMStructureLinkLocalService getDDMStructureLinkLocalService() {
463                    return ddmStructureLinkLocalService;
464            }
465    
466            /**
467             * Sets the d d m structure link local service.
468             *
469             * @param ddmStructureLinkLocalService the d d m structure link local service
470             */
471            public void setDDMStructureLinkLocalService(
472                    DDMStructureLinkLocalService ddmStructureLinkLocalService) {
473                    this.ddmStructureLinkLocalService = ddmStructureLinkLocalService;
474            }
475    
476            /**
477             * Returns the d d m structure link persistence.
478             *
479             * @return the d d m structure link persistence
480             */
481            public DDMStructureLinkPersistence getDDMStructureLinkPersistence() {
482                    return ddmStructureLinkPersistence;
483            }
484    
485            /**
486             * Sets the d d m structure link persistence.
487             *
488             * @param ddmStructureLinkPersistence the d d m structure link persistence
489             */
490            public void setDDMStructureLinkPersistence(
491                    DDMStructureLinkPersistence ddmStructureLinkPersistence) {
492                    this.ddmStructureLinkPersistence = ddmStructureLinkPersistence;
493            }
494    
495            /**
496             * Returns the d d m template local service.
497             *
498             * @return the d d m template local service
499             */
500            public DDMTemplateLocalService getDDMTemplateLocalService() {
501                    return ddmTemplateLocalService;
502            }
503    
504            /**
505             * Sets the d d m template local service.
506             *
507             * @param ddmTemplateLocalService the d d m template local service
508             */
509            public void setDDMTemplateLocalService(
510                    DDMTemplateLocalService ddmTemplateLocalService) {
511                    this.ddmTemplateLocalService = ddmTemplateLocalService;
512            }
513    
514            /**
515             * Returns the d d m template remote service.
516             *
517             * @return the d d m template remote service
518             */
519            public DDMTemplateService getDDMTemplateService() {
520                    return ddmTemplateService;
521            }
522    
523            /**
524             * Sets the d d m template remote service.
525             *
526             * @param ddmTemplateService the d d m template remote service
527             */
528            public void setDDMTemplateService(DDMTemplateService ddmTemplateService) {
529                    this.ddmTemplateService = ddmTemplateService;
530            }
531    
532            /**
533             * Returns the d d m template persistence.
534             *
535             * @return the d d m template persistence
536             */
537            public DDMTemplatePersistence getDDMTemplatePersistence() {
538                    return ddmTemplatePersistence;
539            }
540    
541            /**
542             * Sets the d d m template persistence.
543             *
544             * @param ddmTemplatePersistence the d d m template persistence
545             */
546            public void setDDMTemplatePersistence(
547                    DDMTemplatePersistence ddmTemplatePersistence) {
548                    this.ddmTemplatePersistence = ddmTemplatePersistence;
549            }
550    
551            /**
552             * Returns the d d m template finder.
553             *
554             * @return the d d m template finder
555             */
556            public DDMTemplateFinder getDDMTemplateFinder() {
557                    return ddmTemplateFinder;
558            }
559    
560            /**
561             * Sets the d d m template finder.
562             *
563             * @param ddmTemplateFinder the d d m template finder
564             */
565            public void setDDMTemplateFinder(DDMTemplateFinder ddmTemplateFinder) {
566                    this.ddmTemplateFinder = ddmTemplateFinder;
567            }
568    
569            /**
570             * Returns the counter local service.
571             *
572             * @return the counter local service
573             */
574            public CounterLocalService getCounterLocalService() {
575                    return counterLocalService;
576            }
577    
578            /**
579             * Sets the counter local service.
580             *
581             * @param counterLocalService the counter local service
582             */
583            public void setCounterLocalService(CounterLocalService counterLocalService) {
584                    this.counterLocalService = counterLocalService;
585            }
586    
587            /**
588             * Returns the resource local service.
589             *
590             * @return the resource local service
591             */
592            public ResourceLocalService getResourceLocalService() {
593                    return resourceLocalService;
594            }
595    
596            /**
597             * Sets the resource local service.
598             *
599             * @param resourceLocalService the resource local service
600             */
601            public void setResourceLocalService(
602                    ResourceLocalService resourceLocalService) {
603                    this.resourceLocalService = resourceLocalService;
604            }
605    
606            /**
607             * Returns the resource remote service.
608             *
609             * @return the resource remote service
610             */
611            public ResourceService getResourceService() {
612                    return resourceService;
613            }
614    
615            /**
616             * Sets the resource remote service.
617             *
618             * @param resourceService the resource remote service
619             */
620            public void setResourceService(ResourceService resourceService) {
621                    this.resourceService = resourceService;
622            }
623    
624            /**
625             * Returns the resource persistence.
626             *
627             * @return the resource persistence
628             */
629            public ResourcePersistence getResourcePersistence() {
630                    return resourcePersistence;
631            }
632    
633            /**
634             * Sets the resource persistence.
635             *
636             * @param resourcePersistence the resource persistence
637             */
638            public void setResourcePersistence(ResourcePersistence resourcePersistence) {
639                    this.resourcePersistence = resourcePersistence;
640            }
641    
642            /**
643             * Returns the resource finder.
644             *
645             * @return the resource finder
646             */
647            public ResourceFinder getResourceFinder() {
648                    return resourceFinder;
649            }
650    
651            /**
652             * Sets the resource finder.
653             *
654             * @param resourceFinder the resource finder
655             */
656            public void setResourceFinder(ResourceFinder resourceFinder) {
657                    this.resourceFinder = resourceFinder;
658            }
659    
660            /**
661             * Returns the user local service.
662             *
663             * @return the user local service
664             */
665            public UserLocalService getUserLocalService() {
666                    return userLocalService;
667            }
668    
669            /**
670             * Sets the user local service.
671             *
672             * @param userLocalService the user local service
673             */
674            public void setUserLocalService(UserLocalService userLocalService) {
675                    this.userLocalService = userLocalService;
676            }
677    
678            /**
679             * Returns the user remote service.
680             *
681             * @return the user remote service
682             */
683            public UserService getUserService() {
684                    return userService;
685            }
686    
687            /**
688             * Sets the user remote service.
689             *
690             * @param userService the user remote service
691             */
692            public void setUserService(UserService userService) {
693                    this.userService = userService;
694            }
695    
696            /**
697             * Returns the user persistence.
698             *
699             * @return the user persistence
700             */
701            public UserPersistence getUserPersistence() {
702                    return userPersistence;
703            }
704    
705            /**
706             * Sets the user persistence.
707             *
708             * @param userPersistence the user persistence
709             */
710            public void setUserPersistence(UserPersistence userPersistence) {
711                    this.userPersistence = userPersistence;
712            }
713    
714            /**
715             * Returns the user finder.
716             *
717             * @return the user finder
718             */
719            public UserFinder getUserFinder() {
720                    return userFinder;
721            }
722    
723            /**
724             * Sets the user finder.
725             *
726             * @param userFinder the user finder
727             */
728            public void setUserFinder(UserFinder userFinder) {
729                    this.userFinder = userFinder;
730            }
731    
732            /**
733             * Returns the document library file entry type local service.
734             *
735             * @return the document library file entry type local service
736             */
737            public DLFileEntryTypeLocalService getDLFileEntryTypeLocalService() {
738                    return dlFileEntryTypeLocalService;
739            }
740    
741            /**
742             * Sets the document library file entry type local service.
743             *
744             * @param dlFileEntryTypeLocalService the document library file entry type local service
745             */
746            public void setDLFileEntryTypeLocalService(
747                    DLFileEntryTypeLocalService dlFileEntryTypeLocalService) {
748                    this.dlFileEntryTypeLocalService = dlFileEntryTypeLocalService;
749            }
750    
751            /**
752             * Returns the document library file entry type remote service.
753             *
754             * @return the document library file entry type remote service
755             */
756            public DLFileEntryTypeService getDLFileEntryTypeService() {
757                    return dlFileEntryTypeService;
758            }
759    
760            /**
761             * Sets the document library file entry type remote service.
762             *
763             * @param dlFileEntryTypeService the document library file entry type remote service
764             */
765            public void setDLFileEntryTypeService(
766                    DLFileEntryTypeService dlFileEntryTypeService) {
767                    this.dlFileEntryTypeService = dlFileEntryTypeService;
768            }
769    
770            /**
771             * Returns the document library file entry type persistence.
772             *
773             * @return the document library file entry type persistence
774             */
775            public DLFileEntryTypePersistence getDLFileEntryTypePersistence() {
776                    return dlFileEntryTypePersistence;
777            }
778    
779            /**
780             * Sets the document library file entry type persistence.
781             *
782             * @param dlFileEntryTypePersistence the document library file entry type persistence
783             */
784            public void setDLFileEntryTypePersistence(
785                    DLFileEntryTypePersistence dlFileEntryTypePersistence) {
786                    this.dlFileEntryTypePersistence = dlFileEntryTypePersistence;
787            }
788    
789            /**
790             * Returns the document library file entry type finder.
791             *
792             * @return the document library file entry type finder
793             */
794            public DLFileEntryTypeFinder getDLFileEntryTypeFinder() {
795                    return dlFileEntryTypeFinder;
796            }
797    
798            /**
799             * Sets the document library file entry type finder.
800             *
801             * @param dlFileEntryTypeFinder the document library file entry type finder
802             */
803            public void setDLFileEntryTypeFinder(
804                    DLFileEntryTypeFinder dlFileEntryTypeFinder) {
805                    this.dlFileEntryTypeFinder = dlFileEntryTypeFinder;
806            }
807    
808            public void afterPropertiesSet() {
809                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.dynamicdatamapping.model.DDMStructure",
810                            ddmStructureLocalService);
811            }
812    
813            public void destroy() {
814                    persistedModelLocalServiceRegistry.unregister(
815                            "com.liferay.portlet.dynamicdatamapping.model.DDMStructure");
816            }
817    
818            /**
819             * Returns the Spring bean ID for this bean.
820             *
821             * @return the Spring bean ID for this bean
822             */
823            public String getBeanIdentifier() {
824                    return _beanIdentifier;
825            }
826    
827            /**
828             * Sets the Spring bean ID for this bean.
829             *
830             * @param beanIdentifier the Spring bean ID for this bean
831             */
832            public void setBeanIdentifier(String beanIdentifier) {
833                    _beanIdentifier = beanIdentifier;
834            }
835    
836            protected Class<?> getModelClass() {
837                    return DDMStructure.class;
838            }
839    
840            protected String getModelClassName() {
841                    return DDMStructure.class.getName();
842            }
843    
844            /**
845             * Performs an SQL query.
846             *
847             * @param sql the sql query
848             */
849            protected void runSQL(String sql) throws SystemException {
850                    try {
851                            DataSource dataSource = ddmStructurePersistence.getDataSource();
852    
853                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
854                                            sql, new int[0]);
855    
856                            sqlUpdate.update();
857                    }
858                    catch (Exception e) {
859                            throw new SystemException(e);
860                    }
861            }
862    
863            @BeanReference(type = DDMContentLocalService.class)
864            protected DDMContentLocalService ddmContentLocalService;
865            @BeanReference(type = DDMContentPersistence.class)
866            protected DDMContentPersistence ddmContentPersistence;
867            @BeanReference(type = DDMStorageLinkLocalService.class)
868            protected DDMStorageLinkLocalService ddmStorageLinkLocalService;
869            @BeanReference(type = DDMStorageLinkPersistence.class)
870            protected DDMStorageLinkPersistence ddmStorageLinkPersistence;
871            @BeanReference(type = DDMStructureLocalService.class)
872            protected DDMStructureLocalService ddmStructureLocalService;
873            @BeanReference(type = DDMStructureService.class)
874            protected DDMStructureService ddmStructureService;
875            @BeanReference(type = DDMStructurePersistence.class)
876            protected DDMStructurePersistence ddmStructurePersistence;
877            @BeanReference(type = DDMStructureFinder.class)
878            protected DDMStructureFinder ddmStructureFinder;
879            @BeanReference(type = DDMStructureLinkLocalService.class)
880            protected DDMStructureLinkLocalService ddmStructureLinkLocalService;
881            @BeanReference(type = DDMStructureLinkPersistence.class)
882            protected DDMStructureLinkPersistence ddmStructureLinkPersistence;
883            @BeanReference(type = DDMTemplateLocalService.class)
884            protected DDMTemplateLocalService ddmTemplateLocalService;
885            @BeanReference(type = DDMTemplateService.class)
886            protected DDMTemplateService ddmTemplateService;
887            @BeanReference(type = DDMTemplatePersistence.class)
888            protected DDMTemplatePersistence ddmTemplatePersistence;
889            @BeanReference(type = DDMTemplateFinder.class)
890            protected DDMTemplateFinder ddmTemplateFinder;
891            @BeanReference(type = CounterLocalService.class)
892            protected CounterLocalService counterLocalService;
893            @BeanReference(type = ResourceLocalService.class)
894            protected ResourceLocalService resourceLocalService;
895            @BeanReference(type = ResourceService.class)
896            protected ResourceService resourceService;
897            @BeanReference(type = ResourcePersistence.class)
898            protected ResourcePersistence resourcePersistence;
899            @BeanReference(type = ResourceFinder.class)
900            protected ResourceFinder resourceFinder;
901            @BeanReference(type = UserLocalService.class)
902            protected UserLocalService userLocalService;
903            @BeanReference(type = UserService.class)
904            protected UserService userService;
905            @BeanReference(type = UserPersistence.class)
906            protected UserPersistence userPersistence;
907            @BeanReference(type = UserFinder.class)
908            protected UserFinder userFinder;
909            @BeanReference(type = DLFileEntryTypeLocalService.class)
910            protected DLFileEntryTypeLocalService dlFileEntryTypeLocalService;
911            @BeanReference(type = DLFileEntryTypeService.class)
912            protected DLFileEntryTypeService dlFileEntryTypeService;
913            @BeanReference(type = DLFileEntryTypePersistence.class)
914            protected DLFileEntryTypePersistence dlFileEntryTypePersistence;
915            @BeanReference(type = DLFileEntryTypeFinder.class)
916            protected DLFileEntryTypeFinder dlFileEntryTypeFinder;
917            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
918            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
919            private String _beanIdentifier;
920    }