Interface DDMTemplateLocalService

All Superinterfaces:
com.liferay.portal.kernel.service.BaseLocalService, com.liferay.portal.kernel.service.change.tracking.CTService<DDMTemplate>, com.liferay.portal.kernel.service.PersistedModelLocalService
All Known Implementing Classes:
DDMTemplateLocalServiceWrapper

@CTAware @ProviderType @Transactional(isolation=PORTAL, rollbackFor={com.liferay.portal.kernel.exception.PortalException.class,com.liferay.portal.kernel.exception.SystemException.class}) public interface DDMTemplateLocalService extends com.liferay.portal.kernel.service.BaseLocalService, com.liferay.portal.kernel.service.change.tracking.CTService<DDMTemplate>, com.liferay.portal.kernel.service.PersistedModelLocalService
Provides the local service interface for DDMTemplate. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
See Also:
Generated:
  • Method Summary

    Modifier and Type
    Method
    Description
    Adds the ddm template to the database.
    addTemplate(String externalReferenceCode, long userId, long groupId, long classNameId, long classPK, long resourceClassNameId, String templateKey, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, String type, String mode, String language, String script, boolean cacheable, boolean smallImage, String smallImageURL, File smallImageFile, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    Adds a template with additional parameters.
    addTemplate(String externalReferenceCode, long userId, long groupId, long classNameId, long classPK, long resourceClassNameId, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, String type, String mode, String language, String script, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    Adds a template.
    void
    addTemplateResources(DDMTemplate template, boolean addGroupPermissions, boolean addGuestPermissions)
    Adds the resources to the template.
    void
    addTemplateResources(DDMTemplate template, com.liferay.portal.kernel.service.permission.ModelPermissions modelPermissions)
    Adds the model resources with the permissions to the template.
    copyTemplate(long userId, long sourceTemplateId, com.liferay.portal.kernel.service.ServiceContext serviceContext)
     
    copyTemplate(long userId, long sourceTemplateId, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    Copies the template, creating a new template with all the values extracted from the original one.
    copyTemplates(long userId, long classNameId, long sourceClassPK, long targetClassPK, String type, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    Copies all the templates matching the class name ID, class PK, and type.
    createDDMTemplate(long templateId)
    Creates a new ddm template with the primary key.
    com.liferay.portal.kernel.model.PersistedModel
     
    deleteDDMTemplate(long templateId)
    Deletes the ddm template with the primary key from the database.
    Deletes the ddm template from the database.
    com.liferay.portal.kernel.model.PersistedModel
    deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel)
     
    void
    deleteTemplate(long templateId)
    Deletes the template and its resources.
    Deletes the template and its resources.
    deleteTemplate(String externalReferenceCode, long groupId)
     
    void
    deleteTemplates(long groupId)
    Deletes all the templates of the group.
    void
    deleteTemplates(long groupId, long classNameId)
     
    <T> T
    dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
     
    int
    dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
     
    com.liferay.portal.kernel.dao.orm.DynamicQuery
     
    <T> List<T>
    dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
    Performs a dynamic query on the database and returns the matching rows.
    <T> List<T>
    dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
    Performs a dynamic query on the database and returns a range of the matching rows.
    <T> List<T>
    dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator)
    Performs a dynamic query on the database and returns an ordered range of the matching rows.
    long
    dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
    Returns the number of rows matching the dynamic query.
    long
    dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, com.liferay.portal.kernel.dao.orm.Projection projection)
    Returns the number of rows matching the dynamic query.
    fetchDDMTemplate(long templateId)
     
    fetchDDMTemplateByExternalReferenceCode(String externalReferenceCode, long groupId)
     
    fetchDDMTemplateByExternalReferenceCode(String externalReferenceCode, long groupId, boolean includeAncestorTemplates)
     
    Returns the ddm template matching the UUID and group.
    fetchTemplate(long templateId)
    Returns the template with the primary key.
    fetchTemplate(long groupId, long classNameId, String templateKey)
    Returns the template matching the group and template key.
    fetchTemplate(long groupId, long classNameId, String templateKey, boolean includeAncestorTemplates)
    Returns the template matching the group and template key, optionally searching ancestor sites (that have sharing enabled) and global scoped sites.
    com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery
     
    com.liferay.portal.kernel.service.persistence.change.tracking.CTPersistence<DDMTemplate>
     
    getDDMTemplate(long templateId)
    Returns the ddm template with the primary key.
    getDDMTemplateByExternalReferenceCode(String externalReferenceCode, long groupId)
     
    Returns the ddm template matching the UUID and group.
    getDDMTemplates(int start, int end)
    Returns a range of all the ddm templates.
    Returns all the ddm templates matching the UUID and company.
    getDDMTemplatesByUuidAndCompanyId(String uuid, long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplate> orderByComparator)
    Returns a range of ddm templates matching the UUID and company.
    int
    Returns the number of ddm templates.
    com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery
    getExportActionableDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext)
     
    com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery
     
     
    Returns the OSGi service identifier.
    com.liferay.portal.kernel.model.PersistedModel
     
    getTemplate(long templateId)
    Returns the template with the primary key.
    getTemplate(long groupId, long classNameId, String templateKey)
    Returns the template matching the group and template key.
    getTemplate(long groupId, long classNameId, String templateKey, boolean includeAncestorTemplates)
    Returns the template matching the group and template key, optionally searching ancestor sites (that have sharing enabled) and global scoped sites.
    getTemplateBySmallImageId(long smallImageId)
     
    getTemplates(long classPK)
    Returns all the templates with the class PK.
    getTemplates(long[] groupIds, long classNameId, long classPK)
     
    getTemplates(long groupId, long classNameId)
    Returns all the templates matching the group and class name ID.
    getTemplates(long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, long resourceClassNameId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplate> orderByComparator)
     
    getTemplates(long groupId, long classNameId, long classPK)
    Returns all the templates matching the group, class name ID, and class PK.
    getTemplates(long groupId, long classNameId, long classPK, boolean includeAncestorTemplates)
     
    getTemplates(long groupId, long classNameId, long classPK, String type)
    Returns all the templates matching the group, class name ID, class PK, and type.
    getTemplates(long groupId, long classNameId, long classPK, String type, String mode)
    Returns all the templates matching the group, class name ID, class PK, type, and mode.
    getTemplatesByClassPK(long[] groupIds, long classPK)
     
    getTemplatesByClassPK(long groupId, long classPK)
     
    getTemplatesByClassPK(long groupId, long classPK, int start, int end)
     
    int
    getTemplatesByClassPKCount(long groupId, long classPK)
    Returns the number of templates matching the group and class PK.
    getTemplatesByGroupId(long groupId)
     
    getTemplatesByStructureClassNameId(long groupId, long structureClassNameId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplate> orderByComparator)
    Returns an ordered range of all the templates matching the group, structure class name ID, and status.
    int
    getTemplatesByStructureClassNameIdCount(long groupId, long structureClassNameId, int status)
    Returns the number of templates matching the group, structure class name ID, and status, including Generic Templates.
    int
    getTemplatesCount(long groupId)
    Returns the number of templates belonging to the group.
    int
    getTemplatesCount(long[] groupIds, long classNameId, long classPK)
    Returns the number of templates matching the group IDs, class name ID, and class PK.
    int
    getTemplatesCount(long groupId, long classNameId)
    Returns the number of templates matching the group and class name ID.
    int
    getTemplatesCount(long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, long resourceClassNameId)
     
    int
    getTemplatesCount(long groupId, long classNameId, long classPK)
    Returns the number of templates matching the group, class name ID, and class PK.
    void
    revertTemplate(long userId, long templateId, String version, com.liferay.portal.kernel.service.ServiceContext serviceContext)
     
    search(long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, long resourceClassNameId, String keywords, String type, String mode, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplate> orderByComparator)
    Returns an ordered range of all the templates matching the group IDs, class Name IDs, class PK, type, mode, and status, and include the keywords on its names and descriptions.
    search(long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, long resourceClassNameId, String name, String description, String type, String mode, String language, int status, boolean andOperator, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplate> orderByComparator)
    Returns an ordered range of all the templates matching the group IDs, class name IDs, class PK, name keyword, description keyword, type, mode, language, and status.
    search(long companyId, long groupId, long classNameId, long classPK, long resourceClassNameId, String keywords, String type, String mode, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplate> orderByComparator)
    Returns an ordered range of all the templates matching the group, class name ID, class PK, type, mode, and status, and matching the keywords in the template names and descriptions.
    search(long companyId, long groupId, long classNameId, long classPK, long resourceClassNameId, String name, String description, String type, String mode, String language, int status, boolean andOperator, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplate> orderByComparator)
    Returns an ordered range of all the templates matching the group, class name ID, class PK, name keyword, description keyword, type, mode, status, and language.
    int
    searchCount(long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, long resourceClassNameId, String keywords, String type, String mode, int status)
    Returns the number of templates matching the group IDs, class name IDs, class PK, type, mode, and status, and matching the keywords in the template names and descriptions.
    int
    searchCount(long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, long resourceClassNameId, String name, String description, String type, String mode, String language, int status, boolean andOperator)
    Returns the number of templates matching the group IDs, class name IDs, class PKs, name keyword, description keyword, type, mode, language, and status.
    int
    searchCount(long companyId, long groupId, long classNameId, long classPK, long resourceClassNameId, String keywords, String type, String mode, int status)
    Returns the number of templates matching the group, class name ID, class PK, type, mode, and status, and matching the keywords in the template names and descriptions.
    int
    searchCount(long companyId, long groupId, long classNameId, long classPK, long resourceClassNameId, String name, String description, String type, String mode, String language, int status, boolean andOperator)
    Returns the number of templates matching the group, class name ID, class PK, name keyword, description keyword, type, mode, language, and status.
    Updates the ddm template in the database or adds it if it does not yet exist.
    updateTemplate(long userId, long templateId, long classPK, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, String type, String mode, String language, String script, boolean cacheable, boolean smallImage, String smallImageURL, File smallImageFile, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    Updates the template matching the ID.
    updateTemplate(long userId, long templateId, long classPK, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, String type, String mode, String language, String script, boolean cacheable, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    Updates the template matching the primary key.
    <R, E extends Throwable>
    R
    updateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<com.liferay.portal.kernel.service.persistence.change.tracking.CTPersistence<DDMTemplate>,R,E> updateUnsafeFunction)
     

    Methods inherited from interface com.liferay.portal.kernel.service.PersistedModelLocalService

    fetchPersistedModel, getBasePersistence
  • Method Details

    • addDDMTemplate

      @Indexable(type=REINDEX) DDMTemplate addDDMTemplate(DDMTemplate ddmTemplate)
      Adds the ddm template to the database. Also notifies the appropriate model listeners.

      Important: Inspect DDMTemplateLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Parameters:
      ddmTemplate - the ddm template
      Returns:
      the ddm template that was added
    • addTemplate

      DDMTemplate addTemplate(String externalReferenceCode, long userId, long groupId, long classNameId, long classPK, long resourceClassNameId, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, String type, String mode, String language, String script, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Adds a template.
      Parameters:
      externalReferenceCode - the template's external reference code
      userId - the primary key of the template's creator/owner
      groupId - the primary key of the group
      classNameId - the primary key of the class name for the template's related model
      classPK - the primary key of the template's related entity
      resourceClassNameId - the primary key of the class name for template's resource model
      nameMap - the template's locales and localized names
      descriptionMap - the template's locales and localized descriptions
      type - the template's type. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      mode - the template's mode. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      language - the template's script language. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      script - the template's script
      serviceContext - the service context to be applied. Can set the UUID, creation date, modification date, guest permissions, and group permissions for the template.
      Returns:
      the template
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • addTemplate

      @Indexable(type=REINDEX) DDMTemplate addTemplate(String externalReferenceCode, long userId, long groupId, long classNameId, long classPK, long resourceClassNameId, String templateKey, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, String type, String mode, String language, String script, boolean cacheable, boolean smallImage, String smallImageURL, File smallImageFile, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Adds a template with additional parameters.
      Parameters:
      externalReferenceCode - the template's external reference code
      userId - the primary key of the template's creator/owner
      groupId - the primary key of the group
      classNameId - the primary key of the class name for the template's related model
      classPK - the primary key of the template's related entity
      resourceClassNameId - the primary key of the class name for template's resource model
      templateKey - the unique string identifying the template (optionally null)
      nameMap - the template's locales and localized names
      descriptionMap - the template's locales and localized descriptions
      type - the template's type. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      mode - the template's mode. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      language - the template's script language. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      script - the template's script
      cacheable - whether the template is cacheable
      smallImage - whether the template has a small image
      smallImageURL - the template's small image URL (optionally null)
      smallImageFile - the template's small image file (optionally null)
      serviceContext - the service context to be applied. Can set the UUID, creation date, modification date, guest permissions, and group permissions for the template.
      Returns:
      the template
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • addTemplateResources

      void addTemplateResources(DDMTemplate template, boolean addGroupPermissions, boolean addGuestPermissions) throws com.liferay.portal.kernel.exception.PortalException
      Adds the resources to the template.
      Parameters:
      template - the template to add resources to
      addGroupPermissions - whether to add group permissions
      addGuestPermissions - whether to add guest permissions
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addTemplateResources

      void addTemplateResources(DDMTemplate template, com.liferay.portal.kernel.service.permission.ModelPermissions modelPermissions) throws com.liferay.portal.kernel.exception.PortalException
      Adds the model resources with the permissions to the template.
      Parameters:
      template - the template to add resources to
      modelPermissions - the model permissions to be added
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • copyTemplate

      @Indexable(type=REINDEX) DDMTemplate copyTemplate(long userId, long sourceTemplateId, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Copies the template, creating a new template with all the values extracted from the original one. This method supports defining a new name and description.
      Parameters:
      userId - the primary key of the template's creator/owner
      sourceTemplateId - the primary key of the template to be copied
      nameMap - the new template's locales and localized names
      descriptionMap - the new template's locales and localized descriptions
      serviceContext - the service context to be applied. Can set the UUID, creation date, modification date, guest permissions, and group permissions for the template.
      Returns:
      the new template
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • copyTemplate

      @Indexable(type=REINDEX) DDMTemplate copyTemplate(long userId, long sourceTemplateId, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • copyTemplates

      @Indexable(type=REINDEX) List<DDMTemplate> copyTemplates(long userId, long classNameId, long sourceClassPK, long targetClassPK, String type, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Copies all the templates matching the class name ID, class PK, and type. This method creates new templates, extracting all the values from the old ones and updating their class PKs.
      Parameters:
      userId - the primary key of the template's creator/owner
      classNameId - the primary key of the class name for the template's related model
      sourceClassPK - the primary key of the old template's related entity
      targetClassPK - the primary key of the new template's related entity
      type - the template's type. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      serviceContext - the service context to be applied. Can set the creation date, modification date, guest permissions, and group permissions for the new templates.
      Returns:
      the new templates
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • createDDMTemplate

      @Transactional(enabled=false) DDMTemplate createDDMTemplate(long templateId)
      Creates a new ddm template with the primary key. Does not add the ddm template to the database.
      Parameters:
      templateId - the primary key for the new ddm template
      Returns:
      the new ddm template
    • createPersistedModel

      com.liferay.portal.kernel.model.PersistedModel createPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      createPersistedModel in interface com.liferay.portal.kernel.service.PersistedModelLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteDDMTemplate

      @Indexable(type=DELETE) DDMTemplate deleteDDMTemplate(DDMTemplate ddmTemplate)
      Deletes the ddm template from the database. Also notifies the appropriate model listeners.

      Important: Inspect DDMTemplateLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Parameters:
      ddmTemplate - the ddm template
      Returns:
      the ddm template that was removed
    • deleteDDMTemplate

      @Indexable(type=DELETE) DDMTemplate deleteDDMTemplate(long templateId) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the ddm template with the primary key from the database. Also notifies the appropriate model listeners.

      Important: Inspect DDMTemplateLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Parameters:
      templateId - the primary key of the ddm template
      Returns:
      the ddm template that was removed
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a ddm template with the primary key could not be found
    • deletePersistedModel

      com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      deletePersistedModel in interface com.liferay.portal.kernel.service.PersistedModelLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteTemplate

      @Indexable(type=DELETE) @SystemEvent(type=1) DDMTemplate deleteTemplate(DDMTemplate template) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the template and its resources.
      Parameters:
      template - the template to be deleted
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • deleteTemplate

      void deleteTemplate(long templateId) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the template and its resources.
      Parameters:
      templateId - the primary key of the template to be deleted
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • deleteTemplate

      DDMTemplate deleteTemplate(String externalReferenceCode, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteTemplates

      void deleteTemplates(long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Deletes all the templates of the group.
      Parameters:
      groupId - the primary key of the group
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • deleteTemplates

      void deleteTemplates(long groupId, long classNameId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • dslQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
      Specified by:
      dslQuery in interface com.liferay.portal.kernel.service.PersistedModelLocalService
    • dslQueryCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
      Specified by:
      dslQueryCount in interface com.liferay.portal.kernel.service.PersistedModelLocalService
    • dynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery()
    • dynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
      Performs a dynamic query on the database and returns the matching rows.
      Parameters:
      dynamicQuery - the dynamic query
      Returns:
      the matching rows
    • dynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
      Performs a dynamic query on the database and returns a range of the matching rows.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.dynamic.data.mapping.model.impl.DDMTemplateModelImpl.

      Parameters:
      dynamicQuery - the dynamic query
      start - the lower bound of the range of model instances
      end - the upper bound of the range of model instances (not inclusive)
      Returns:
      the range of matching rows
    • dynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator)
      Performs a dynamic query on the database and returns an ordered range of the matching rows.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.dynamic.data.mapping.model.impl.DDMTemplateModelImpl.

      Parameters:
      dynamicQuery - the dynamic query
      start - the lower bound of the range of model instances
      end - the upper bound of the range of model instances (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the ordered range of matching rows
    • dynamicQueryCount

      @Transactional(propagation=SUPPORTS, readOnly=true) long dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
      Returns the number of rows matching the dynamic query.
      Parameters:
      dynamicQuery - the dynamic query
      Returns:
      the number of rows matching the dynamic query
    • dynamicQueryCount

      @Transactional(propagation=SUPPORTS, readOnly=true) long dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, com.liferay.portal.kernel.dao.orm.Projection projection)
      Returns the number of rows matching the dynamic query.
      Parameters:
      dynamicQuery - the dynamic query
      projection - the projection to apply to the query
      Returns:
      the number of rows matching the dynamic query
    • fetchDDMTemplate

      @Transactional(propagation=SUPPORTS, readOnly=true) DDMTemplate fetchDDMTemplate(long templateId)
    • fetchDDMTemplateByExternalReferenceCode

      @Transactional(propagation=SUPPORTS, readOnly=true) DDMTemplate fetchDDMTemplateByExternalReferenceCode(String externalReferenceCode, long groupId)
    • fetchDDMTemplateByExternalReferenceCode

      @Transactional(propagation=SUPPORTS, readOnly=true) DDMTemplate fetchDDMTemplateByExternalReferenceCode(String externalReferenceCode, long groupId, boolean includeAncestorTemplates)
    • fetchDDMTemplateByUuidAndGroupId

      @Transactional(propagation=SUPPORTS, readOnly=true) DDMTemplate fetchDDMTemplateByUuidAndGroupId(String uuid, long groupId)
      Returns the ddm template matching the UUID and group.
      Parameters:
      uuid - the ddm template's UUID
      groupId - the primary key of the group
      Returns:
      the matching ddm template, or null if a matching ddm template could not be found
    • fetchTemplate

      @Transactional(propagation=SUPPORTS, readOnly=true) DDMTemplate fetchTemplate(long templateId)
      Returns the template with the primary key.
      Parameters:
      templateId - the primary key of the template
      Returns:
      the matching template, or null if a matching template could not be found
    • fetchTemplate

      @Transactional(propagation=SUPPORTS, readOnly=true) DDMTemplate fetchTemplate(long groupId, long classNameId, String templateKey)
      Returns the template matching the group and template key.
      Parameters:
      groupId - the primary key of the group
      classNameId - the primary key of the class name for the template's related model
      templateKey - the unique string identifying the template
      Returns:
      the matching template, or null if a matching template could not be found
    • fetchTemplate

      @Transactional(propagation=SUPPORTS, readOnly=true) DDMTemplate fetchTemplate(long groupId, long classNameId, String templateKey, boolean includeAncestorTemplates)
      Returns the template matching the group and template key, optionally searching ancestor sites (that have sharing enabled) and global scoped sites.

      This method first searches in the given group. If the template is still not found and includeAncestorTemplates is set to true, this method searches the group's ancestor sites (that have sharing enabled) and lastly searches global scoped sites.

      Parameters:
      groupId - the primary key of the group
      classNameId - the primary key of the class name for the template's related model
      templateKey - the unique string identifying the template
      includeAncestorTemplates - whether to include ancestor sites (that have sharing enabled) and include global scoped sites in the search in the search
      Returns:
      the matching template, or null if a matching template could not be found
    • getActionableDynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery()
    • getDDMTemplate

      @Transactional(propagation=SUPPORTS, readOnly=true) DDMTemplate getDDMTemplate(long templateId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the ddm template with the primary key.
      Parameters:
      templateId - the primary key of the ddm template
      Returns:
      the ddm template
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a ddm template with the primary key could not be found
    • getDDMTemplateByExternalReferenceCode

      @Transactional(propagation=SUPPORTS, readOnly=true) DDMTemplate getDDMTemplateByExternalReferenceCode(String externalReferenceCode, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getDDMTemplateByUuidAndGroupId

      @Transactional(propagation=SUPPORTS, readOnly=true) DDMTemplate getDDMTemplateByUuidAndGroupId(String uuid, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the ddm template matching the UUID and group.
      Parameters:
      uuid - the ddm template's UUID
      groupId - the primary key of the group
      Returns:
      the matching ddm template
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a matching ddm template could not be found
    • getDDMTemplates

      @Transactional(propagation=SUPPORTS, readOnly=true) List<DDMTemplate> getDDMTemplates(int start, int end)
      Returns a range of all the ddm templates.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.dynamic.data.mapping.model.impl.DDMTemplateModelImpl.

      Parameters:
      start - the lower bound of the range of ddm templates
      end - the upper bound of the range of ddm templates (not inclusive)
      Returns:
      the range of ddm templates
    • getDDMTemplatesByUuidAndCompanyId

      @Transactional(propagation=SUPPORTS, readOnly=true) List<DDMTemplate> getDDMTemplatesByUuidAndCompanyId(String uuid, long companyId)
      Returns all the ddm templates matching the UUID and company.
      Parameters:
      uuid - the UUID of the ddm templates
      companyId - the primary key of the company
      Returns:
      the matching ddm templates, or an empty list if no matches were found
    • getDDMTemplatesByUuidAndCompanyId

      @Transactional(propagation=SUPPORTS, readOnly=true) List<DDMTemplate> getDDMTemplatesByUuidAndCompanyId(String uuid, long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplate> orderByComparator)
      Returns a range of ddm templates matching the UUID and company.
      Parameters:
      uuid - the UUID of the ddm templates
      companyId - the primary key of the company
      start - the lower bound of the range of ddm templates
      end - the upper bound of the range of ddm templates (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the range of matching ddm templates, or an empty list if no matches were found
    • getDDMTemplatesCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getDDMTemplatesCount()
      Returns the number of ddm templates.
      Returns:
      the number of ddm templates
    • getExportActionableDynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext)
    • getIndexableActionableDynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
    • getOSGiServiceIdentifier

      String getOSGiServiceIdentifier()
      Returns the OSGi service identifier.
      Returns:
      the OSGi service identifier
    • getPersistedModel

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.model.PersistedModel getPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getPersistedModel in interface com.liferay.portal.kernel.service.PersistedModelLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getTemplate

      @Transactional(propagation=SUPPORTS, readOnly=true) DDMTemplate getTemplate(long templateId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the template with the primary key.
      Parameters:
      templateId - the primary key of the template
      Returns:
      the template with the primary key
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getTemplate

      @Transactional(propagation=SUPPORTS, readOnly=true) DDMTemplate getTemplate(long groupId, long classNameId, String templateKey) throws com.liferay.portal.kernel.exception.PortalException
      Returns the template matching the group and template key.
      Parameters:
      groupId - the primary key of the group
      classNameId - the primary key of the class name for the template's related model
      templateKey - the unique string identifying the template
      Returns:
      the matching template
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getTemplate

      @Transactional(propagation=SUPPORTS, readOnly=true) DDMTemplate getTemplate(long groupId, long classNameId, String templateKey, boolean includeAncestorTemplates) throws com.liferay.portal.kernel.exception.PortalException
      Returns the template matching the group and template key, optionally searching ancestor sites (that have sharing enabled) and global scoped sites.

      This method first searches in the group. If the template is still not found and includeAncestorTemplates is set to true, this method searches the group's ancestor sites (that have sharing enabled) and lastly searches global scoped sites.

      Parameters:
      groupId - the primary key of the group
      classNameId - the primary key of the class name for the template's related model
      templateKey - the unique string identifying the template
      includeAncestorTemplates - whether to include ancestor sites (that have sharing enabled) and include global scoped sites in the search in the search
      Returns:
      the matching template
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getTemplateBySmallImageId

      @Transactional(propagation=SUPPORTS, readOnly=true) DDMTemplate getTemplateBySmallImageId(long smallImageId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getTemplates

      @Transactional(propagation=SUPPORTS, readOnly=true) List<DDMTemplate> getTemplates(long classPK)
      Returns all the templates with the class PK.
      Parameters:
      classPK - the primary key of the template's related entity
      Returns:
      the templates with the class PK
    • getTemplates

      @Transactional(propagation=SUPPORTS, readOnly=true) List<DDMTemplate> getTemplates(long groupId, long classNameId)
      Returns all the templates matching the group and class name ID.
      Parameters:
      groupId - the primary key of the group
      classNameId - the primary key of the class name for the template's related model
      Returns:
      the matching templates
    • getTemplates

      @Transactional(propagation=SUPPORTS, readOnly=true) List<DDMTemplate> getTemplates(long groupId, long classNameId, long classPK)
      Returns all the templates matching the group, class name ID, and class PK.
      Parameters:
      groupId - the primary key of the group
      classNameId - the primary key of the class name for the template's related model
      classPK - the primary key of the template's related entity
      Returns:
      the matching templates
    • getTemplates

      @Transactional(propagation=SUPPORTS, readOnly=true) List<DDMTemplate> getTemplates(long groupId, long classNameId, long classPK, boolean includeAncestorTemplates) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getTemplates

      @Transactional(propagation=SUPPORTS, readOnly=true) List<DDMTemplate> getTemplates(long groupId, long classNameId, long classPK, String type)
      Returns all the templates matching the group, class name ID, class PK, and type.
      Parameters:
      groupId - the primary key of the group
      classNameId - the primary key of the class name for the template's related model
      classPK - the primary key of the template's related entity
      type - the template's type. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      Returns:
      the matching templates
    • getTemplates

      @Transactional(propagation=SUPPORTS, readOnly=true) List<DDMTemplate> getTemplates(long groupId, long classNameId, long classPK, String type, String mode)
      Returns all the templates matching the group, class name ID, class PK, type, and mode.
      Parameters:
      groupId - the primary key of the group
      classNameId - the primary key of the class name for the template's related model
      classPK - the primary key of the template's related entity
      type - the template's type. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      mode - the template's mode. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      Returns:
      the matching templates
    • getTemplates

      @Transactional(propagation=SUPPORTS, readOnly=true) List<DDMTemplate> getTemplates(long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, long resourceClassNameId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplate> orderByComparator)
    • getTemplates

      @Transactional(propagation=SUPPORTS, readOnly=true) List<DDMTemplate> getTemplates(long[] groupIds, long classNameId, long classPK)
    • getTemplatesByClassPK

      @Transactional(propagation=SUPPORTS, readOnly=true) List<DDMTemplate> getTemplatesByClassPK(long groupId, long classPK)
    • getTemplatesByClassPK

      @Transactional(propagation=SUPPORTS, readOnly=true) List<DDMTemplate> getTemplatesByClassPK(long groupId, long classPK, int start, int end)
    • getTemplatesByClassPK

      @Transactional(propagation=SUPPORTS, readOnly=true) List<DDMTemplate> getTemplatesByClassPK(long[] groupIds, long classPK)
    • getTemplatesByClassPKCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getTemplatesByClassPKCount(long groupId, long classPK)
      Returns the number of templates matching the group and class PK.
      Parameters:
      groupId - the primary key of the group
      classPK - the primary key of the template's related entity
      Returns:
      the number of templates belonging to the group and class PK
    • getTemplatesByGroupId

      @Transactional(propagation=SUPPORTS, readOnly=true) List<DDMTemplate> getTemplatesByGroupId(long groupId)
    • getTemplatesByStructureClassNameId

      @Transactional(propagation=SUPPORTS, readOnly=true) List<DDMTemplate> getTemplatesByStructureClassNameId(long groupId, long structureClassNameId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplate> orderByComparator)
      Returns an ordered range of all the templates matching the group, structure class name ID, and status.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set.

      Parameters:
      groupId - the primary key of the group
      structureClassNameId - the primary key of the class name for the template's related structure
      status - the template's workflow status. For more information see WorkflowConstants for constants starting with the "STATUS_" prefix.
      start - the lower bound of the range of templates to return
      end - the upper bound of the range of templates to return (not inclusive)
      orderByComparator - the comparator to order the templates (optionally null)
      Returns:
      the range of matching templates ordered by the comparator
    • getTemplatesByStructureClassNameIdCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getTemplatesByStructureClassNameIdCount(long groupId, long structureClassNameId, int status)
      Returns the number of templates matching the group, structure class name ID, and status, including Generic Templates.
      Parameters:
      groupId - the primary key of the group
      structureClassNameId - the primary key of the class name for the template's related structure
      status - the template's workflow status. For more information see WorkflowConstants for constants starting with the "STATUS_" prefix.
      Returns:
      the number of matching templates
    • getTemplatesCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getTemplatesCount(long groupId)
      Returns the number of templates belonging to the group.
      Parameters:
      groupId - the primary key of the group
      Returns:
      the number of templates belonging to the group
    • getTemplatesCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getTemplatesCount(long groupId, long classNameId)
      Returns the number of templates matching the group and class name ID.
      Parameters:
      groupId - the primary key of the group
      classNameId - the primary key of the class name for the template's related model
      Returns:
      the number of matching templates
    • getTemplatesCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getTemplatesCount(long groupId, long classNameId, long classPK)
      Returns the number of templates matching the group, class name ID, and class PK.
      Parameters:
      groupId - the primary key of the group
      classNameId - the primary key of the class name for the template's related model
      classPK - the primary key of the template's related entity
      Returns:
      the number of matching templates
    • getTemplatesCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getTemplatesCount(long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, long resourceClassNameId)
    • getTemplatesCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getTemplatesCount(long[] groupIds, long classNameId, long classPK)
      Returns the number of templates matching the group IDs, class name ID, and class PK.
      Parameters:
      groupIds - the primary keys of the groups
      classNameId - the primary key of the class name for the template's related model
      classPK - the primary key of the template's related entity
      Returns:
      the number of matching templates
    • revertTemplate

      void revertTemplate(long userId, long templateId, String version, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • search

      @Transactional(propagation=SUPPORTS, readOnly=true) List<DDMTemplate> search(long companyId, long groupId, long classNameId, long classPK, long resourceClassNameId, String keywords, String type, String mode, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplate> orderByComparator)
      Returns an ordered range of all the templates matching the group, class name ID, class PK, type, mode, and status, and matching the keywords in the template names and descriptions.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set.

      Parameters:
      companyId - the primary key of the template's company
      groupId - the primary key of the group
      classNameId - the primary key of the class name for the template's related model
      classPK - the primary key of the template's related entity
      resourceClassNameId - the primary key of the class name for template's resource model
      keywords - the keywords (space separated), which may occur in the template's name or description (optionally null)
      type - the template's type (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      mode - the template's mode (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      status - the template's workflow status. For more information see WorkflowConstants for constants starting with the "STATUS_" prefix.
      start - the lower bound of the range of templates to return
      end - the upper bound of the range of templates to return (not inclusive)
      orderByComparator - the comparator to order the templates (optionally null)
      Returns:
      the range of matching templates ordered by the comparator
    • search

      @Transactional(propagation=SUPPORTS, readOnly=true) List<DDMTemplate> search(long companyId, long groupId, long classNameId, long classPK, long resourceClassNameId, String name, String description, String type, String mode, String language, int status, boolean andOperator, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplate> orderByComparator)
      Returns an ordered range of all the templates matching the group, class name ID, class PK, name keyword, description keyword, type, mode, status, and language.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set.

      Parameters:
      companyId - the primary key of the template's company
      groupId - the primary key of the group
      classNameId - the primary key of the class name for the template's related model
      classPK - the primary key of the template's related entity
      resourceClassNameId - the primary key of the class name for template's resource model
      name - the name keywords (optionally null)
      description - the description keywords (optionally null)
      type - the template's type (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      mode - the template's mode (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      language - the template's script language (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      status - the template's workflow status. For more information see WorkflowConstants for constants starting with the "STATUS_" prefix.
      andOperator - whether every field must match its keywords, or just one field
      start - the lower bound of the range of templates to return
      end - the upper bound of the range of templates to return (not inclusive)
      orderByComparator - the comparator to order the templates (optionally null)
      Returns:
      the range of matching templates ordered by the comparator
    • search

      @Transactional(propagation=SUPPORTS, readOnly=true) List<DDMTemplate> search(long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, long resourceClassNameId, String keywords, String type, String mode, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplate> orderByComparator)
      Returns an ordered range of all the templates matching the group IDs, class Name IDs, class PK, type, mode, and status, and include the keywords on its names and descriptions.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set.

      Parameters:
      companyId - the primary key of the template's company
      groupIds - the primary keys of the groups
      classNameIds - the primary keys of the entity's instances the templates are related to
      classPKs - the primary keys of the template's related entities
      resourceClassNameId - the primary key of the class name for template's resource model
      keywords - the keywords (space separated), which may occur in the template's name or description (optionally null)
      type - the template's type (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      mode - the template's mode (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      status - the template's workflow status. For more information see WorkflowConstants for constants starting with the "STATUS_" prefix.
      start - the lower bound of the range of templates to return
      end - the upper bound of the range of templates to return (not inclusive)
      orderByComparator - the comparator to order the templates (optionally null)
      Returns:
      the range of matching templates ordered by the comparator
    • search

      @Transactional(propagation=SUPPORTS, readOnly=true) List<DDMTemplate> search(long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, long resourceClassNameId, String name, String description, String type, String mode, String language, int status, boolean andOperator, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplate> orderByComparator)
      Returns an ordered range of all the templates matching the group IDs, class name IDs, class PK, name keyword, description keyword, type, mode, language, and status.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set.

      Parameters:
      companyId - the primary key of the template's company
      groupIds - the primary keys of the groups
      classNameIds - the primary keys of the entity's instances the templates are related to
      classPKs - the primary keys of the template's related entities
      resourceClassNameId - the primary key of the class name for template's resource model
      name - the name keywords (optionally null)
      description - the description keywords (optionally null)
      type - the template's type (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      mode - the template's mode (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      language - the template's script language (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      status - the template's workflow status. For more information see WorkflowConstants for constants starting with the "STATUS_" prefix.
      andOperator - whether every field must match its keywords, or just one field.
      start - the lower bound of the range of templates to return
      end - the upper bound of the range of templates to return (not inclusive)
      orderByComparator - the comparator to order the templates (optionally null)
      Returns:
      the range of matching templates ordered by the comparator
    • searchCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int searchCount(long companyId, long groupId, long classNameId, long classPK, long resourceClassNameId, String keywords, String type, String mode, int status)
      Returns the number of templates matching the group, class name ID, class PK, type, mode, and status, and matching the keywords in the template names and descriptions.
      Parameters:
      companyId - the primary key of the template's company
      groupId - the primary key of the group
      classNameId - the primary key of the class name for the template's related model
      classPK - the primary key of the template's related entity
      resourceClassNameId - the primary key of the class name for template's resource model
      keywords - the keywords (space separated), which may occur in the template's name or description (optionally null)
      type - the template's type (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      mode - the template's mode (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      status - the template's workflow status. For more information see WorkflowConstants for constants starting with the "STATUS_" prefix.
      Returns:
      the number of matching templates
    • searchCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int searchCount(long companyId, long groupId, long classNameId, long classPK, long resourceClassNameId, String name, String description, String type, String mode, String language, int status, boolean andOperator)
      Returns the number of templates matching the group, class name ID, class PK, name keyword, description keyword, type, mode, language, and status.
      Parameters:
      companyId - the primary key of the template's company
      groupId - the primary key of the group
      classNameId - the primary key of the class name for the template's related model
      classPK - the primary key of the template's related entity
      resourceClassNameId - the primary key of the class name for template's resource model
      name - the name keywords (optionally null)
      description - the description keywords (optionally null)
      type - the template's type (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      mode - the template's mode (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      language - the template's script language (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      status - the template's workflow status. For more information see WorkflowConstants for constants starting with the "STATUS_" prefix.
      andOperator - whether every field must match its keywords, or just one field.
      Returns:
      the number of matching templates
    • searchCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int searchCount(long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, long resourceClassNameId, String keywords, String type, String mode, int status)
      Returns the number of templates matching the group IDs, class name IDs, class PK, type, mode, and status, and matching the keywords in the template names and descriptions.
      Parameters:
      companyId - the primary key of the template's company
      groupIds - the primary keys of the groups
      classNameIds - the primary keys of the entity's instance the templates are related to
      classPKs - the primary keys of the template's related entities
      resourceClassNameId - the primary key of the class name for template's resource model
      keywords - the keywords (space separated), which may occur in the template's name or description (optionally null)
      type - the template's type (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      mode - the template's mode (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      status - the template's workflow status. For more information see WorkflowConstants for constants starting with the "STATUS_" prefix.
      Returns:
      the number of matching templates
    • searchCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int searchCount(long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, long resourceClassNameId, String name, String description, String type, String mode, String language, int status, boolean andOperator)
      Returns the number of templates matching the group IDs, class name IDs, class PKs, name keyword, description keyword, type, mode, language, and status.
      Parameters:
      companyId - the primary key of the templates company
      groupIds - the primary keys of the groups
      classNameIds - the primary keys of the entity's instance the templates are related to
      classPKs - the primary keys of the template's related entities
      resourceClassNameId - the primary key of the class name for template's resource model
      name - the name keywords (optionally null)
      description - the description keywords (optionally null)
      type - the template's type (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      mode - the template's mode (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      language - the template's script language (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      status - the template's workflow status. For more information see WorkflowConstants for constants starting with the "STATUS_" prefix.
      andOperator - whether every field must match its keywords, or just one field.
      Returns:
      the number of matching templates
    • updateDDMTemplate

      @Indexable(type=REINDEX) DDMTemplate updateDDMTemplate(DDMTemplate ddmTemplate)
      Updates the ddm template in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

      Important: Inspect DDMTemplateLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Parameters:
      ddmTemplate - the ddm template
      Returns:
      the ddm template that was updated
    • updateTemplate

      @Indexable(type=REINDEX) DDMTemplate updateTemplate(long userId, long templateId, long classPK, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, String type, String mode, String language, String script, boolean cacheable, boolean smallImage, String smallImageURL, File smallImageFile, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Updates the template matching the ID.
      Parameters:
      userId - the primary key of the template's creator/owner
      templateId - the primary key of the template
      classPK - the primary key of the template's related entity
      nameMap - the template's new locales and localized names
      descriptionMap - the template's new locales and localized description
      type - the template's type. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      mode - the template's mode. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      language - the template's script language. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      script - the template's script
      cacheable - whether the template is cacheable
      smallImage - whether the template has a small image
      smallImageURL - the template's small image URL (optionally null)
      smallImageFile - the template's small image file (optionally null)
      serviceContext - the service context to be applied. Can set the modification date.
      Returns:
      the updated template
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updateTemplate

      DDMTemplate updateTemplate(long userId, long templateId, long classPK, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, String type, String mode, String language, String script, boolean cacheable, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Updates the template matching the primary key.
      Parameters:
      userId - the primary key of the template's creator/owner
      templateId - the primary key of the template
      classPK - the primary key of the template's related entity
      nameMap - the template's new locales and localized names
      descriptionMap - the template's new locales and localized description
      type - the template's type. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      mode - the template's mode. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      language - the template's script language. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      script - the template's script
      cacheable - whether the template is cacheable
      serviceContext - the service context to be applied. Can set the modification date.
      Returns:
      the updated template
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getCTPersistence

      @Transactional(enabled=false) com.liferay.portal.kernel.service.persistence.change.tracking.CTPersistence<DDMTemplate> getCTPersistence()
      Specified by:
      getCTPersistence in interface com.liferay.portal.kernel.service.change.tracking.CTService<DDMTemplate>
    • getModelClass

      @Transactional(enabled=false) Class<DDMTemplate> getModelClass()
      Specified by:
      getModelClass in interface com.liferay.portal.kernel.service.change.tracking.CTService<DDMTemplate>
    • updateWithUnsafeFunction

      @Transactional(rollbackFor=java.lang.Throwable.class) <R, E extends Throwable> R updateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<com.liferay.portal.kernel.service.persistence.change.tracking.CTPersistence<DDMTemplate>,R,E> updateUnsafeFunction) throws E
      Specified by:
      updateWithUnsafeFunction in interface com.liferay.portal.kernel.service.change.tracking.CTService<DDMTemplate>
      Throws:
      E extends Throwable