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