001    /**
002     * Copyright (c) 2000-present 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;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for DDMStructure. This utility wraps
024     * {@link com.liferay.portlet.dynamicdatamapping.service.impl.DDMStructureLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see DDMStructureLocalService
032     * @see com.liferay.portlet.dynamicdatamapping.service.base.DDMStructureLocalServiceBaseImpl
033     * @see com.liferay.portlet.dynamicdatamapping.service.impl.DDMStructureLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class DDMStructureLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.dynamicdatamapping.service.impl.DDMStructureLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the d d m structure to the database. Also notifies the appropriate model listeners.
046            *
047            * @param ddmStructure the d d m structure
048            * @return the d d m structure that was added
049            */
050            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure addDDMStructure(
051                    com.liferay.portlet.dynamicdatamapping.model.DDMStructure ddmStructure) {
052                    return getService().addDDMStructure(ddmStructure);
053            }
054    
055            public static void addDLFileEntryTypeDDMStructure(long fileEntryTypeId,
056                    com.liferay.portlet.dynamicdatamapping.model.DDMStructure ddmStructure) {
057                    getService()
058                            .addDLFileEntryTypeDDMStructure(fileEntryTypeId, ddmStructure);
059            }
060    
061            public static void addDLFileEntryTypeDDMStructure(long fileEntryTypeId,
062                    long structureId) {
063                    getService().addDLFileEntryTypeDDMStructure(fileEntryTypeId, structureId);
064            }
065    
066            public static void addDLFileEntryTypeDDMStructures(long fileEntryTypeId,
067                    java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> DDMStructures) {
068                    getService()
069                            .addDLFileEntryTypeDDMStructures(fileEntryTypeId, DDMStructures);
070            }
071    
072            public static void addDLFileEntryTypeDDMStructures(long fileEntryTypeId,
073                    long[] structureIds) {
074                    getService()
075                            .addDLFileEntryTypeDDMStructures(fileEntryTypeId, structureIds);
076            }
077    
078            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure addStructure(
079                    long userId, long groupId, long classNameId,
080                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
081                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
082                    com.liferay.portlet.dynamicdatamapping.model.DDMForm ddmForm,
083                    com.liferay.portlet.dynamicdatamapping.model.DDMFormLayout ddmFormLayout,
084                    com.liferay.portal.service.ServiceContext serviceContext)
085                    throws com.liferay.portal.kernel.exception.PortalException {
086                    return getService()
087                                       .addStructure(userId, groupId, classNameId, nameMap,
088                            descriptionMap, ddmForm, ddmFormLayout, serviceContext);
089            }
090    
091            /**
092            * Adds a structure referencing a default parent structure, using the portal
093            * property <code>dynamic.data.lists.storage.type</code> storage type and
094            * default structure type.
095            *
096            * @param userId the primary key of the structure's creator/owner
097            * @param groupId the primary key of the group
098            * @param classNameId the primary key of the class name for the
099            structure's related model
100            * @param nameMap the structure's locales and localized names
101            * @param descriptionMap the structure's locales and localized
102            descriptions
103            * @param definition the structure's XML schema definition
104            * @param serviceContext the service context to be applied. Can set the
105            UUID, creation date, modification date, guest permissions,
106            and group permissions for the structure.
107            * @return the structure
108            * @throws PortalException if a user with the primary key could not be
109            found, if the XSD was not well-formed, or if a portal
110            exception occurred
111            * @deprecated As of 7.0.0, replaced by {@link #addStructure(long, long,
112            long, Map, Map, DDMForm, DDMFormLayout, ServiceContext)}
113            */
114            @Deprecated
115            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure addStructure(
116                    long userId, long groupId, long classNameId,
117                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
118                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
119                    java.lang.String definition,
120                    com.liferay.portal.service.ServiceContext serviceContext)
121                    throws com.liferay.portal.kernel.exception.PortalException {
122                    return getService()
123                                       .addStructure(userId, groupId, classNameId, nameMap,
124                            descriptionMap, definition, serviceContext);
125            }
126    
127            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure addStructure(
128                    long userId, long groupId, long parentStructureId, long classNameId,
129                    java.lang.String structureKey,
130                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
131                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
132                    com.liferay.portlet.dynamicdatamapping.model.DDMForm ddmForm,
133                    com.liferay.portlet.dynamicdatamapping.model.DDMFormLayout ddmFormLayout,
134                    java.lang.String storageType, int type,
135                    com.liferay.portal.service.ServiceContext serviceContext)
136                    throws com.liferay.portal.kernel.exception.PortalException {
137                    return getService()
138                                       .addStructure(userId, groupId, parentStructureId,
139                            classNameId, structureKey, nameMap, descriptionMap, ddmForm,
140                            ddmFormLayout, storageType, type, serviceContext);
141            }
142    
143            /**
144            * Adds a structure referencing its parent structure.
145            *
146            * @param userId the primary key of the structure's creator/owner
147            * @param groupId the primary key of the group
148            * @param parentStructureId the primary key of the parent structure
149            (optionally {@link
150            com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants#DEFAULT_PARENT_STRUCTURE_ID})
151            * @param classNameId the primary key of the class name for the
152            structure's related model
153            * @param structureKey the unique string identifying the structure
154            (optionally <code>null</code>)
155            * @param nameMap the structure's locales and localized names
156            * @param descriptionMap the structure's locales and localized
157            descriptions
158            * @param definition the structure's XML schema definition
159            * @param storageType the structure's storage type. It can be "xml" or
160            "expando". For more information, see {@link
161            com.liferay.portlet.dynamicdatamapping.storage.StorageType}.
162            * @param type the structure's type. For more information, see {@link
163            com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}.
164            * @param serviceContext the service context to be applied. Can set the
165            UUID, creation date, modification date, guest permissions,
166            and group permissions for the structure.
167            * @return the structure
168            * @throws PortalException if a user with the primary key could not be
169            found, if the XSD was not well-formed, or if a portal
170            exception occurred
171            * @deprecated As of 7.0.0, replaced by {@link #addStructure(long, long,
172            long, long, String, Map, Map, DDMForm, DDMFormLayout, String,
173            int, ServiceContext)}
174            */
175            @Deprecated
176            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure addStructure(
177                    long userId, long groupId, long parentStructureId, long classNameId,
178                    java.lang.String structureKey,
179                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
180                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
181                    java.lang.String definition, java.lang.String storageType, int type,
182                    com.liferay.portal.service.ServiceContext serviceContext)
183                    throws com.liferay.portal.kernel.exception.PortalException {
184                    return getService()
185                                       .addStructure(userId, groupId, parentStructureId,
186                            classNameId, structureKey, nameMap, descriptionMap, definition,
187                            storageType, type, serviceContext);
188            }
189    
190            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure addStructure(
191                    long userId, long groupId, java.lang.String parentStructureKey,
192                    long classNameId, java.lang.String structureKey,
193                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
194                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
195                    com.liferay.portlet.dynamicdatamapping.model.DDMForm ddmForm,
196                    com.liferay.portlet.dynamicdatamapping.model.DDMFormLayout ddmFormLayout,
197                    java.lang.String storageType, int type,
198                    com.liferay.portal.service.ServiceContext serviceContext)
199                    throws com.liferay.portal.kernel.exception.PortalException {
200                    return getService()
201                                       .addStructure(userId, groupId, parentStructureKey,
202                            classNameId, structureKey, nameMap, descriptionMap, ddmForm,
203                            ddmFormLayout, storageType, type, serviceContext);
204            }
205    
206            /**
207            * Adds a structure referencing a default parent structure if the parent
208            * structure is not found.
209            *
210            * @param userId the primary key of the structure's creator/owner
211            * @param groupId the primary key of the group
212            * @param parentStructureKey the unique string identifying the parent
213            structure (optionally <code>null</code>)
214            * @param classNameId the primary key of the class name for the
215            structure's related model
216            * @param structureKey the unique string identifying the structure
217            (optionally <code>null</code>)
218            * @param nameMap the structure's locales and localized names
219            * @param descriptionMap the structure's locales and localized
220            descriptions
221            * @param definition the structure's XML schema definition
222            * @param storageType the structure's storage type. It can be "xml" or
223            "expando". For more information, see {@link
224            com.liferay.portlet.dynamicdatamapping.storage.StorageType}.
225            * @param type the structure's type. For more information, see {@link
226            com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}.
227            * @param serviceContext the service context to be applied. Can set the
228            UUID, creation date, modification date, guest permissions and
229            group permissions for the structure.
230            * @return the structure
231            * @throws PortalException if a user with the primary key could not be
232            found, if the XSD was not well-formed, or if a portal
233            exception occurred
234            * @deprecated As of 7.0.0, replaced by {@link #addStructure(long, long,
235            String, long, String, Map, Map, DDMForm, DDMFormLayout,
236            String, int, ServiceContext)}
237            */
238            @Deprecated
239            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure addStructure(
240                    long userId, long groupId, java.lang.String parentStructureKey,
241                    long classNameId, java.lang.String structureKey,
242                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
243                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
244                    java.lang.String definition, java.lang.String storageType, int type,
245                    com.liferay.portal.service.ServiceContext serviceContext)
246                    throws com.liferay.portal.kernel.exception.PortalException {
247                    return getService()
248                                       .addStructure(userId, groupId, parentStructureKey,
249                            classNameId, structureKey, nameMap, descriptionMap, definition,
250                            storageType, type, serviceContext);
251            }
252    
253            /**
254            * Adds the resources to the structure.
255            *
256            * @param structure the structure to add resources to
257            * @param addGroupPermissions whether to add group permissions
258            * @param addGuestPermissions whether to add guest permissions
259            * @throws PortalException if a portal exception occurred
260            */
261            public static void addStructureResources(
262                    com.liferay.portlet.dynamicdatamapping.model.DDMStructure structure,
263                    boolean addGroupPermissions, boolean addGuestPermissions)
264                    throws com.liferay.portal.kernel.exception.PortalException {
265                    getService()
266                            .addStructureResources(structure, addGroupPermissions,
267                            addGuestPermissions);
268            }
269    
270            /**
271            * Adds the model resources with the permissions to the structure.
272            *
273            * @param structure the structure to add resources to
274            * @param groupPermissions the group permissions to be added
275            * @param guestPermissions the guest permissions to be added
276            * @throws PortalException if a portal exception occurred
277            */
278            public static void addStructureResources(
279                    com.liferay.portlet.dynamicdatamapping.model.DDMStructure structure,
280                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
281                    throws com.liferay.portal.kernel.exception.PortalException {
282                    getService()
283                            .addStructureResources(structure, groupPermissions, guestPermissions);
284            }
285    
286            public static void clearDLFileEntryTypeDDMStructures(long fileEntryTypeId) {
287                    getService().clearDLFileEntryTypeDDMStructures(fileEntryTypeId);
288            }
289    
290            /**
291            * Copies a structure, creating a new structure with all the values
292            * extracted from the original one. The new structure supports a new name
293            * and description.
294            *
295            * @param userId the primary key of the structure's creator/owner
296            * @param structureId the primary key of the structure to be copied
297            * @param nameMap the new structure's locales and localized names
298            * @param descriptionMap the new structure's locales and localized
299            descriptions
300            * @param serviceContext the service context to be applied. Can set the
301            UUID, creation date, modification date, guest permissions, and
302            group permissions for the structure.
303            * @return the new structure
304            * @throws PortalException if a portal exception occurred
305            */
306            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure copyStructure(
307                    long userId, long structureId,
308                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
309                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
310                    com.liferay.portal.service.ServiceContext serviceContext)
311                    throws com.liferay.portal.kernel.exception.PortalException {
312                    return getService()
313                                       .copyStructure(userId, structureId, nameMap, descriptionMap,
314                            serviceContext);
315            }
316    
317            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure copyStructure(
318                    long userId, long structureId,
319                    com.liferay.portal.service.ServiceContext serviceContext)
320                    throws com.liferay.portal.kernel.exception.PortalException {
321                    return getService().copyStructure(userId, structureId, serviceContext);
322            }
323    
324            /**
325            * Creates a new d d m structure with the primary key. Does not add the d d m structure to the database.
326            *
327            * @param structureId the primary key for the new d d m structure
328            * @return the new d d m structure
329            */
330            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure createDDMStructure(
331                    long structureId) {
332                    return getService().createDDMStructure(structureId);
333            }
334    
335            /**
336            * Deletes the d d m structure from the database. Also notifies the appropriate model listeners.
337            *
338            * @param ddmStructure the d d m structure
339            * @return the d d m structure that was removed
340            */
341            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure deleteDDMStructure(
342                    com.liferay.portlet.dynamicdatamapping.model.DDMStructure ddmStructure) {
343                    return getService().deleteDDMStructure(ddmStructure);
344            }
345    
346            /**
347            * Deletes the d d m structure with the primary key from the database. Also notifies the appropriate model listeners.
348            *
349            * @param structureId the primary key of the d d m structure
350            * @return the d d m structure that was removed
351            * @throws PortalException if a d d m structure with the primary key could not be found
352            */
353            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure deleteDDMStructure(
354                    long structureId)
355                    throws com.liferay.portal.kernel.exception.PortalException {
356                    return getService().deleteDDMStructure(structureId);
357            }
358    
359            public static void deleteDLFileEntryTypeDDMStructure(long fileEntryTypeId,
360                    com.liferay.portlet.dynamicdatamapping.model.DDMStructure ddmStructure) {
361                    getService()
362                            .deleteDLFileEntryTypeDDMStructure(fileEntryTypeId, ddmStructure);
363            }
364    
365            public static void deleteDLFileEntryTypeDDMStructure(long fileEntryTypeId,
366                    long structureId) {
367                    getService()
368                            .deleteDLFileEntryTypeDDMStructure(fileEntryTypeId, structureId);
369            }
370    
371            public static void deleteDLFileEntryTypeDDMStructures(
372                    long fileEntryTypeId,
373                    java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> DDMStructures) {
374                    getService()
375                            .deleteDLFileEntryTypeDDMStructures(fileEntryTypeId, DDMStructures);
376            }
377    
378            public static void deleteDLFileEntryTypeDDMStructures(
379                    long fileEntryTypeId, long[] structureIds) {
380                    getService()
381                            .deleteDLFileEntryTypeDDMStructures(fileEntryTypeId, structureIds);
382            }
383    
384            /**
385            * @throws PortalException
386            */
387            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
388                    com.liferay.portal.model.PersistedModel persistedModel)
389                    throws com.liferay.portal.kernel.exception.PortalException {
390                    return getService().deletePersistedModel(persistedModel);
391            }
392    
393            /**
394            * Deletes the matching structure and its resources.
395            *
396            * <p>
397            * Before deleting the structure, the system verifies whether the structure
398            * is required by another entity. If it is needed, an exception is thrown.
399            * </p>
400            *
401            * @param groupId the primary key of the group
402            * @param classNameId the primary key of the class name for the structure's
403            related model
404            * @param structureKey the unique string identifying the structure
405            * @throws PortalException if a portal exception occurred
406            */
407            public static void deleteStructure(long groupId, long classNameId,
408                    java.lang.String structureKey)
409                    throws com.liferay.portal.kernel.exception.PortalException {
410                    getService().deleteStructure(groupId, classNameId, structureKey);
411            }
412    
413            /**
414            * Deletes the structure and its resources.
415            *
416            * <p>
417            * Before deleting the structure, this method verifies whether the structure
418            * is required by another entity. If it is needed, an exception is thrown.
419            * </p>
420            *
421            * @param structure the structure to be deleted
422            * @throws PortalException if a portal exception occurred
423            */
424            public static void deleteStructure(
425                    com.liferay.portlet.dynamicdatamapping.model.DDMStructure structure)
426                    throws com.liferay.portal.kernel.exception.PortalException {
427                    getService().deleteStructure(structure);
428            }
429    
430            /**
431            * Deletes the structure and its resources.
432            *
433            * <p>
434            * Before deleting the structure, the system verifies whether the structure
435            * is required by another entity. If it is needed, an exception is thrown.
436            * </p>
437            *
438            * @param structureId the primary key of the structure to be deleted
439            * @throws PortalException if a portal exception occurred
440            */
441            public static void deleteStructure(long structureId)
442                    throws com.liferay.portal.kernel.exception.PortalException {
443                    getService().deleteStructure(structureId);
444            }
445    
446            /**
447            * Deletes all the structures of the group.
448            *
449            * <p>
450            * Before deleting the structures, the system verifies whether each
451            * structure is required by another entity. If any of the structures are
452            * needed, an exception is thrown.
453            * </p>
454            *
455            * @param groupId the primary key of the group
456            * @throws PortalException if a portal exception occurred
457            */
458            public static void deleteStructures(long groupId)
459                    throws com.liferay.portal.kernel.exception.PortalException {
460                    getService().deleteStructures(groupId);
461            }
462    
463            public static void deleteStructures(long groupId, long classNameId)
464                    throws com.liferay.portal.kernel.exception.PortalException {
465                    getService().deleteStructures(groupId, classNameId);
466            }
467    
468            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
469                    return getService().dynamicQuery();
470            }
471    
472            /**
473            * Performs a dynamic query on the database and returns the matching rows.
474            *
475            * @param dynamicQuery the dynamic query
476            * @return the matching rows
477            */
478            public static <T> java.util.List<T> dynamicQuery(
479                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
480                    return getService().dynamicQuery(dynamicQuery);
481            }
482    
483            /**
484            * Performs a dynamic query on the database and returns a range of the matching rows.
485            *
486            * <p>
487            * 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.
488            * </p>
489            *
490            * @param dynamicQuery the dynamic query
491            * @param start the lower bound of the range of model instances
492            * @param end the upper bound of the range of model instances (not inclusive)
493            * @return the range of matching rows
494            */
495            public static <T> java.util.List<T> dynamicQuery(
496                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
497                    int end) {
498                    return getService().dynamicQuery(dynamicQuery, start, end);
499            }
500    
501            /**
502            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
503            *
504            * <p>
505            * 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.
506            * </p>
507            *
508            * @param dynamicQuery the dynamic query
509            * @param start the lower bound of the range of model instances
510            * @param end the upper bound of the range of model instances (not inclusive)
511            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
512            * @return the ordered range of matching rows
513            */
514            public static <T> java.util.List<T> dynamicQuery(
515                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
516                    int end,
517                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
518                    return getService()
519                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
520            }
521    
522            /**
523            * Returns the number of rows matching the dynamic query.
524            *
525            * @param dynamicQuery the dynamic query
526            * @return the number of rows matching the dynamic query
527            */
528            public static long dynamicQueryCount(
529                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
530                    return getService().dynamicQueryCount(dynamicQuery);
531            }
532    
533            /**
534            * Returns the number of rows matching the dynamic query.
535            *
536            * @param dynamicQuery the dynamic query
537            * @param projection the projection to apply to the query
538            * @return the number of rows matching the dynamic query
539            */
540            public static long dynamicQueryCount(
541                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
542                    com.liferay.portal.kernel.dao.orm.Projection projection) {
543                    return getService().dynamicQueryCount(dynamicQuery, projection);
544            }
545    
546            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure fetchDDMStructure(
547                    long structureId) {
548                    return getService().fetchDDMStructure(structureId);
549            }
550    
551            /**
552            * Returns the d d m structure matching the UUID and group.
553            *
554            * @param uuid the d d m structure's UUID
555            * @param groupId the primary key of the group
556            * @return the matching d d m structure, or <code>null</code> if a matching d d m structure could not be found
557            */
558            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure fetchDDMStructureByUuidAndGroupId(
559                    java.lang.String uuid, long groupId) {
560                    return getService().fetchDDMStructureByUuidAndGroupId(uuid, groupId);
561            }
562    
563            /**
564            * Returns the structure matching the class name ID, structure key, and
565            * group.
566            *
567            * @param groupId the primary key of the group
568            * @param classNameId the primary key of the class name for the structure's
569            related model
570            * @param structureKey the unique string identifying the structure
571            * @return the matching structure, or <code>null</code> if a matching
572            structure could not be found
573            */
574            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure fetchStructure(
575                    long groupId, long classNameId, java.lang.String structureKey) {
576                    return getService().fetchStructure(groupId, classNameId, structureKey);
577            }
578    
579            /**
580            * Returns the structure matching the class name ID, structure key, and
581            * group, optionally searching ancestor sites (that have sharing enabled)
582            * and global scoped sites.
583            *
584            * <p>
585            * This method first searches in the group. If the structure is still not
586            * found and <code>includeAncestorStructures</code> is set to
587            * <code>true</code>, this method searches the group's ancestor sites (that
588            * have sharing enabled) and lastly searches global scoped sites.
589            * </p>
590            *
591            * @param groupId the primary key of the group
592            * @param classNameId the primary key of the class name for the structure's
593            related model
594            * @param structureKey the unique string identifying the structure
595            * @param includeAncestorStructures whether to include ancestor sites (that
596            have sharing enabled) and include global scoped sites in the
597            search
598            * @return the matching structure, or <code>null</code> if a matching
599            structure could not be found
600            * @throws PortalException if a portal exception occurred
601            */
602            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure fetchStructure(
603                    long groupId, long classNameId, java.lang.String structureKey,
604                    boolean includeAncestorStructures)
605                    throws com.liferay.portal.kernel.exception.PortalException {
606                    return getService()
607                                       .fetchStructure(groupId, classNameId, structureKey,
608                            includeAncestorStructures);
609            }
610    
611            /**
612            * Returns the structure with the ID.
613            *
614            * @param structureId the primary key of the structure
615            * @return the structure with the structure ID, or <code>null</code> if a
616            matching structure could not be found
617            */
618            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure fetchStructure(
619                    long structureId) {
620                    return getService().fetchStructure(structureId);
621            }
622    
623            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
624                    return getService().getActionableDynamicQuery();
625            }
626    
627            /**
628            * Returns the Spring bean ID for this bean.
629            *
630            * @return the Spring bean ID for this bean
631            */
632            public static java.lang.String getBeanIdentifier() {
633                    return getService().getBeanIdentifier();
634            }
635    
636            /**
637            * Returns all the structures matching the class name ID.
638            *
639            * @param companyId the primary key of the structure's company
640            * @param classNameId the primary key of the class name for the structure's
641            related model
642            * @return the structures matching the class name ID
643            */
644            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getClassStructures(
645                    long companyId, long classNameId) {
646                    return getService().getClassStructures(companyId, classNameId);
647            }
648    
649            /**
650            * Returns all the structures matching the class name ID ordered by the
651            * comparator.
652            *
653            * @param companyId the primary key of the structure's company
654            * @param classNameId the primary key of the class name for the structure's
655            related model
656            * @param orderByComparator the comparator to order the structures
657            (optionally <code>null</code>)
658            * @return the matching structures ordered by the comparator
659            */
660            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getClassStructures(
661                    long companyId, long classNameId,
662                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> orderByComparator) {
663                    return getService()
664                                       .getClassStructures(companyId, classNameId, orderByComparator);
665            }
666    
667            /**
668            * Returns a range of all the structures matching the class name ID.
669            *
670            * <p>
671            * Useful when paginating results. Returns a maximum of <code>end -
672            * start</code> instances. <code>start</code> and <code>end</code> are not
673            * primary keys, they are indexes in the result set. Thus, <code>0</code>
674            * refers to the first result in the set. Setting both <code>start</code>
675            * and <code>end</code> to {@link
676            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
677            * result set.
678            * </p>
679            *
680            * @param companyId the primary key of the structure's company
681            * @param classNameId the primary key of the class name for the structure's
682            related model
683            * @param start the lower bound of the range of structures to return
684            * @param end the upper bound of the range of structures to return (not
685            inclusive)
686            * @return the range of matching structures
687            */
688            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getClassStructures(
689                    long companyId, long classNameId, int start, int end) {
690                    return getService()
691                                       .getClassStructures(companyId, classNameId, start, end);
692            }
693    
694            /**
695            * Returns the d d m structure with the primary key.
696            *
697            * @param structureId the primary key of the d d m structure
698            * @return the d d m structure
699            * @throws PortalException if a d d m structure with the primary key could not be found
700            */
701            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure getDDMStructure(
702                    long structureId)
703                    throws com.liferay.portal.kernel.exception.PortalException {
704                    return getService().getDDMStructure(structureId);
705            }
706    
707            /**
708            * Returns the d d m structure matching the UUID and group.
709            *
710            * @param uuid the d d m structure's UUID
711            * @param groupId the primary key of the group
712            * @return the matching d d m structure
713            * @throws PortalException if a matching d d m structure could not be found
714            */
715            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure getDDMStructureByUuidAndGroupId(
716                    java.lang.String uuid, long groupId)
717                    throws com.liferay.portal.kernel.exception.PortalException {
718                    return getService().getDDMStructureByUuidAndGroupId(uuid, groupId);
719            }
720    
721            /**
722            * Returns a range of all the d d m structures.
723            *
724            * <p>
725            * 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.
726            * </p>
727            *
728            * @param start the lower bound of the range of d d m structures
729            * @param end the upper bound of the range of d d m structures (not inclusive)
730            * @return the range of d d m structures
731            */
732            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getDDMStructures(
733                    int start, int end) {
734                    return getService().getDDMStructures(start, end);
735            }
736    
737            /**
738            * Returns all the d d m structures matching the UUID and company.
739            *
740            * @param uuid the UUID of the d d m structures
741            * @param companyId the primary key of the company
742            * @return the matching d d m structures, or an empty list if no matches were found
743            */
744            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getDDMStructuresByUuidAndCompanyId(
745                    java.lang.String uuid, long companyId) {
746                    return getService().getDDMStructuresByUuidAndCompanyId(uuid, companyId);
747            }
748    
749            /**
750            * Returns a range of d d m structures matching the UUID and company.
751            *
752            * @param uuid the UUID of the d d m structures
753            * @param companyId the primary key of the company
754            * @param start the lower bound of the range of d d m structures
755            * @param end the upper bound of the range of d d m structures (not inclusive)
756            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
757            * @return the range of matching d d m structures, or an empty list if no matches were found
758            */
759            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getDDMStructuresByUuidAndCompanyId(
760                    java.lang.String uuid, long companyId, int start, int end,
761                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> orderByComparator) {
762                    return getService()
763                                       .getDDMStructuresByUuidAndCompanyId(uuid, companyId, start,
764                            end, orderByComparator);
765            }
766    
767            /**
768            * Returns the number of d d m structures.
769            *
770            * @return the number of d d m structures
771            */
772            public static int getDDMStructuresCount() {
773                    return getService().getDDMStructuresCount();
774            }
775    
776            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getDLFileEntryTypeDDMStructures(
777                    long fileEntryTypeId) {
778                    return getService().getDLFileEntryTypeDDMStructures(fileEntryTypeId);
779            }
780    
781            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getDLFileEntryTypeDDMStructures(
782                    long fileEntryTypeId, int start, int end) {
783                    return getService()
784                                       .getDLFileEntryTypeDDMStructures(fileEntryTypeId, start, end);
785            }
786    
787            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getDLFileEntryTypeDDMStructures(
788                    long fileEntryTypeId, int start, int end,
789                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> orderByComparator) {
790                    return getService()
791                                       .getDLFileEntryTypeDDMStructures(fileEntryTypeId, start,
792                            end, orderByComparator);
793            }
794    
795            public static int getDLFileEntryTypeDDMStructuresCount(long fileEntryTypeId) {
796                    return getService().getDLFileEntryTypeDDMStructuresCount(fileEntryTypeId);
797            }
798    
799            /**
800            * Returns the fileEntryTypeIds of the document library file entry types associated with the d d m structure.
801            *
802            * @param structureId the structureId of the d d m structure
803            * @return long[] the fileEntryTypeIds of document library file entry types associated with the d d m structure
804            */
805            public static long[] getDLFileEntryTypePrimaryKeys(long structureId) {
806                    return getService().getDLFileEntryTypePrimaryKeys(structureId);
807            }
808    
809            /**
810            * Returns all the structures for the document library file entry type.
811            *
812            * @param dlFileEntryTypeId the primary key of the document library file
813            entry type
814            * @return the structures for the document library file entry type
815            */
816            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getDLFileEntryTypeStructures(
817                    long dlFileEntryTypeId) {
818                    return getService().getDLFileEntryTypeStructures(dlFileEntryTypeId);
819            }
820    
821            public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
822                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext) {
823                    return getService().getExportActionableDynamicQuery(portletDataContext);
824            }
825    
826            public static com.liferay.portal.model.PersistedModel getPersistedModel(
827                    java.io.Serializable primaryKeyObj)
828                    throws com.liferay.portal.kernel.exception.PortalException {
829                    return getService().getPersistedModel(primaryKeyObj);
830            }
831    
832            /**
833            * Returns the structure matching the class name ID, structure key, and
834            * group.
835            *
836            * @param groupId the primary key of the structure's group
837            * @param classNameId the primary key of the class name for the structure's
838            related model
839            * @param structureKey the unique string identifying the structure
840            * @return the matching structure
841            * @throws PortalException if a matching structure could not be found
842            */
843            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure getStructure(
844                    long groupId, long classNameId, java.lang.String structureKey)
845                    throws com.liferay.portal.kernel.exception.PortalException {
846                    return getService().getStructure(groupId, classNameId, structureKey);
847            }
848    
849            /**
850            * Returns the structure matching the class name ID, structure key, and
851            * group, optionally searching ancestor sites (that have sharing enabled)
852            * and global scoped sites.
853            *
854            * <p>
855            * This method first searches in the group. If the structure is still not
856            * found and <code>includeAncestorStructures</code> is set to
857            * <code>true</code>, this method searches the group's ancestor sites (that
858            * have sharing enabled) and lastly searches global scoped sites.
859            * </p>
860            *
861            * @param groupId the primary key of the structure's group
862            * @param classNameId the primary key of the class name for the structure's
863            related model
864            * @param structureKey the unique string identifying the structure
865            * @param includeAncestorStructures whether to include ancestor sites (that
866            have sharing enabled) and include global scoped sites in the
867            search in the search
868            * @return the matching structure
869            * @throws PortalException if a matching structure could not be found
870            */
871            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure getStructure(
872                    long groupId, long classNameId, java.lang.String structureKey,
873                    boolean includeAncestorStructures)
874                    throws com.liferay.portal.kernel.exception.PortalException {
875                    return getService()
876                                       .getStructure(groupId, classNameId, structureKey,
877                            includeAncestorStructures);
878            }
879    
880            /**
881            * Returns all the structures matching the group, name, and description.
882            *
883            * @param groupId the primary key of the structure's group
884            * @param name the structure's name
885            * @param description the structure's description
886            * @return the matching structures
887            */
888            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructure(
889                    long groupId, java.lang.String name, java.lang.String description) {
890                    return getService().getStructure(groupId, name, description);
891            }
892    
893            /**
894            * Returns the structure with the ID.
895            *
896            * @param structureId the primary key of the structure
897            * @return the structure with the ID
898            * @throws PortalException if a structure with the ID could not be found
899            */
900            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure getStructure(
901                    long structureId)
902                    throws com.liferay.portal.kernel.exception.PortalException {
903                    return getService().getStructure(structureId);
904            }
905    
906            /**
907            * Returns all the structures present in the system.
908            *
909            * @return the structures present in the system
910            */
911            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures() {
912                    return getService().getStructures();
913            }
914    
915            /**
916            * Returns all the structures present in the group.
917            *
918            * @param groupId the primary key of the group
919            * @return the structures present in the group
920            */
921            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures(
922                    long groupId) {
923                    return getService().getStructures(groupId);
924            }
925    
926            /**
927            * Returns all the structures matching class name ID and group.
928            *
929            * @param groupId the primary key of the group
930            * @param classNameId the primary key of the class name for the structure's
931            related model
932            * @return the matching structures
933            */
934            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures(
935                    long groupId, long classNameId) {
936                    return getService().getStructures(groupId, classNameId);
937            }
938    
939            /**
940            * Returns a range of all the structures that match the class name ID and
941            * group.
942            *
943            * <p>
944            * Useful when paginating results. Returns a maximum of <code>end -
945            * start</code> instances. <code>start</code> and <code>end</code> are not
946            * primary keys, they are indexes in the result set. Thus, <code>0</code>
947            * refers to the first result in the set. Setting both <code>start</code>
948            * and <code>end</code> to {@link
949            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
950            * result set.
951            * </p>
952            *
953            * @param groupId the primary key of the group
954            * @param classNameId the primary key of the class name for the structure's
955            related model
956            * @param start the lower bound of the range of structures to return
957            * @param end the upper bound of the range of structures to return (not
958            inclusive)
959            * @return the range of matching structures
960            */
961            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures(
962                    long groupId, long classNameId, int start, int end) {
963                    return getService().getStructures(groupId, classNameId, start, end);
964            }
965    
966            /**
967            * Returns an ordered range of all the structures matching the class name ID
968            * and group.
969            *
970            * <p>
971            * Useful when paginating results. Returns a maximum of <code>end -
972            * start</code> instances. <code>start</code> and <code>end</code> are not
973            * primary keys, they are indexes in the result set. Thus, <code>0</code>
974            * refers to the first result in the set. Setting both <code>start</code>
975            * and <code>end</code> to {@link
976            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
977            * result set.
978            * </p>
979            *
980            * @param groupId the primary key of the group
981            * @param classNameId the primary key of the class name for the structure's
982            related model
983            * @param start the lower bound of the range of structures to return
984            * @param end the upper bound of the range of structures to return (not
985            inclusive)
986            * @param orderByComparator the comparator to order the structures
987            (optionally <code>null</code>)
988            * @return the range of matching structures ordered by the comparator
989            */
990            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures(
991                    long groupId, long classNameId, int start, int end,
992                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> orderByComparator) {
993                    return getService()
994                                       .getStructures(groupId, classNameId, start, end,
995                            orderByComparator);
996            }
997    
998            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures(
999                    long groupId, java.lang.String name, java.lang.String description) {
1000                    return getService().getStructures(groupId, name, description);
1001            }
1002    
1003            /**
1004            * Returns a range of all the structures belonging to the group.
1005            *
1006            * <p>
1007            * Useful when paginating results. Returns a maximum of <code>end -
1008            * start</code> instances. <code>start</code> and <code>end</code> are not
1009            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1010            * refers to the first result in the set. Setting both <code>start</code>
1011            * and <code>end</code> to {@link
1012            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1013            * result set.
1014            * </p>
1015            *
1016            * @param groupId the primary key of the group
1017            * @param start the lower bound of the range of structures to return
1018            * @param end the upper bound of the range of structures to return (not
1019            inclusive)
1020            * @return the range of matching structures
1021            */
1022            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures(
1023                    long groupId, int start, int end) {
1024                    return getService().getStructures(groupId, start, end);
1025            }
1026    
1027            /**
1028            * Returns all the structures belonging to the groups.
1029            *
1030            * @param groupIds the primary keys of the groups
1031            * @return the structures belonging to the groups
1032            */
1033            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures(
1034                    long[] groupIds) {
1035                    return getService().getStructures(groupIds);
1036            }
1037    
1038            /**
1039            * Returns all the structures matching the class name ID and belonging to
1040            * the groups.
1041            *
1042            * @param groupIds the primary keys of the groups
1043            * @param classNameId the primary key of the class name for the structure's
1044            related model
1045            * @return the matching structures
1046            */
1047            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures(
1048                    long[] groupIds, long classNameId) {
1049                    return getService().getStructures(groupIds, classNameId);
1050            }
1051    
1052            /**
1053            * Returns a range of all the structures matching the class name ID and
1054            * belonging to the groups.
1055            *
1056            * <p>
1057            * Useful when paginating results. Returns a maximum of <code>end -
1058            * start</code> instances. <code>start</code> and <code>end</code> are not
1059            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1060            * refers to the first result in the set. Setting both <code>start</code>
1061            * and <code>end</code> to {@link
1062            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1063            * result set.
1064            * </p>
1065            *
1066            * @param groupIds the primary keys of the groups
1067            * @param classNameId the primary key of the class name for the structure's
1068            related model
1069            * @param start the lower bound of the range of structures to return
1070            * @param end the upper bound of the range of structures to return (not
1071            inclusive)
1072            * @return the range of matching structures
1073            */
1074            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures(
1075                    long[] groupIds, long classNameId, int start, int end) {
1076                    return getService().getStructures(groupIds, classNameId, start, end);
1077            }
1078    
1079            /**
1080            * Returns the number of structures belonging to the group.
1081            *
1082            * @param groupId the primary key of the group
1083            * @return the number of structures belonging to the group
1084            */
1085            public static int getStructuresCount(long groupId) {
1086                    return getService().getStructuresCount(groupId);
1087            }
1088    
1089            /**
1090            * Returns the number of structures matching the class name ID and group.
1091            *
1092            * @param groupId the primary key of the group
1093            * @param classNameId the primary key of the class name for the structure's
1094            related model
1095            * @return the number of matching structures
1096            */
1097            public static int getStructuresCount(long groupId, long classNameId) {
1098                    return getService().getStructuresCount(groupId, classNameId);
1099            }
1100    
1101            /**
1102            * Returns the number of structures matching the class name ID and belonging
1103            * to the groups.
1104            *
1105            * @param groupIds the primary keys of the groups
1106            * @param classNameId the primary key of the class name for the structure's
1107            related model
1108            * @return the number of matching structures
1109            */
1110            public static int getStructuresCount(long[] groupIds, long classNameId) {
1111                    return getService().getStructuresCount(groupIds, classNameId);
1112            }
1113    
1114            public static boolean hasDLFileEntryTypeDDMStructure(long fileEntryTypeId,
1115                    long structureId) {
1116                    return getService()
1117                                       .hasDLFileEntryTypeDDMStructure(fileEntryTypeId, structureId);
1118            }
1119    
1120            public static boolean hasDLFileEntryTypeDDMStructures(long fileEntryTypeId) {
1121                    return getService().hasDLFileEntryTypeDDMStructures(fileEntryTypeId);
1122            }
1123    
1124            public static void revertStructure(long userId, long structureId,
1125                    java.lang.String version,
1126                    com.liferay.portal.service.ServiceContext serviceContext)
1127                    throws com.liferay.portal.kernel.exception.PortalException {
1128                    getService()
1129                            .revertStructure(userId, structureId, version, serviceContext);
1130            }
1131    
1132            /**
1133            * Returns an ordered range of all the structures matching the groups and
1134            * class name IDs, and matching the keywords in the structure names and
1135            * descriptions.
1136            *
1137            * <p>
1138            * Useful when paginating results. Returns a maximum of <code>end -
1139            * start</code> instances. <code>start</code> and <code>end</code> are not
1140            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1141            * refers to the first result in the set. Setting both <code>start</code>
1142            * and <code>end</code> to {@link
1143            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1144            * result set.
1145            * </p>
1146            *
1147            * @param companyId the primary key of the structure's company
1148            * @param groupIds the primary keys of the groups
1149            * @param classNameId the primary key of the class name of the model the
1150            structure is related to
1151            * @param keywords the keywords (space separated), which may occur in the
1152            structure's name or description (optionally <code>null</code>)
1153            * @param start the lower bound of the range of structures to return
1154            * @param end the upper bound of the range of structures to return (not
1155            inclusive)
1156            * @param orderByComparator the comparator to order the structures
1157            (optionally <code>null</code>)
1158            * @return the range of matching structures ordered by the comparator
1159            */
1160            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> search(
1161                    long companyId, long[] groupIds, long classNameId,
1162                    java.lang.String keywords, int start, int end,
1163                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> orderByComparator) {
1164                    return getService()
1165                                       .search(companyId, groupIds, classNameId, keywords, start,
1166                            end, orderByComparator);
1167            }
1168    
1169            /**
1170            * Returns an ordered range of all the structures matching the groups, class
1171            * name IDs, name keyword, description keyword, storage type, and type.
1172            *
1173            * <p>
1174            * Useful when paginating results. Returns a maximum of <code>end -
1175            * start</code> instances. <code>start</code> and <code>end</code> are not
1176            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1177            * refers to the first result in the set. Setting both <code>start</code>
1178            * and <code>end</code> to {@link
1179            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1180            * result set.
1181            * </p>
1182            *
1183            * @param companyId the primary key of the structure's company
1184            * @param groupIds the primary keys of the groups
1185            * @param classNameId the primary key of the class name of the model the
1186            structure is related to
1187            * @param name the name keywords
1188            * @param description the description keywords
1189            * @param storageType the structure's storage type. It can be "xml" or
1190            "expando". For more information, see {@link
1191            com.liferay.portlet.dynamicdatamapping.storage.StorageType}.
1192            * @param type the structure's type. For more information, see {@link
1193            com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}.
1194            * @param andOperator whether every field must match its keywords, or just
1195            one field
1196            * @param start the lower bound of the range of structures to return
1197            * @param end the upper bound of the range of structures to return (not
1198            inclusive)
1199            * @param orderByComparator the comparator to order the structures
1200            (optionally <code>null</code>)
1201            * @return the range of matching structures ordered by the comparator
1202            */
1203            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> search(
1204                    long companyId, long[] groupIds, long classNameId,
1205                    java.lang.String name, java.lang.String description,
1206                    java.lang.String storageType, int type, boolean andOperator, int start,
1207                    int end,
1208                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> orderByComparator) {
1209                    return getService()
1210                                       .search(companyId, groupIds, classNameId, name, description,
1211                            storageType, type, andOperator, start, end, orderByComparator);
1212            }
1213    
1214            /**
1215            * Returns the number of structures matching the groups and class name IDs,
1216            * and matching the keywords in the structure names and descriptions.
1217            *
1218            * @param companyId the primary key of the structure's company
1219            * @param groupIds the primary keys of the groups
1220            * @param classNameId the primary key of the class name of the model the
1221            structure is related to
1222            * @param keywords the keywords (space separated), which may occur in the
1223            structure's name or description (optionally <code>null</code>)
1224            * @return the number of matching structures
1225            */
1226            public static int searchCount(long companyId, long[] groupIds,
1227                    long classNameId, java.lang.String keywords) {
1228                    return getService()
1229                                       .searchCount(companyId, groupIds, classNameId, keywords);
1230            }
1231    
1232            /**
1233            * Returns the number of structures matching the groups, class name IDs,
1234            * name keyword, description keyword, storage type, and type
1235            *
1236            * @param companyId the primary key of the structure's company
1237            * @param groupIds the primary keys of the groups
1238            * @param name the name keywords
1239            * @param description the description keywords
1240            * @param storageType the structure's storage type. It can be "xml" or
1241            "expando". For more information, see {@link
1242            com.liferay.portlet.dynamicdatamapping.storage.StorageType}.
1243            * @param type the structure's type. For more information, see {@link
1244            com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}.
1245            * @param andOperator whether every field must match its keywords, or just
1246            one field
1247            * @return the number of matching structures
1248            */
1249            public static int searchCount(long companyId, long[] groupIds,
1250                    long classNameId, java.lang.String name, java.lang.String description,
1251                    java.lang.String storageType, int type, boolean andOperator) {
1252                    return getService()
1253                                       .searchCount(companyId, groupIds, classNameId, name,
1254                            description, storageType, type, andOperator);
1255            }
1256    
1257            /**
1258            * Sets the Spring bean ID for this bean.
1259            *
1260            * @param beanIdentifier the Spring bean ID for this bean
1261            */
1262            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
1263                    getService().setBeanIdentifier(beanIdentifier);
1264            }
1265    
1266            public static void setDLFileEntryTypeDDMStructures(long fileEntryTypeId,
1267                    long[] structureIds) {
1268                    getService()
1269                            .setDLFileEntryTypeDDMStructures(fileEntryTypeId, structureIds);
1270            }
1271    
1272            /**
1273            * Updates the d d m structure in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
1274            *
1275            * @param ddmStructure the d d m structure
1276            * @return the d d m structure that was updated
1277            */
1278            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateDDMStructure(
1279                    com.liferay.portlet.dynamicdatamapping.model.DDMStructure ddmStructure) {
1280                    return getService().updateDDMStructure(ddmStructure);
1281            }
1282    
1283            /**
1284            * Updates the structure matching the class name ID, structure key, and
1285            * group, replacing its old parent structure, name map, description map, and
1286            * XSD with new ones.
1287            *
1288            * @param groupId the primary key of the group
1289            * @param parentStructureId the primary key of the new parent structure
1290            * @param classNameId the primary key of the class name for the
1291            structure's related model
1292            * @param structureKey the unique string identifying the structure
1293            * @param nameMap the structure's new locales and localized names
1294            * @param descriptionMap the structure's new locales and localized
1295            description
1296            * @param definition the structure's new XML schema definition
1297            * @param serviceContext the service context to be applied. Can set the
1298            structure's modification date.
1299            * @return the updated structure
1300            * @throws PortalException if a matching structure could not be found,
1301            if the XSD was not well-formed, or if a portal exception
1302            occurred
1303            * @deprecated As of 7.0.0, replaced by {@link #updateStructure(long, long,
1304            long, long, String, Map, Map, DDMForm, DDMFormLayout,
1305            ServiceContext)}
1306            */
1307            @Deprecated
1308            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure(
1309                    long groupId, long parentStructureId, long classNameId,
1310                    java.lang.String structureKey,
1311                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
1312                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
1313                    java.lang.String definition,
1314                    com.liferay.portal.service.ServiceContext serviceContext)
1315                    throws com.liferay.portal.kernel.exception.PortalException {
1316                    return getService()
1317                                       .updateStructure(groupId, parentStructureId, classNameId,
1318                            structureKey, nameMap, descriptionMap, definition, serviceContext);
1319            }
1320    
1321            /**
1322            * Updates the structure matching the structure ID, replacing its old parent
1323            * structure, name map, description map, and XSD with new ones.
1324            *
1325            * @param structureId the primary key of the structure
1326            * @param parentStructureId the primary key of the new parent structure
1327            * @param nameMap the structure's new locales and localized names
1328            * @param descriptionMap the structure's new locales and localized
1329            descriptions
1330            * @param definition the structure's new XML schema definition
1331            * @param serviceContext the service context to be applied. Can set the
1332            structure's modification date.
1333            * @return the updated structure
1334            * @throws PortalException if a matching structure could not be found,
1335            if the XSD was not well-formed, or if a portal exception
1336            occurred
1337            * @deprecated As of 7.0.0, replaced by {@link #updateStructure(long, long,
1338            long, Map, Map, DDMForm, DDMFormLayout, ServiceContext)}
1339            */
1340            @Deprecated
1341            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure(
1342                    long structureId, long parentStructureId,
1343                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
1344                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
1345                    java.lang.String definition,
1346                    com.liferay.portal.service.ServiceContext serviceContext)
1347                    throws com.liferay.portal.kernel.exception.PortalException {
1348                    return getService()
1349                                       .updateStructure(structureId, parentStructureId, nameMap,
1350                            descriptionMap, definition, serviceContext);
1351            }
1352    
1353            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure(
1354                    long userId, long groupId, long parentStructureId, long classNameId,
1355                    java.lang.String structureKey,
1356                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
1357                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
1358                    com.liferay.portlet.dynamicdatamapping.model.DDMForm ddmForm,
1359                    com.liferay.portlet.dynamicdatamapping.model.DDMFormLayout ddmFormLayout,
1360                    com.liferay.portal.service.ServiceContext serviceContext)
1361                    throws com.liferay.portal.kernel.exception.PortalException {
1362                    return getService()
1363                                       .updateStructure(userId, groupId, parentStructureId,
1364                            classNameId, structureKey, nameMap, descriptionMap, ddmForm,
1365                            ddmFormLayout, serviceContext);
1366            }
1367    
1368            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure(
1369                    long userId, long structureId,
1370                    com.liferay.portlet.dynamicdatamapping.model.DDMForm ddmForm,
1371                    com.liferay.portlet.dynamicdatamapping.model.DDMFormLayout ddmFormLayout,
1372                    com.liferay.portal.service.ServiceContext serviceContext)
1373                    throws com.liferay.portal.kernel.exception.PortalException {
1374                    return getService()
1375                                       .updateStructure(userId, structureId, ddmForm,
1376                            ddmFormLayout, serviceContext);
1377            }
1378    
1379            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure(
1380                    long userId, long structureId, long parentStructureId,
1381                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
1382                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
1383                    com.liferay.portlet.dynamicdatamapping.model.DDMForm ddmForm,
1384                    com.liferay.portlet.dynamicdatamapping.model.DDMFormLayout ddmFormLayout,
1385                    com.liferay.portal.service.ServiceContext serviceContext)
1386                    throws com.liferay.portal.kernel.exception.PortalException {
1387                    return getService()
1388                                       .updateStructure(userId, structureId, parentStructureId,
1389                            nameMap, descriptionMap, ddmForm, ddmFormLayout, serviceContext);
1390            }
1391    
1392            /**
1393            * Updates the structure matching the structure ID, replacing its XSD with a
1394            * new one.
1395            *
1396            * @param structureId the primary key of the structure
1397            * @param definition the structure's new XML schema definition
1398            * @param serviceContext the service context to be applied. Can set the
1399            structure's modification date.
1400            * @return the updated structure
1401            * @throws PortalException if a matching structure could not be found,
1402            if the XSD was not well-formed, or if a portal exception
1403            occurred
1404            * @deprecated As of 7.0.0, replaced by {@link #updateStructure(long,
1405            DDMForm, DDMFormLayout, ServiceContext)}
1406            */
1407            @Deprecated
1408            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateXSD(
1409                    long structureId, java.lang.String definition,
1410                    com.liferay.portal.service.ServiceContext serviceContext)
1411                    throws com.liferay.portal.kernel.exception.PortalException {
1412                    return getService().updateXSD(structureId, definition, serviceContext);
1413            }
1414    
1415            public static DDMStructureLocalService getService() {
1416                    if (_service == null) {
1417                            _service = (DDMStructureLocalService)PortalBeanLocatorUtil.locate(DDMStructureLocalService.class.getName());
1418    
1419                            ReferenceRegistry.registerReference(DDMStructureLocalServiceUtil.class,
1420                                    "_service");
1421                    }
1422    
1423                    return _service;
1424            }
1425    
1426            /**
1427             * @deprecated As of 6.2.0
1428             */
1429            @Deprecated
1430            public void setService(DDMStructureLocalService service) {
1431            }
1432    
1433            private static DDMStructureLocalService _service;
1434    }