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