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