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