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