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