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