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