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