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