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