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