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, or <code>null</code> if no
1080            matches could be found
1081            * @throws SystemException if a system exception occurred
1082            */
1083            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures(
1084                    long groupId, int start, int end)
1085                    throws com.liferay.portal.kernel.exception.SystemException {
1086                    return getService().getStructures(groupId, start, end);
1087            }
1088    
1089            /**
1090            * Returns all the structures matching 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 matching structures
1096            * @throws SystemException if a system exception occurred
1097            */
1098            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures(
1099                    long groupId, long classNameId)
1100                    throws com.liferay.portal.kernel.exception.SystemException {
1101                    return getService().getStructures(groupId, classNameId);
1102            }
1103    
1104            /**
1105            * Returns a range of all the structures that match the class name ID and
1106            * group.
1107            *
1108            * <p>
1109            * Useful when paginating results. Returns a maximum of <code>end -
1110            * start</code> instances. <code>start</code> and <code>end</code> are not
1111            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1112            * refers to the first result in the set. Setting both <code>start</code>
1113            * and <code>end</code> to {@link
1114            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1115            * result set.
1116            * </p>
1117            *
1118            * @param groupId the primary key of the group
1119            * @param classNameId the primary key of the class name for the structure's
1120            related model
1121            * @param start the lower bound of the range of structures to return
1122            * @param end the upper bound of the range of structures to return (not
1123            inclusive)
1124            * @return the matching structures, or <code>null</code> if no matching
1125            structures could be found
1126            * @throws SystemException if a system exception occurred
1127            */
1128            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures(
1129                    long groupId, long classNameId, int start, int end)
1130                    throws com.liferay.portal.kernel.exception.SystemException {
1131                    return getService().getStructures(groupId, classNameId, start, end);
1132            }
1133    
1134            /**
1135            * Returns an ordered range of all the structures matching the class name ID
1136            * and group.
1137            *
1138            * <p>
1139            * Useful when paginating results. Returns a maximum of <code>end -
1140            * start</code> instances. <code>start</code> and <code>end</code> are not
1141            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1142            * refers to the first result in the set. Setting both <code>start</code>
1143            * and <code>end</code> to {@link
1144            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1145            * result set.
1146            * </p>
1147            *
1148            * @param groupId the primary key of the group
1149            * @param classNameId the primary key of the class name for the structure's
1150            related model
1151            * @param start the lower bound of the range of structures to return
1152            * @param end the upper bound of the range of structures to return (not
1153            inclusive)
1154            * @param orderByComparator the comparator to order the structures
1155            (optionally <code>null</code>)
1156            * @return the range of matching structures ordered by the comparator
1157            * @throws SystemException if a system exception occurred
1158            */
1159            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures(
1160                    long groupId, long classNameId, int start, int end,
1161                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1162                    throws com.liferay.portal.kernel.exception.SystemException {
1163                    return getService()
1164                                       .getStructures(groupId, classNameId, start, end,
1165                            orderByComparator);
1166            }
1167    
1168            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures(
1169                    long groupId, java.lang.String name, java.lang.String description)
1170                    throws com.liferay.portal.kernel.exception.SystemException {
1171                    return getService().getStructures(groupId, name, description);
1172            }
1173    
1174            /**
1175            * Returns all the structures belonging to the groups.
1176            *
1177            * @param groupIds the primary keys of the groups
1178            * @return the structures belonging to the groups
1179            * @throws SystemException if a system exception occurred
1180            */
1181            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures(
1182                    long[] groupIds)
1183                    throws com.liferay.portal.kernel.exception.SystemException {
1184                    return getService().getStructures(groupIds);
1185            }
1186    
1187            /**
1188            * Returns all the structures matching the class name ID and belonging to
1189            * the groups.
1190            *
1191            * @param groupIds the primary keys of the groups
1192            * @param classNameId the primary key of the class name for the structure's
1193            related model
1194            * @return the structures matching the class name ID and belonging to the
1195            groups
1196            * @throws SystemException if a system exception occurred
1197            */
1198            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures(
1199                    long[] groupIds, long classNameId)
1200                    throws com.liferay.portal.kernel.exception.SystemException {
1201                    return getService().getStructures(groupIds, classNameId);
1202            }
1203    
1204            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures(
1205                    long[] groupIds, long classNameId, int start, int end)
1206                    throws com.liferay.portal.kernel.exception.SystemException {
1207                    return getService().getStructures(groupIds, classNameId, start, end);
1208            }
1209    
1210            /**
1211            * Returns the number of structures belonging to the group.
1212            *
1213            * @param groupId the primary key of the group
1214            * @return the number of structures belonging to the group
1215            * @throws SystemException if a system exception occurred
1216            */
1217            public static int getStructuresCount(long groupId)
1218                    throws com.liferay.portal.kernel.exception.SystemException {
1219                    return getService().getStructuresCount(groupId);
1220            }
1221    
1222            /**
1223            * Returns the number of structures matching the class name ID and group.
1224            *
1225            * @param groupId the primary key of the group
1226            * @param classNameId the primary key of the class name for the structure's
1227            related model
1228            * @return the number of matching structures
1229            * @throws SystemException if a system exception occurred
1230            */
1231            public static int getStructuresCount(long groupId, long classNameId)
1232                    throws com.liferay.portal.kernel.exception.SystemException {
1233                    return getService().getStructuresCount(groupId, classNameId);
1234            }
1235    
1236            public static int getStructuresCount(long[] groupIds, long classNameId)
1237                    throws com.liferay.portal.kernel.exception.SystemException {
1238                    return getService().getStructuresCount(groupIds, classNameId);
1239            }
1240    
1241            /**
1242            * Returns an ordered range of all the structures matching the groups and
1243            * class name IDs, and matching the keywords in the structure names and
1244            * descriptions.
1245            *
1246            * <p>
1247            * Useful when paginating results. Returns a maximum of <code>end -
1248            * start</code> instances. <code>start</code> and <code>end</code> are not
1249            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1250            * refers to the first result in the set. Setting both <code>start</code>
1251            * and <code>end</code> to {@link
1252            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1253            * result set.
1254            * </p>
1255            *
1256            * @param companyId the primary key of the structure's company
1257            * @param groupIds the primary keys of the groups
1258            * @param classNameIds the primary keys of the class names of the models
1259            the structures are related to
1260            * @param keywords the keywords (space separated), which may occur in the
1261            structure's name or description (optionally <code>null</code>)
1262            * @param start the lower bound of the range of structures to return
1263            * @param end the upper bound of the range of structures to return (not
1264            inclusive)
1265            * @param orderByComparator the comparator to order the structures
1266            (optionally <code>null</code>)
1267            * @return the range of matching structures ordered by the comparator
1268            * @throws SystemException if a system exception occurred
1269            */
1270            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> search(
1271                    long companyId, long[] groupIds, long[] classNameIds,
1272                    java.lang.String keywords, int start, int end,
1273                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1274                    throws com.liferay.portal.kernel.exception.SystemException {
1275                    return getService()
1276                                       .search(companyId, groupIds, classNameIds, keywords, start,
1277                            end, orderByComparator);
1278            }
1279    
1280            /**
1281            * Returns an ordered range of all the structures matching the groups, class
1282            * name IDs, name keyword, description keyword, storage type, and type.
1283            *
1284            * <p>
1285            * Useful when paginating results. Returns a maximum of <code>end -
1286            * start</code> instances. <code>start</code> and <code>end</code> are not
1287            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1288            * refers to the first result in the set. Setting both <code>start</code>
1289            * and <code>end</code> to {@link
1290            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1291            * result set.
1292            * </p>
1293            *
1294            * @param companyId the primary key of the structure's company
1295            * @param groupIds the primary keys of the groups
1296            * @param classNameIds the primary keys of the class names of the models
1297            the structures are related to
1298            * @param name the name keywords
1299            * @param description the description keywords
1300            * @param storageType the structure's storage type. It can be "xml" or
1301            "expando". For more information, see {@link
1302            com.liferay.portlet.dynamicdatamapping.storage.StorageType}.
1303            * @param type the structure's type. For more information, see {@link
1304            com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}.
1305            * @param andOperator whether every field must match its keywords, or just
1306            one field
1307            * @param start the lower bound of the range of structures to return
1308            * @param end the upper bound of the range of structures to return (not
1309            inclusive)
1310            * @param orderByComparator the comparator to order the structures
1311            (optionally <code>null</code>)
1312            * @return the range of matching structures ordered by the comparator
1313            * @throws SystemException if a system exception occurred
1314            */
1315            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> search(
1316                    long companyId, long[] groupIds, long[] classNameIds,
1317                    java.lang.String name, java.lang.String description,
1318                    java.lang.String storageType, int type, boolean andOperator, int start,
1319                    int end,
1320                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1321                    throws com.liferay.portal.kernel.exception.SystemException {
1322                    return getService()
1323                                       .search(companyId, groupIds, classNameIds, name,
1324                            description, storageType, type, andOperator, start, end,
1325                            orderByComparator);
1326            }
1327    
1328            /**
1329            * Returns the number of structures matching the groups and class name IDs,
1330            * and matching the keywords in the structure names and descriptions.
1331            *
1332            * @param companyId the primary key of the structure's company
1333            * @param groupIds the primary keys of the groups
1334            * @param classNameIds the primary keys of the class names of the models
1335            the structures are related to
1336            * @param keywords the keywords (space separated), which may occur in the
1337            structure's name or description (optionally <code>null</code>)
1338            * @return the number of matching structures
1339            * @throws SystemException if a system exception occurred
1340            */
1341            public static int searchCount(long companyId, long[] groupIds,
1342                    long[] classNameIds, java.lang.String keywords)
1343                    throws com.liferay.portal.kernel.exception.SystemException {
1344                    return getService()
1345                                       .searchCount(companyId, groupIds, classNameIds, keywords);
1346            }
1347    
1348            /**
1349            * Returns the number of structures matching the groups, class name IDs,
1350            * name keyword, description keyword, storage type, and type
1351            *
1352            * @param companyId the primary key of the structure's company
1353            * @param groupIds the primary keys of the groups
1354            * @param classNameIds the primary keys of the class names of the models
1355            the structure's are related to
1356            * @param name the name keywords
1357            * @param description the description keywords
1358            * @param storageType the structure's storage type. It can be "xml" or
1359            "expando". For more information, see {@link
1360            com.liferay.portlet.dynamicdatamapping.storage.StorageType}.
1361            * @param type the structure's type. For more information, see {@link
1362            com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}.
1363            * @param andOperator whether every field must match its keywords, or just
1364            one field
1365            * @return the number of matching structures
1366            * @throws SystemException if a system exception occurred
1367            */
1368            public static int searchCount(long companyId, long[] groupIds,
1369                    long[] classNameIds, java.lang.String name,
1370                    java.lang.String description, java.lang.String storageType, int type,
1371                    boolean andOperator)
1372                    throws com.liferay.portal.kernel.exception.SystemException {
1373                    return getService()
1374                                       .searchCount(companyId, groupIds, classNameIds, name,
1375                            description, storageType, type, andOperator);
1376            }
1377    
1378            /**
1379            * Updates the structure matching the class name ID, structure key, and
1380            * group, replacing its old parent structure, name map, description map, and
1381            * XSD with new ones.
1382            *
1383            * @param groupId the primary key of the group
1384            * @param parentStructureId the primary key of the new parent structure
1385            * @param classNameId the primary key of the class name for the structure's
1386            related model
1387            * @param structureKey the unique string identifying the structure
1388            * @param nameMap the structure's new locales and localized names
1389            * @param descriptionMap the structure's new locales and localized
1390            description
1391            * @param xsd the structure's new XML schema definition
1392            * @param serviceContext the service context to be applied. Can set the
1393            structure's modification date.
1394            * @return the updated structure
1395            * @throws PortalException if a matching structure could not be found, if
1396            the XSD was not well-formed, or if a portal exception occurred
1397            * @throws SystemException if a system exception occurred
1398            */
1399            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure(
1400                    long groupId, long parentStructureId, long classNameId,
1401                    java.lang.String structureKey,
1402                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
1403                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
1404                    java.lang.String xsd,
1405                    com.liferay.portal.service.ServiceContext serviceContext)
1406                    throws com.liferay.portal.kernel.exception.PortalException,
1407                            com.liferay.portal.kernel.exception.SystemException {
1408                    return getService()
1409                                       .updateStructure(groupId, parentStructureId, classNameId,
1410                            structureKey, nameMap, descriptionMap, xsd, serviceContext);
1411            }
1412    
1413            /**
1414            * Updates the structure matching the structure ID, replacing its old parent
1415            * structure, name map, description map, and XSD with new ones.
1416            *
1417            * @param structureId the primary key of the structure
1418            * @param parentStructureId the primary key of the new parent structure
1419            * @param nameMap the structure's new locales and localized names
1420            * @param descriptionMap the structure's new locales and localized
1421            descriptions
1422            * @param xsd the structure's new XML schema definition
1423            * @param serviceContext the service context to be applied. Can set the
1424            structure's modification date.
1425            * @return the updated structure
1426            * @throws PortalException if a matching structure could not be found, if
1427            the XSD was not well-formed, or if a portal exception occurred
1428            * @throws SystemException if a system exception occurred
1429            */
1430            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure(
1431                    long structureId, long parentStructureId,
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(structureId, parentStructureId, nameMap,
1440                            descriptionMap, xsd, serviceContext);
1441            }
1442    
1443            /**
1444            * Updates the structure matching the structure ID, replacing its XSD with a
1445            * new one.
1446            *
1447            * @param structureId the primary key of the structure
1448            * @param xsd the structure's new XML schema definition
1449            * @param serviceContext the service context to be applied. Can set the
1450            structure's modification date.
1451            * @return the updated structure
1452            * @throws PortalException if a matching structure could not be found, if
1453            the XSD was not well-formed, or if a portal exception occurred
1454            * @throws SystemException if a system exception occurred
1455            */
1456            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateXSD(
1457                    long structureId, java.lang.String xsd,
1458                    com.liferay.portal.service.ServiceContext serviceContext)
1459                    throws com.liferay.portal.kernel.exception.PortalException,
1460                            com.liferay.portal.kernel.exception.SystemException {
1461                    return getService().updateXSD(structureId, xsd, serviceContext);
1462            }
1463    
1464            /**
1465            * Updates the structure matching the structure ID, replacing the metadata
1466            * entry of the named field.
1467            *
1468            * @param structureId the primary key of the structure
1469            * @param fieldName the name of the field whose metadata to update
1470            * @param metadataEntryName the metadata entry's name
1471            * @param metadataEntryValue the metadata entry's value
1472            * @param serviceContext the service context to be applied. Can set the
1473            structure's modification date.
1474            * @throws PortalException if a matching structure could not be found, if
1475            the XSD was not well-formed, or if a portal exception occurred
1476            * @throws SystemException if a system exception occurred
1477            */
1478            public static void updateXSDFieldMetadata(long structureId,
1479                    java.lang.String fieldName, java.lang.String metadataEntryName,
1480                    java.lang.String metadataEntryValue,
1481                    com.liferay.portal.service.ServiceContext serviceContext)
1482                    throws com.liferay.portal.kernel.exception.PortalException,
1483                            com.liferay.portal.kernel.exception.SystemException {
1484                    getService()
1485                            .updateXSDFieldMetadata(structureId, fieldName, metadataEntryName,
1486                            metadataEntryValue, serviceContext);
1487            }
1488    
1489            public static DDMStructureLocalService getService() {
1490                    if (_service == null) {
1491                            _service = (DDMStructureLocalService)PortalBeanLocatorUtil.locate(DDMStructureLocalService.class.getName());
1492    
1493                            ReferenceRegistry.registerReference(DDMStructureLocalServiceUtil.class,
1494                                    "_service");
1495                    }
1496    
1497                    return _service;
1498            }
1499    
1500            /**
1501             * @deprecated As of 6.2.0
1502             */
1503            public void setService(DDMStructureLocalService service) {
1504            }
1505    
1506            private static DDMStructureLocalService _service;
1507    }