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