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