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