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 /** 764 * Returns the structure with the ID. 765 * 766 * @param structureId the primary key of the structure 767 * @return the structure with the structure ID, or <code>null</code> if a 768 matching structure could not be found 769 * @throws SystemException if a system exception occurred 770 */ 771 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure fetchStructure( 772 long structureId) 773 throws com.liferay.portal.kernel.exception.SystemException { 774 return getService().fetchStructure(structureId); 775 } 776 777 /** 778 * Returns the structure matching the class name ID, structure key, and 779 * group. 780 * 781 * @param groupId the primary key of the group 782 * @param classNameId the primary key of the class name for the structure's 783 related model 784 * @param structureKey the unique string identifying the structure 785 * @return the matching structure, or <code>null</code> if a matching 786 structure could not be found 787 * @throws SystemException if a system exception occurred 788 */ 789 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure fetchStructure( 790 long groupId, long classNameId, java.lang.String structureKey) 791 throws com.liferay.portal.kernel.exception.SystemException { 792 return getService().fetchStructure(groupId, classNameId, structureKey); 793 } 794 795 /** 796 * Returns the structure matching the class name ID, structure key, and 797 * group, optionally in the global scope. 798 * 799 * <p> 800 * This method first searches in the group. If the structure is still not 801 * found and <code>includeGlobalStructures</code> is set to 802 * <code>true</code>, this method searches the global group. 803 * </p> 804 * 805 * @param groupId the primary key of the group 806 * @param classNameId the primary key of the class name for the structure's 807 related model 808 * @param structureKey the unique string identifying the structure 809 * @param includeGlobalStructures whether to include the global scope in 810 the search 811 * @return the matching structure, or <code>null</code> if a matching 812 structure could not be found 813 * @throws PortalException if a portal exception occurred 814 * @throws SystemException if a system exception occurred 815 */ 816 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure fetchStructure( 817 long groupId, long classNameId, java.lang.String structureKey, 818 boolean includeGlobalStructures) 819 throws com.liferay.portal.kernel.exception.PortalException, 820 com.liferay.portal.kernel.exception.SystemException { 821 return getService() 822 .fetchStructure(groupId, classNameId, structureKey, 823 includeGlobalStructures); 824 } 825 826 /** 827 * @deprecated As of 6.2.0, replaced by {@link #getClassStructures(long, 828 long)} 829 */ 830 public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getClassStructures( 831 long classNameId) 832 throws com.liferay.portal.kernel.exception.SystemException { 833 return getService().getClassStructures(classNameId); 834 } 835 836 /** 837 * @deprecated As of 6.2.0, replaced by {@link #getClassStructures(long, 838 long, int, int)} 839 */ 840 public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getClassStructures( 841 long classNameId, int start, int end) 842 throws com.liferay.portal.kernel.exception.SystemException { 843 return getService().getClassStructures(classNameId, start, end); 844 } 845 846 /** 847 * Returns all the structures matching the class name ID. 848 * 849 * @param companyId the primary key of the structure's company 850 * @param classNameId the primary key of the class name for the structure's 851 related model 852 * @return the structures matching the class name ID 853 * @throws SystemException if a system exception occurred 854 */ 855 public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getClassStructures( 856 long companyId, long classNameId) 857 throws com.liferay.portal.kernel.exception.SystemException { 858 return getService().getClassStructures(companyId, classNameId); 859 } 860 861 /** 862 * Returns a range of all the structures matching the class name ID. 863 * 864 * <p> 865 * Useful when paginating results. Returns a maximum of <code>end - 866 * start</code> instances. <code>start</code> and <code>end</code> are not 867 * primary keys, they are indexes in the result set. Thus, <code>0</code> 868 * refers to the first result in the set. Setting both <code>start</code> 869 * and <code>end</code> to {@link 870 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 871 * result set. 872 * </p> 873 * 874 * @param companyId the primary key of the structure's company 875 * @param classNameId the primary key of the class name for the structure's 876 related model 877 * @param start the lower bound of the range of structures to return 878 * @param end the upper bound of the range of structures to return (not 879 inclusive) 880 * @return the range of matching structures 881 * @throws SystemException if a system exception occurred 882 */ 883 public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getClassStructures( 884 long companyId, long classNameId, int start, int end) 885 throws com.liferay.portal.kernel.exception.SystemException { 886 return getService() 887 .getClassStructures(companyId, classNameId, start, end); 888 } 889 890 /** 891 * Returns all the structures matching the class name ID ordered by the 892 * comparator. 893 * 894 * @param companyId the primary key of the structure's company 895 * @param classNameId the primary key of the class name for the structure's 896 related model 897 * @param orderByComparator the comparator to order the structures 898 (optionally <code>null</code>) 899 * @return the matching structures ordered by the comparator 900 * @throws SystemException if a system exception occurred 901 */ 902 public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getClassStructures( 903 long companyId, long classNameId, 904 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 905 throws com.liferay.portal.kernel.exception.SystemException { 906 return getService() 907 .getClassStructures(companyId, classNameId, orderByComparator); 908 } 909 910 /** 911 * @deprecated As of 6.2.0, replaced by {@link #getClassStructures(long, 912 long, OrderByComparator)} 913 */ 914 public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getClassStructures( 915 long classNameId, 916 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 917 throws com.liferay.portal.kernel.exception.SystemException { 918 return getService().getClassStructures(classNameId, orderByComparator); 919 } 920 921 /** 922 * Returns all the structures for the document library file entry type. 923 * 924 * @param dlFileEntryTypeId the primary key of the document library file 925 entry type 926 * @return the structures for the document library file entry type 927 * @throws SystemException if a system exception occurred 928 */ 929 public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getDLFileEntryTypeStructures( 930 long dlFileEntryTypeId) 931 throws com.liferay.portal.kernel.exception.SystemException { 932 return getService().getDLFileEntryTypeStructures(dlFileEntryTypeId); 933 } 934 935 /** 936 * Returns the structure with the ID. 937 * 938 * @param structureId the primary key of the structure 939 * @return the structure with the ID 940 * @throws PortalException if a structure with the ID could not be found 941 * @throws SystemException if a system exception occurred 942 */ 943 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure getStructure( 944 long structureId) 945 throws com.liferay.portal.kernel.exception.PortalException, 946 com.liferay.portal.kernel.exception.SystemException { 947 return getService().getStructure(structureId); 948 } 949 950 /** 951 * Returns the structure matching the class name ID, structure key, and 952 * group. 953 * 954 * @param groupId the primary key of the structure's group 955 * @param classNameId the primary key of the class name for the structure's 956 related model 957 * @param structureKey the unique string identifying the structure 958 * @return the matching structure 959 * @throws PortalException if a matching structure could not be found 960 * @throws SystemException if a system exception occurred 961 */ 962 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure getStructure( 963 long groupId, long classNameId, java.lang.String structureKey) 964 throws com.liferay.portal.kernel.exception.PortalException, 965 com.liferay.portal.kernel.exception.SystemException { 966 return getService().getStructure(groupId, classNameId, structureKey); 967 } 968 969 /** 970 * Returns the structure matching the class name ID, structure key, and 971 * group, optionally in the global scope. 972 * 973 * <p> 974 * This method first searches in the group. If the structure is still not 975 * found and <code>includeGlobalStructures</code> is set to 976 * <code>true</code>, this method searches the global group. 977 * </p> 978 * 979 * @param groupId the primary key of the structure's group 980 * @param classNameId the primary key of the class name for the structure's 981 related model 982 * @param structureKey the unique string identifying the structure 983 * @param includeGlobalStructures whether to include the global scope in 984 the search 985 * @return the matching structure 986 * @throws PortalException if a matching structure could not be found 987 * @throws SystemException if a system exception occurred 988 */ 989 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure getStructure( 990 long groupId, long classNameId, java.lang.String structureKey, 991 boolean includeGlobalStructures) 992 throws com.liferay.portal.kernel.exception.PortalException, 993 com.liferay.portal.kernel.exception.SystemException { 994 return getService() 995 .getStructure(groupId, classNameId, structureKey, 996 includeGlobalStructures); 997 } 998 999 /** 1000 * Returns all the structures matching the group, name, and description. 1001 * 1002 * @param groupId the primary key of the structure's group 1003 * @param name the structure's name 1004 * @param description the structure's description 1005 * @return the matching structures 1006 * @throws SystemException if a system exception occurred 1007 */ 1008 public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructure( 1009 long groupId, java.lang.String name, java.lang.String description) 1010 throws com.liferay.portal.kernel.exception.SystemException { 1011 return getService().getStructure(groupId, name, description); 1012 } 1013 1014 /** 1015 * @deprecated As of 6.2.0, replaced by {@link #getStructures} 1016 */ 1017 public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructureEntries() 1018 throws com.liferay.portal.kernel.exception.SystemException { 1019 return getService().getStructureEntries(); 1020 } 1021 1022 /** 1023 * @deprecated As of 6.2.0, replaced by {@link #getStructures(long)} 1024 */ 1025 public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructureEntries( 1026 long groupId) 1027 throws com.liferay.portal.kernel.exception.SystemException { 1028 return getService().getStructureEntries(groupId); 1029 } 1030 1031 /** 1032 * @deprecated As of 6.2.0, replaced by {@link #getStructures(long, int, 1033 int)} 1034 */ 1035 public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructureEntries( 1036 long groupId, int start, int end) 1037 throws com.liferay.portal.kernel.exception.SystemException { 1038 return getService().getStructureEntries(groupId, start, end); 1039 } 1040 1041 /** 1042 * Returns all the structures present in the system. 1043 * 1044 * @return the structures present in the system 1045 * @throws SystemException if a system exception occurred 1046 */ 1047 public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures() 1048 throws com.liferay.portal.kernel.exception.SystemException { 1049 return getService().getStructures(); 1050 } 1051 1052 /** 1053 * Returns all the structures present in the group. 1054 * 1055 * @param groupId the primary key of the group 1056 * @return the structures present in the group 1057 * @throws SystemException if a system exception occurred 1058 */ 1059 public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures( 1060 long groupId) 1061 throws com.liferay.portal.kernel.exception.SystemException { 1062 return getService().getStructures(groupId); 1063 } 1064 1065 /** 1066 * Returns a range of all the structures belonging to the group. 1067 * 1068 * <p> 1069 * Useful when paginating results. Returns a maximum of <code>end - 1070 * start</code> instances. <code>start</code> and <code>end</code> are not 1071 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1072 * refers to the first result in the set. Setting both <code>start</code> 1073 * and <code>end</code> to {@link 1074 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1075 * result set. 1076 * </p> 1077 * 1078 * @param groupId the primary key of the group 1079 * @param start the lower bound of the range of structures to return 1080 * @param end the upper bound of the range of structures to return (not 1081 inclusive) 1082 * @return the range of matching structures 1083 * @throws SystemException if a system exception occurred 1084 */ 1085 public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures( 1086 long groupId, int start, int end) 1087 throws com.liferay.portal.kernel.exception.SystemException { 1088 return getService().getStructures(groupId, start, end); 1089 } 1090 1091 /** 1092 * Returns all the structures matching class name ID and group. 1093 * 1094 * @param groupId the primary key of the group 1095 * @param classNameId the primary key of the class name for the structure's 1096 related model 1097 * @return the matching structures 1098 * @throws SystemException if a system exception occurred 1099 */ 1100 public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures( 1101 long groupId, long classNameId) 1102 throws com.liferay.portal.kernel.exception.SystemException { 1103 return getService().getStructures(groupId, classNameId); 1104 } 1105 1106 /** 1107 * Returns a range of all the structures that match the class name ID and 1108 * group. 1109 * 1110 * <p> 1111 * Useful when paginating results. Returns a maximum of <code>end - 1112 * start</code> instances. <code>start</code> and <code>end</code> are not 1113 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1114 * refers to the first result in the set. Setting both <code>start</code> 1115 * and <code>end</code> to {@link 1116 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1117 * result set. 1118 * </p> 1119 * 1120 * @param groupId the primary key of the group 1121 * @param classNameId the primary key of the class name for the structure's 1122 related model 1123 * @param start the lower bound of the range of structures to return 1124 * @param end the upper bound of the range of structures to return (not 1125 inclusive) 1126 * @return the range of matching structures 1127 * @throws SystemException if a system exception occurred 1128 */ 1129 public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures( 1130 long groupId, long classNameId, int start, int end) 1131 throws com.liferay.portal.kernel.exception.SystemException { 1132 return getService().getStructures(groupId, classNameId, start, end); 1133 } 1134 1135 /** 1136 * Returns an ordered range of all the structures matching the class name ID 1137 * and group. 1138 * 1139 * <p> 1140 * Useful when paginating results. Returns a maximum of <code>end - 1141 * start</code> instances. <code>start</code> and <code>end</code> are not 1142 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1143 * refers to the first result in the set. Setting both <code>start</code> 1144 * and <code>end</code> to {@link 1145 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1146 * result set. 1147 * </p> 1148 * 1149 * @param groupId the primary key of the group 1150 * @param classNameId the primary key of the class name for the structure's 1151 related model 1152 * @param start the lower bound of the range of structures to return 1153 * @param end the upper bound of the range of structures to return (not 1154 inclusive) 1155 * @param orderByComparator the comparator to order the structures 1156 (optionally <code>null</code>) 1157 * @return the range of matching structures ordered by the comparator 1158 * @throws SystemException if a system exception occurred 1159 */ 1160 public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures( 1161 long groupId, long classNameId, int start, int end, 1162 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1163 throws com.liferay.portal.kernel.exception.SystemException { 1164 return getService() 1165 .getStructures(groupId, classNameId, start, end, 1166 orderByComparator); 1167 } 1168 1169 public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures( 1170 long groupId, java.lang.String name, java.lang.String description) 1171 throws com.liferay.portal.kernel.exception.SystemException { 1172 return getService().getStructures(groupId, name, description); 1173 } 1174 1175 /** 1176 * Returns all the structures belonging to the groups. 1177 * 1178 * @param groupIds the primary keys of the groups 1179 * @return the structures belonging to the groups 1180 * @throws SystemException if a system exception occurred 1181 */ 1182 public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures( 1183 long[] groupIds) 1184 throws com.liferay.portal.kernel.exception.SystemException { 1185 return getService().getStructures(groupIds); 1186 } 1187 1188 /** 1189 * Returns all the structures matching the class name ID and belonging to 1190 * the groups. 1191 * 1192 * @param groupIds the primary keys of the groups 1193 * @param classNameId the primary key of the class name for the structure's 1194 related model 1195 * @return the matching structures 1196 * @throws SystemException if a system exception occurred 1197 */ 1198 public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures( 1199 long[] groupIds, long classNameId) 1200 throws com.liferay.portal.kernel.exception.SystemException { 1201 return getService().getStructures(groupIds, classNameId); 1202 } 1203 1204 /** 1205 * Returns a range of all the structures matching the class name ID and 1206 * belonging to the groups. 1207 * 1208 * <p> 1209 * Useful when paginating results. Returns a maximum of <code>end - 1210 * start</code> instances. <code>start</code> and <code>end</code> are not 1211 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1212 * refers to the first result in the set. Setting both <code>start</code> 1213 * and <code>end</code> to {@link 1214 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1215 * result set. 1216 * </p> 1217 * 1218 * @param groupIds the primary keys of the groups 1219 * @param classNameId the primary key of the class name for the structure's 1220 related model 1221 * @param start the lower bound of the range of structures to return 1222 * @param end the upper bound of the range of structures to return (not 1223 inclusive) 1224 * @return the range of matching structures 1225 * @throws SystemException if a system exception occurred 1226 */ 1227 public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures( 1228 long[] groupIds, long classNameId, int start, int end) 1229 throws com.liferay.portal.kernel.exception.SystemException { 1230 return getService().getStructures(groupIds, classNameId, start, end); 1231 } 1232 1233 /** 1234 * Returns the number of structures belonging to the group. 1235 * 1236 * @param groupId the primary key of the group 1237 * @return the number of structures belonging to the group 1238 * @throws SystemException if a system exception occurred 1239 */ 1240 public static int getStructuresCount(long groupId) 1241 throws com.liferay.portal.kernel.exception.SystemException { 1242 return getService().getStructuresCount(groupId); 1243 } 1244 1245 /** 1246 * Returns the number of structures matching the class name ID and group. 1247 * 1248 * @param groupId the primary key of the group 1249 * @param classNameId the primary key of the class name for the structure's 1250 related model 1251 * @return the number of matching structures 1252 * @throws SystemException if a system exception occurred 1253 */ 1254 public static int getStructuresCount(long groupId, long classNameId) 1255 throws com.liferay.portal.kernel.exception.SystemException { 1256 return getService().getStructuresCount(groupId, classNameId); 1257 } 1258 1259 /** 1260 * Returns the number of structures matching the class name ID and belonging 1261 * to the groups. 1262 * 1263 * @param groupIds the primary keys of the groups 1264 * @param classNameId the primary key of the class name for the structure's 1265 related model 1266 * @return the number of matching structures 1267 * @throws SystemException if a system exception occurred 1268 */ 1269 public static int getStructuresCount(long[] groupIds, long classNameId) 1270 throws com.liferay.portal.kernel.exception.SystemException { 1271 return getService().getStructuresCount(groupIds, classNameId); 1272 } 1273 1274 /** 1275 * Returns an ordered range of all the structures matching the groups and 1276 * class name IDs, and matching the keywords in the structure names and 1277 * descriptions. 1278 * 1279 * <p> 1280 * Useful when paginating results. Returns a maximum of <code>end - 1281 * start</code> instances. <code>start</code> and <code>end</code> are not 1282 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1283 * refers to the first result in the set. Setting both <code>start</code> 1284 * and <code>end</code> to {@link 1285 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1286 * result set. 1287 * </p> 1288 * 1289 * @param companyId the primary key of the structure's company 1290 * @param groupIds the primary keys of the groups 1291 * @param classNameIds the primary keys of the class names of the models 1292 the structures are related to 1293 * @param keywords the keywords (space separated), which may occur in the 1294 structure's name or description (optionally <code>null</code>) 1295 * @param start the lower bound of the range of structures to return 1296 * @param end the upper bound of the range of structures to return (not 1297 inclusive) 1298 * @param orderByComparator the comparator to order the structures 1299 (optionally <code>null</code>) 1300 * @return the range of matching structures ordered by the comparator 1301 * @throws SystemException if a system exception occurred 1302 */ 1303 public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> search( 1304 long companyId, long[] groupIds, long[] classNameIds, 1305 java.lang.String keywords, int start, int end, 1306 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1307 throws com.liferay.portal.kernel.exception.SystemException { 1308 return getService() 1309 .search(companyId, groupIds, classNameIds, keywords, start, 1310 end, orderByComparator); 1311 } 1312 1313 /** 1314 * Returns an ordered range of all the structures matching the groups, class 1315 * name IDs, name keyword, description keyword, storage type, and type. 1316 * 1317 * <p> 1318 * Useful when paginating results. Returns a maximum of <code>end - 1319 * start</code> instances. <code>start</code> and <code>end</code> are not 1320 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1321 * refers to the first result in the set. Setting both <code>start</code> 1322 * and <code>end</code> to {@link 1323 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1324 * result set. 1325 * </p> 1326 * 1327 * @param companyId the primary key of the structure's company 1328 * @param groupIds the primary keys of the groups 1329 * @param classNameIds the primary keys of the class names of the models 1330 the structures are related to 1331 * @param name the name keywords 1332 * @param description the description keywords 1333 * @param storageType the structure's storage type. It can be "xml" or 1334 "expando". For more information, see {@link 1335 com.liferay.portlet.dynamicdatamapping.storage.StorageType}. 1336 * @param type the structure's type. For more information, see {@link 1337 com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}. 1338 * @param andOperator whether every field must match its keywords, or just 1339 one field 1340 * @param start the lower bound of the range of structures to return 1341 * @param end the upper bound of the range of structures to return (not 1342 inclusive) 1343 * @param orderByComparator the comparator to order the structures 1344 (optionally <code>null</code>) 1345 * @return the range of matching structures ordered by the comparator 1346 * @throws SystemException if a system exception occurred 1347 */ 1348 public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> search( 1349 long companyId, long[] groupIds, long[] classNameIds, 1350 java.lang.String name, java.lang.String description, 1351 java.lang.String storageType, int type, boolean andOperator, int start, 1352 int end, 1353 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1354 throws com.liferay.portal.kernel.exception.SystemException { 1355 return getService() 1356 .search(companyId, groupIds, classNameIds, name, 1357 description, storageType, type, andOperator, start, end, 1358 orderByComparator); 1359 } 1360 1361 /** 1362 * Returns the number of structures matching the groups and class name IDs, 1363 * and matching the keywords in the structure names and descriptions. 1364 * 1365 * @param companyId the primary key of the structure's company 1366 * @param groupIds the primary keys of the groups 1367 * @param classNameIds the primary keys of the class names of the models 1368 the structures are related to 1369 * @param keywords the keywords (space separated), which may occur in the 1370 structure's name or description (optionally <code>null</code>) 1371 * @return the number of matching structures 1372 * @throws SystemException if a system exception occurred 1373 */ 1374 public static int searchCount(long companyId, long[] groupIds, 1375 long[] classNameIds, java.lang.String keywords) 1376 throws com.liferay.portal.kernel.exception.SystemException { 1377 return getService() 1378 .searchCount(companyId, groupIds, classNameIds, keywords); 1379 } 1380 1381 /** 1382 * Returns the number of structures matching the groups, class name IDs, 1383 * name keyword, description keyword, storage type, and type 1384 * 1385 * @param companyId the primary key of the structure's company 1386 * @param groupIds the primary keys of the groups 1387 * @param classNameIds the primary keys of the class names of the models 1388 the structure's are related to 1389 * @param name the name keywords 1390 * @param description the description keywords 1391 * @param storageType the structure's storage type. It can be "xml" or 1392 "expando". For more information, see {@link 1393 com.liferay.portlet.dynamicdatamapping.storage.StorageType}. 1394 * @param type the structure's type. For more information, see {@link 1395 com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}. 1396 * @param andOperator whether every field must match its keywords, or just 1397 one field 1398 * @return the number of matching structures 1399 * @throws SystemException if a system exception occurred 1400 */ 1401 public static int searchCount(long companyId, long[] groupIds, 1402 long[] classNameIds, java.lang.String name, 1403 java.lang.String description, java.lang.String storageType, int type, 1404 boolean andOperator) 1405 throws com.liferay.portal.kernel.exception.SystemException { 1406 return getService() 1407 .searchCount(companyId, groupIds, classNameIds, name, 1408 description, storageType, type, andOperator); 1409 } 1410 1411 /** 1412 * Updates the structure matching the class name ID, structure key, and 1413 * group, replacing its old parent structure, name map, description map, and 1414 * XSD with new ones. 1415 * 1416 * @param groupId the primary key of the group 1417 * @param parentStructureId the primary key of the new parent structure 1418 * @param classNameId the primary key of the class name for the structure's 1419 related model 1420 * @param structureKey the unique string identifying the structure 1421 * @param nameMap the structure's new locales and localized names 1422 * @param descriptionMap the structure's new locales and localized 1423 description 1424 * @param xsd the structure's new XML schema definition 1425 * @param serviceContext the service context to be applied. Can set the 1426 structure's modification date. 1427 * @return the updated structure 1428 * @throws PortalException if a matching structure could not be found, if 1429 the XSD was not well-formed, or if a portal exception occurred 1430 * @throws SystemException if a system exception occurred 1431 */ 1432 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure( 1433 long groupId, long parentStructureId, long classNameId, 1434 java.lang.String structureKey, 1435 java.util.Map<java.util.Locale, java.lang.String> nameMap, 1436 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 1437 java.lang.String xsd, 1438 com.liferay.portal.service.ServiceContext serviceContext) 1439 throws com.liferay.portal.kernel.exception.PortalException, 1440 com.liferay.portal.kernel.exception.SystemException { 1441 return getService() 1442 .updateStructure(groupId, parentStructureId, classNameId, 1443 structureKey, nameMap, descriptionMap, xsd, serviceContext); 1444 } 1445 1446 /** 1447 * Updates the structure matching the structure ID, replacing its old parent 1448 * structure, name map, description map, and XSD with new ones. 1449 * 1450 * @param structureId the primary key of the structure 1451 * @param parentStructureId the primary key of the new parent structure 1452 * @param nameMap the structure's new locales and localized names 1453 * @param descriptionMap the structure's new locales and localized 1454 descriptions 1455 * @param xsd the structure's new XML schema definition 1456 * @param serviceContext the service context to be applied. Can set the 1457 structure's modification date. 1458 * @return the updated structure 1459 * @throws PortalException if a matching structure could not be found, if 1460 the XSD was not well-formed, or if a portal exception occurred 1461 * @throws SystemException if a system exception occurred 1462 */ 1463 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure( 1464 long structureId, long parentStructureId, 1465 java.util.Map<java.util.Locale, java.lang.String> nameMap, 1466 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 1467 java.lang.String xsd, 1468 com.liferay.portal.service.ServiceContext serviceContext) 1469 throws com.liferay.portal.kernel.exception.PortalException, 1470 com.liferay.portal.kernel.exception.SystemException { 1471 return getService() 1472 .updateStructure(structureId, parentStructureId, nameMap, 1473 descriptionMap, xsd, serviceContext); 1474 } 1475 1476 /** 1477 * Updates the structure matching the structure ID, replacing its XSD with a 1478 * new one. 1479 * 1480 * @param structureId the primary key of the structure 1481 * @param xsd the structure's new XML schema definition 1482 * @param serviceContext the service context to be applied. Can set the 1483 structure's modification date. 1484 * @return the updated structure 1485 * @throws PortalException if a matching structure could not be found, if 1486 the XSD was not well-formed, or if a portal exception occurred 1487 * @throws SystemException if a system exception occurred 1488 */ 1489 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateXSD( 1490 long structureId, java.lang.String xsd, 1491 com.liferay.portal.service.ServiceContext serviceContext) 1492 throws com.liferay.portal.kernel.exception.PortalException, 1493 com.liferay.portal.kernel.exception.SystemException { 1494 return getService().updateXSD(structureId, xsd, serviceContext); 1495 } 1496 1497 /** 1498 * Updates the structure matching the structure ID, replacing the metadata 1499 * entry of the named field. 1500 * 1501 * @param structureId the primary key of the structure 1502 * @param fieldName the name of the field whose metadata to update 1503 * @param metadataEntryName the metadata entry's name 1504 * @param metadataEntryValue the metadata entry's value 1505 * @param serviceContext the service context to be applied. Can set the 1506 structure's modification date. 1507 * @throws PortalException if a matching structure could not be found, if 1508 the XSD was not well-formed, or if a portal exception occurred 1509 * @throws SystemException if a system exception occurred 1510 */ 1511 public static void updateXSDFieldMetadata(long structureId, 1512 java.lang.String fieldName, java.lang.String metadataEntryName, 1513 java.lang.String metadataEntryValue, 1514 com.liferay.portal.service.ServiceContext serviceContext) 1515 throws com.liferay.portal.kernel.exception.PortalException, 1516 com.liferay.portal.kernel.exception.SystemException { 1517 getService() 1518 .updateXSDFieldMetadata(structureId, fieldName, metadataEntryName, 1519 metadataEntryValue, serviceContext); 1520 } 1521 1522 public static DDMStructureLocalService getService() { 1523 if (_service == null) { 1524 _service = (DDMStructureLocalService)PortalBeanLocatorUtil.locate(DDMStructureLocalService.class.getName()); 1525 1526 ReferenceRegistry.registerReference(DDMStructureLocalServiceUtil.class, 1527 "_service"); 1528 } 1529 1530 return _service; 1531 } 1532 1533 /** 1534 * @deprecated As of 6.2.0 1535 */ 1536 public void setService(DDMStructureLocalService service) { 1537 } 1538 1539 private static DDMStructureLocalService _service; 1540 }