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.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 matching the UUID and group.
240             *
241             * @param uuid the d d m structure's UUID
242             * @param groupId the primary key of the group
243             * @return the matching d d m structure
244             * @throws PortalException if a matching d d m structure 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             * @throws SystemException if a system exception occurred
294             */
295            public void addDLFileEntryTypeDDMStructure(long fileEntryTypeId,
296                    long structureId) throws SystemException {
297                    dlFileEntryTypePersistence.addDDMStructure(fileEntryTypeId, structureId);
298            }
299    
300            /**
301             * @throws SystemException if a system exception occurred
302             */
303            public void addDLFileEntryTypeDDMStructure(long fileEntryTypeId,
304                    DDMStructure ddmStructure) throws SystemException {
305                    dlFileEntryTypePersistence.addDDMStructure(fileEntryTypeId, ddmStructure);
306            }
307    
308            /**
309             * @throws SystemException if a system exception occurred
310             */
311            public void addDLFileEntryTypeDDMStructures(long fileEntryTypeId,
312                    long[] structureIds) throws SystemException {
313                    dlFileEntryTypePersistence.addDDMStructures(fileEntryTypeId,
314                            structureIds);
315            }
316    
317            /**
318             * @throws SystemException if a system exception occurred
319             */
320            public void addDLFileEntryTypeDDMStructures(long fileEntryTypeId,
321                    List<DDMStructure> DDMStructures) throws SystemException {
322                    dlFileEntryTypePersistence.addDDMStructures(fileEntryTypeId,
323                            DDMStructures);
324            }
325    
326            /**
327             * @throws SystemException if a system exception occurred
328             */
329            public void clearDLFileEntryTypeDDMStructures(long fileEntryTypeId)
330                    throws SystemException {
331                    dlFileEntryTypePersistence.clearDDMStructures(fileEntryTypeId);
332            }
333    
334            /**
335             * @throws SystemException if a system exception occurred
336             */
337            public void deleteDLFileEntryTypeDDMStructure(long fileEntryTypeId,
338                    long structureId) throws SystemException {
339                    dlFileEntryTypePersistence.removeDDMStructure(fileEntryTypeId,
340                            structureId);
341            }
342    
343            /**
344             * @throws SystemException if a system exception occurred
345             */
346            public void deleteDLFileEntryTypeDDMStructure(long fileEntryTypeId,
347                    DDMStructure ddmStructure) throws SystemException {
348                    dlFileEntryTypePersistence.removeDDMStructure(fileEntryTypeId,
349                            ddmStructure);
350            }
351    
352            /**
353             * @throws SystemException if a system exception occurred
354             */
355            public void deleteDLFileEntryTypeDDMStructures(long fileEntryTypeId,
356                    long[] structureIds) throws SystemException {
357                    dlFileEntryTypePersistence.removeDDMStructures(fileEntryTypeId,
358                            structureIds);
359            }
360    
361            /**
362             * @throws SystemException if a system exception occurred
363             */
364            public void deleteDLFileEntryTypeDDMStructures(long fileEntryTypeId,
365                    List<DDMStructure> DDMStructures) throws SystemException {
366                    dlFileEntryTypePersistence.removeDDMStructures(fileEntryTypeId,
367                            DDMStructures);
368            }
369    
370            /**
371             * @throws SystemException if a system exception occurred
372             */
373            public List<DDMStructure> getDLFileEntryTypeDDMStructures(
374                    long fileEntryTypeId) throws SystemException {
375                    return dlFileEntryTypePersistence.getDDMStructures(fileEntryTypeId);
376            }
377    
378            /**
379             * @throws SystemException if a system exception occurred
380             */
381            public List<DDMStructure> getDLFileEntryTypeDDMStructures(
382                    long fileEntryTypeId, int start, int end) throws SystemException {
383                    return dlFileEntryTypePersistence.getDDMStructures(fileEntryTypeId,
384                            start, end);
385            }
386    
387            /**
388             * @throws SystemException if a system exception occurred
389             */
390            public List<DDMStructure> getDLFileEntryTypeDDMStructures(
391                    long fileEntryTypeId, int start, int end,
392                    OrderByComparator orderByComparator) throws SystemException {
393                    return dlFileEntryTypePersistence.getDDMStructures(fileEntryTypeId,
394                            start, end, orderByComparator);
395            }
396    
397            /**
398             * @throws SystemException if a system exception occurred
399             */
400            public int getDLFileEntryTypeDDMStructuresCount(long fileEntryTypeId)
401                    throws SystemException {
402                    return dlFileEntryTypePersistence.getDDMStructuresSize(fileEntryTypeId);
403            }
404    
405            /**
406             * @throws SystemException if a system exception occurred
407             */
408            public boolean hasDLFileEntryTypeDDMStructure(long fileEntryTypeId,
409                    long structureId) throws SystemException {
410                    return dlFileEntryTypePersistence.containsDDMStructure(fileEntryTypeId,
411                            structureId);
412            }
413    
414            /**
415             * @throws SystemException if a system exception occurred
416             */
417            public boolean hasDLFileEntryTypeDDMStructures(long fileEntryTypeId)
418                    throws SystemException {
419                    return dlFileEntryTypePersistence.containsDDMStructures(fileEntryTypeId);
420            }
421    
422            /**
423             * @throws SystemException if a system exception occurred
424             */
425            public void setDLFileEntryTypeDDMStructures(long fileEntryTypeId,
426                    long[] structureIds) throws SystemException {
427                    dlFileEntryTypePersistence.setDDMStructures(fileEntryTypeId,
428                            structureIds);
429            }
430    
431            /**
432             * Returns the d d m content local service.
433             *
434             * @return the d d m content local service
435             */
436            public DDMContentLocalService getDDMContentLocalService() {
437                    return ddmContentLocalService;
438            }
439    
440            /**
441             * Sets the d d m content local service.
442             *
443             * @param ddmContentLocalService the d d m content local service
444             */
445            public void setDDMContentLocalService(
446                    DDMContentLocalService ddmContentLocalService) {
447                    this.ddmContentLocalService = ddmContentLocalService;
448            }
449    
450            /**
451             * Returns the d d m content persistence.
452             *
453             * @return the d d m content persistence
454             */
455            public DDMContentPersistence getDDMContentPersistence() {
456                    return ddmContentPersistence;
457            }
458    
459            /**
460             * Sets the d d m content persistence.
461             *
462             * @param ddmContentPersistence the d d m content persistence
463             */
464            public void setDDMContentPersistence(
465                    DDMContentPersistence ddmContentPersistence) {
466                    this.ddmContentPersistence = ddmContentPersistence;
467            }
468    
469            /**
470             * Returns the d d m storage link local service.
471             *
472             * @return the d d m storage link local service
473             */
474            public DDMStorageLinkLocalService getDDMStorageLinkLocalService() {
475                    return ddmStorageLinkLocalService;
476            }
477    
478            /**
479             * Sets the d d m storage link local service.
480             *
481             * @param ddmStorageLinkLocalService the d d m storage link local service
482             */
483            public void setDDMStorageLinkLocalService(
484                    DDMStorageLinkLocalService ddmStorageLinkLocalService) {
485                    this.ddmStorageLinkLocalService = ddmStorageLinkLocalService;
486            }
487    
488            /**
489             * Returns the d d m storage link persistence.
490             *
491             * @return the d d m storage link persistence
492             */
493            public DDMStorageLinkPersistence getDDMStorageLinkPersistence() {
494                    return ddmStorageLinkPersistence;
495            }
496    
497            /**
498             * Sets the d d m storage link persistence.
499             *
500             * @param ddmStorageLinkPersistence the d d m storage link persistence
501             */
502            public void setDDMStorageLinkPersistence(
503                    DDMStorageLinkPersistence ddmStorageLinkPersistence) {
504                    this.ddmStorageLinkPersistence = ddmStorageLinkPersistence;
505            }
506    
507            /**
508             * Returns the d d m structure local service.
509             *
510             * @return the d d m structure local service
511             */
512            public DDMStructureLocalService getDDMStructureLocalService() {
513                    return ddmStructureLocalService;
514            }
515    
516            /**
517             * Sets the d d m structure local service.
518             *
519             * @param ddmStructureLocalService the d d m structure local service
520             */
521            public void setDDMStructureLocalService(
522                    DDMStructureLocalService ddmStructureLocalService) {
523                    this.ddmStructureLocalService = ddmStructureLocalService;
524            }
525    
526            /**
527             * Returns the d d m structure remote service.
528             *
529             * @return the d d m structure remote service
530             */
531            public DDMStructureService getDDMStructureService() {
532                    return ddmStructureService;
533            }
534    
535            /**
536             * Sets the d d m structure remote service.
537             *
538             * @param ddmStructureService the d d m structure remote service
539             */
540            public void setDDMStructureService(DDMStructureService ddmStructureService) {
541                    this.ddmStructureService = ddmStructureService;
542            }
543    
544            /**
545             * Returns the d d m structure persistence.
546             *
547             * @return the d d m structure persistence
548             */
549            public DDMStructurePersistence getDDMStructurePersistence() {
550                    return ddmStructurePersistence;
551            }
552    
553            /**
554             * Sets the d d m structure persistence.
555             *
556             * @param ddmStructurePersistence the d d m structure persistence
557             */
558            public void setDDMStructurePersistence(
559                    DDMStructurePersistence ddmStructurePersistence) {
560                    this.ddmStructurePersistence = ddmStructurePersistence;
561            }
562    
563            /**
564             * Returns the d d m structure finder.
565             *
566             * @return the d d m structure finder
567             */
568            public DDMStructureFinder getDDMStructureFinder() {
569                    return ddmStructureFinder;
570            }
571    
572            /**
573             * Sets the d d m structure finder.
574             *
575             * @param ddmStructureFinder the d d m structure finder
576             */
577            public void setDDMStructureFinder(DDMStructureFinder ddmStructureFinder) {
578                    this.ddmStructureFinder = ddmStructureFinder;
579            }
580    
581            /**
582             * Returns the d d m structure link local service.
583             *
584             * @return the d d m structure link local service
585             */
586            public DDMStructureLinkLocalService getDDMStructureLinkLocalService() {
587                    return ddmStructureLinkLocalService;
588            }
589    
590            /**
591             * Sets the d d m structure link local service.
592             *
593             * @param ddmStructureLinkLocalService the d d m structure link local service
594             */
595            public void setDDMStructureLinkLocalService(
596                    DDMStructureLinkLocalService ddmStructureLinkLocalService) {
597                    this.ddmStructureLinkLocalService = ddmStructureLinkLocalService;
598            }
599    
600            /**
601             * Returns the d d m structure link persistence.
602             *
603             * @return the d d m structure link persistence
604             */
605            public DDMStructureLinkPersistence getDDMStructureLinkPersistence() {
606                    return ddmStructureLinkPersistence;
607            }
608    
609            /**
610             * Sets the d d m structure link persistence.
611             *
612             * @param ddmStructureLinkPersistence the d d m structure link persistence
613             */
614            public void setDDMStructureLinkPersistence(
615                    DDMStructureLinkPersistence ddmStructureLinkPersistence) {
616                    this.ddmStructureLinkPersistence = ddmStructureLinkPersistence;
617            }
618    
619            /**
620             * Returns the d d m template local service.
621             *
622             * @return the d d m template local service
623             */
624            public DDMTemplateLocalService getDDMTemplateLocalService() {
625                    return ddmTemplateLocalService;
626            }
627    
628            /**
629             * Sets the d d m template local service.
630             *
631             * @param ddmTemplateLocalService the d d m template local service
632             */
633            public void setDDMTemplateLocalService(
634                    DDMTemplateLocalService ddmTemplateLocalService) {
635                    this.ddmTemplateLocalService = ddmTemplateLocalService;
636            }
637    
638            /**
639             * Returns the d d m template remote service.
640             *
641             * @return the d d m template remote service
642             */
643            public DDMTemplateService getDDMTemplateService() {
644                    return ddmTemplateService;
645            }
646    
647            /**
648             * Sets the d d m template remote service.
649             *
650             * @param ddmTemplateService the d d m template remote service
651             */
652            public void setDDMTemplateService(DDMTemplateService ddmTemplateService) {
653                    this.ddmTemplateService = ddmTemplateService;
654            }
655    
656            /**
657             * Returns the d d m template persistence.
658             *
659             * @return the d d m template persistence
660             */
661            public DDMTemplatePersistence getDDMTemplatePersistence() {
662                    return ddmTemplatePersistence;
663            }
664    
665            /**
666             * Sets the d d m template persistence.
667             *
668             * @param ddmTemplatePersistence the d d m template persistence
669             */
670            public void setDDMTemplatePersistence(
671                    DDMTemplatePersistence ddmTemplatePersistence) {
672                    this.ddmTemplatePersistence = ddmTemplatePersistence;
673            }
674    
675            /**
676             * Returns the d d m template finder.
677             *
678             * @return the d d m template finder
679             */
680            public DDMTemplateFinder getDDMTemplateFinder() {
681                    return ddmTemplateFinder;
682            }
683    
684            /**
685             * Sets the d d m template finder.
686             *
687             * @param ddmTemplateFinder the d d m template finder
688             */
689            public void setDDMTemplateFinder(DDMTemplateFinder ddmTemplateFinder) {
690                    this.ddmTemplateFinder = ddmTemplateFinder;
691            }
692    
693            /**
694             * Returns the counter local service.
695             *
696             * @return the counter local service
697             */
698            public CounterLocalService getCounterLocalService() {
699                    return counterLocalService;
700            }
701    
702            /**
703             * Sets the counter local service.
704             *
705             * @param counterLocalService the counter local service
706             */
707            public void setCounterLocalService(CounterLocalService counterLocalService) {
708                    this.counterLocalService = counterLocalService;
709            }
710    
711            /**
712             * Returns the group local service.
713             *
714             * @return the group local service
715             */
716            public GroupLocalService getGroupLocalService() {
717                    return groupLocalService;
718            }
719    
720            /**
721             * Sets the group local service.
722             *
723             * @param groupLocalService the group local service
724             */
725            public void setGroupLocalService(GroupLocalService groupLocalService) {
726                    this.groupLocalService = groupLocalService;
727            }
728    
729            /**
730             * Returns the group remote service.
731             *
732             * @return the group remote service
733             */
734            public GroupService getGroupService() {
735                    return groupService;
736            }
737    
738            /**
739             * Sets the group remote service.
740             *
741             * @param groupService the group remote service
742             */
743            public void setGroupService(GroupService groupService) {
744                    this.groupService = groupService;
745            }
746    
747            /**
748             * Returns the group persistence.
749             *
750             * @return the group persistence
751             */
752            public GroupPersistence getGroupPersistence() {
753                    return groupPersistence;
754            }
755    
756            /**
757             * Sets the group persistence.
758             *
759             * @param groupPersistence the group persistence
760             */
761            public void setGroupPersistence(GroupPersistence groupPersistence) {
762                    this.groupPersistence = groupPersistence;
763            }
764    
765            /**
766             * Returns the group finder.
767             *
768             * @return the group finder
769             */
770            public GroupFinder getGroupFinder() {
771                    return groupFinder;
772            }
773    
774            /**
775             * Sets the group finder.
776             *
777             * @param groupFinder the group finder
778             */
779            public void setGroupFinder(GroupFinder groupFinder) {
780                    this.groupFinder = groupFinder;
781            }
782    
783            /**
784             * Returns the resource local service.
785             *
786             * @return the resource local service
787             */
788            public ResourceLocalService getResourceLocalService() {
789                    return resourceLocalService;
790            }
791    
792            /**
793             * Sets the resource local service.
794             *
795             * @param resourceLocalService the resource local service
796             */
797            public void setResourceLocalService(
798                    ResourceLocalService resourceLocalService) {
799                    this.resourceLocalService = resourceLocalService;
800            }
801    
802            /**
803             * Returns the user local service.
804             *
805             * @return the user local service
806             */
807            public UserLocalService getUserLocalService() {
808                    return userLocalService;
809            }
810    
811            /**
812             * Sets the user local service.
813             *
814             * @param userLocalService the user local service
815             */
816            public void setUserLocalService(UserLocalService userLocalService) {
817                    this.userLocalService = userLocalService;
818            }
819    
820            /**
821             * Returns the user remote service.
822             *
823             * @return the user remote service
824             */
825            public UserService getUserService() {
826                    return userService;
827            }
828    
829            /**
830             * Sets the user remote service.
831             *
832             * @param userService the user remote service
833             */
834            public void setUserService(UserService userService) {
835                    this.userService = userService;
836            }
837    
838            /**
839             * Returns the user persistence.
840             *
841             * @return the user persistence
842             */
843            public UserPersistence getUserPersistence() {
844                    return userPersistence;
845            }
846    
847            /**
848             * Sets the user persistence.
849             *
850             * @param userPersistence the user persistence
851             */
852            public void setUserPersistence(UserPersistence userPersistence) {
853                    this.userPersistence = userPersistence;
854            }
855    
856            /**
857             * Returns the user finder.
858             *
859             * @return the user finder
860             */
861            public UserFinder getUserFinder() {
862                    return userFinder;
863            }
864    
865            /**
866             * Sets the user finder.
867             *
868             * @param userFinder the user finder
869             */
870            public void setUserFinder(UserFinder userFinder) {
871                    this.userFinder = userFinder;
872            }
873    
874            /**
875             * Returns the document library file entry type local service.
876             *
877             * @return the document library file entry type local service
878             */
879            public DLFileEntryTypeLocalService getDLFileEntryTypeLocalService() {
880                    return dlFileEntryTypeLocalService;
881            }
882    
883            /**
884             * Sets the document library file entry type local service.
885             *
886             * @param dlFileEntryTypeLocalService the document library file entry type local service
887             */
888            public void setDLFileEntryTypeLocalService(
889                    DLFileEntryTypeLocalService dlFileEntryTypeLocalService) {
890                    this.dlFileEntryTypeLocalService = dlFileEntryTypeLocalService;
891            }
892    
893            /**
894             * Returns the document library file entry type remote service.
895             *
896             * @return the document library file entry type remote service
897             */
898            public DLFileEntryTypeService getDLFileEntryTypeService() {
899                    return dlFileEntryTypeService;
900            }
901    
902            /**
903             * Sets the document library file entry type remote service.
904             *
905             * @param dlFileEntryTypeService the document library file entry type remote service
906             */
907            public void setDLFileEntryTypeService(
908                    DLFileEntryTypeService dlFileEntryTypeService) {
909                    this.dlFileEntryTypeService = dlFileEntryTypeService;
910            }
911    
912            /**
913             * Returns the document library file entry type persistence.
914             *
915             * @return the document library file entry type persistence
916             */
917            public DLFileEntryTypePersistence getDLFileEntryTypePersistence() {
918                    return dlFileEntryTypePersistence;
919            }
920    
921            /**
922             * Sets the document library file entry type persistence.
923             *
924             * @param dlFileEntryTypePersistence the document library file entry type persistence
925             */
926            public void setDLFileEntryTypePersistence(
927                    DLFileEntryTypePersistence dlFileEntryTypePersistence) {
928                    this.dlFileEntryTypePersistence = dlFileEntryTypePersistence;
929            }
930    
931            /**
932             * Returns the document library file entry type finder.
933             *
934             * @return the document library file entry type finder
935             */
936            public DLFileEntryTypeFinder getDLFileEntryTypeFinder() {
937                    return dlFileEntryTypeFinder;
938            }
939    
940            /**
941             * Sets the document library file entry type finder.
942             *
943             * @param dlFileEntryTypeFinder the document library file entry type finder
944             */
945            public void setDLFileEntryTypeFinder(
946                    DLFileEntryTypeFinder dlFileEntryTypeFinder) {
947                    this.dlFileEntryTypeFinder = dlFileEntryTypeFinder;
948            }
949    
950            public void afterPropertiesSet() {
951                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.dynamicdatamapping.model.DDMStructure",
952                            ddmStructureLocalService);
953            }
954    
955            public void destroy() {
956                    persistedModelLocalServiceRegistry.unregister(
957                            "com.liferay.portlet.dynamicdatamapping.model.DDMStructure");
958            }
959    
960            /**
961             * Returns the Spring bean ID for this bean.
962             *
963             * @return the Spring bean ID for this bean
964             */
965            public String getBeanIdentifier() {
966                    return _beanIdentifier;
967            }
968    
969            /**
970             * Sets the Spring bean ID for this bean.
971             *
972             * @param beanIdentifier the Spring bean ID for this bean
973             */
974            public void setBeanIdentifier(String beanIdentifier) {
975                    _beanIdentifier = beanIdentifier;
976            }
977    
978            protected Class<?> getModelClass() {
979                    return DDMStructure.class;
980            }
981    
982            protected String getModelClassName() {
983                    return DDMStructure.class.getName();
984            }
985    
986            /**
987             * Performs an SQL query.
988             *
989             * @param sql the sql query
990             */
991            protected void runSQL(String sql) throws SystemException {
992                    try {
993                            DataSource dataSource = ddmStructurePersistence.getDataSource();
994    
995                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
996                                            sql, new int[0]);
997    
998                            sqlUpdate.update();
999                    }
1000                    catch (Exception e) {
1001                            throw new SystemException(e);
1002                    }
1003            }
1004    
1005            @BeanReference(type = DDMContentLocalService.class)
1006            protected DDMContentLocalService ddmContentLocalService;
1007            @BeanReference(type = DDMContentPersistence.class)
1008            protected DDMContentPersistence ddmContentPersistence;
1009            @BeanReference(type = DDMStorageLinkLocalService.class)
1010            protected DDMStorageLinkLocalService ddmStorageLinkLocalService;
1011            @BeanReference(type = DDMStorageLinkPersistence.class)
1012            protected DDMStorageLinkPersistence ddmStorageLinkPersistence;
1013            @BeanReference(type = DDMStructureLocalService.class)
1014            protected DDMStructureLocalService ddmStructureLocalService;
1015            @BeanReference(type = DDMStructureService.class)
1016            protected DDMStructureService ddmStructureService;
1017            @BeanReference(type = DDMStructurePersistence.class)
1018            protected DDMStructurePersistence ddmStructurePersistence;
1019            @BeanReference(type = DDMStructureFinder.class)
1020            protected DDMStructureFinder ddmStructureFinder;
1021            @BeanReference(type = DDMStructureLinkLocalService.class)
1022            protected DDMStructureLinkLocalService ddmStructureLinkLocalService;
1023            @BeanReference(type = DDMStructureLinkPersistence.class)
1024            protected DDMStructureLinkPersistence ddmStructureLinkPersistence;
1025            @BeanReference(type = DDMTemplateLocalService.class)
1026            protected DDMTemplateLocalService ddmTemplateLocalService;
1027            @BeanReference(type = DDMTemplateService.class)
1028            protected DDMTemplateService ddmTemplateService;
1029            @BeanReference(type = DDMTemplatePersistence.class)
1030            protected DDMTemplatePersistence ddmTemplatePersistence;
1031            @BeanReference(type = DDMTemplateFinder.class)
1032            protected DDMTemplateFinder ddmTemplateFinder;
1033            @BeanReference(type = CounterLocalService.class)
1034            protected CounterLocalService counterLocalService;
1035            @BeanReference(type = GroupLocalService.class)
1036            protected GroupLocalService groupLocalService;
1037            @BeanReference(type = GroupService.class)
1038            protected GroupService groupService;
1039            @BeanReference(type = GroupPersistence.class)
1040            protected GroupPersistence groupPersistence;
1041            @BeanReference(type = GroupFinder.class)
1042            protected GroupFinder groupFinder;
1043            @BeanReference(type = ResourceLocalService.class)
1044            protected ResourceLocalService resourceLocalService;
1045            @BeanReference(type = UserLocalService.class)
1046            protected UserLocalService userLocalService;
1047            @BeanReference(type = UserService.class)
1048            protected UserService userService;
1049            @BeanReference(type = UserPersistence.class)
1050            protected UserPersistence userPersistence;
1051            @BeanReference(type = UserFinder.class)
1052            protected UserFinder userFinder;
1053            @BeanReference(type = DLFileEntryTypeLocalService.class)
1054            protected DLFileEntryTypeLocalService dlFileEntryTypeLocalService;
1055            @BeanReference(type = DLFileEntryTypeService.class)
1056            protected DLFileEntryTypeService dlFileEntryTypeService;
1057            @BeanReference(type = DLFileEntryTypePersistence.class)
1058            protected DLFileEntryTypePersistence dlFileEntryTypePersistence;
1059            @BeanReference(type = DLFileEntryTypeFinder.class)
1060            protected DLFileEntryTypeFinder dlFileEntryTypeFinder;
1061            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1062            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1063            private String _beanIdentifier;
1064    }