Class NotificationTemplateAttachmentUtil

java.lang.Object
com.liferay.notification.service.persistence.NotificationTemplateAttachmentUtil

public class NotificationTemplateAttachmentUtil extends Object
The persistence utility for the notification template attachment service. This utility wraps com.liferay.notification.service.persistence.impl.NotificationTemplateAttachmentPersistenceImpl and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.

Caching information and settings can be found in portal.properties

See Also:
Generated:
  • Constructor Details

    • NotificationTemplateAttachmentUtil

      public NotificationTemplateAttachmentUtil()
  • Method Details

    • clearCache

      public static void clearCache()
      See Also:
      • BasePersistence.clearCache()
    • clearCache

      public static void clearCache(NotificationTemplateAttachment notificationTemplateAttachment)
      See Also:
      • BasePersistence.clearCache(com.liferay.portal.kernel.model.BaseModel)
    • countWithDynamicQuery

      public static long countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
      See Also:
      • BasePersistence.countWithDynamicQuery(DynamicQuery)
    • fetchByPrimaryKeys

      public static Map<Serializable,NotificationTemplateAttachment> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
      See Also:
      • BasePersistence.fetchByPrimaryKeys(Set)
    • findWithDynamicQuery

      public static List<NotificationTemplateAttachment> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
      See Also:
      • BasePersistence.findWithDynamicQuery(DynamicQuery)
    • findWithDynamicQuery

      public static List<NotificationTemplateAttachment> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
      See Also:
      • BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
    • findWithDynamicQuery

      public static List<NotificationTemplateAttachment> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<NotificationTemplateAttachment> orderByComparator)
      See Also:
      • BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
    • update

      public static NotificationTemplateAttachment update(NotificationTemplateAttachment notificationTemplateAttachment)
      See Also:
      • BasePersistence.update(com.liferay.portal.kernel.model.BaseModel)
    • update

      public static NotificationTemplateAttachment update(NotificationTemplateAttachment notificationTemplateAttachment, com.liferay.portal.kernel.service.ServiceContext serviceContext)
      See Also:
      • BasePersistence.update(com.liferay.portal.kernel.model.BaseModel, ServiceContext)
    • findByNotificationTemplateId

      public static List<NotificationTemplateAttachment> findByNotificationTemplateId(long notificationTemplateId)
      Returns all the notification template attachments where notificationTemplateId = ?.
      Parameters:
      notificationTemplateId - the notification template ID
      Returns:
      the matching notification template attachments
    • findByNotificationTemplateId

      public static List<NotificationTemplateAttachment> findByNotificationTemplateId(long notificationTemplateId, int start, int end)
      Returns a range of all the notification template attachments where notificationTemplateId = ?.

      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. 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 NotificationTemplateAttachmentModelImpl.

      Parameters:
      notificationTemplateId - the notification template ID
      start - the lower bound of the range of notification template attachments
      end - the upper bound of the range of notification template attachments (not inclusive)
      Returns:
      the range of matching notification template attachments
    • findByNotificationTemplateId

      public static List<NotificationTemplateAttachment> findByNotificationTemplateId(long notificationTemplateId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<NotificationTemplateAttachment> orderByComparator)
      Returns an ordered range of all the notification template attachments where notificationTemplateId = ?.

      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. 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 NotificationTemplateAttachmentModelImpl.

      Parameters:
      notificationTemplateId - the notification template ID
      start - the lower bound of the range of notification template attachments
      end - the upper bound of the range of notification template attachments (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the ordered range of matching notification template attachments
    • findByNotificationTemplateId

      public static List<NotificationTemplateAttachment> findByNotificationTemplateId(long notificationTemplateId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<NotificationTemplateAttachment> orderByComparator, boolean useFinderCache)
      Returns an ordered range of all the notification template attachments where notificationTemplateId = ?.

      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. 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 NotificationTemplateAttachmentModelImpl.

      Parameters:
      notificationTemplateId - the notification template ID
      start - the lower bound of the range of notification template attachments
      end - the upper bound of the range of notification template attachments (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      useFinderCache - whether to use the finder cache
      Returns:
      the ordered range of matching notification template attachments
    • findByNotificationTemplateId_First

      public static NotificationTemplateAttachment findByNotificationTemplateId_First(long notificationTemplateId, com.liferay.portal.kernel.util.OrderByComparator<NotificationTemplateAttachment> orderByComparator) throws NoSuchNotificationTemplateAttachmentException
      Returns the first notification template attachment in the ordered set where notificationTemplateId = ?.
      Parameters:
      notificationTemplateId - the notification template ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the first matching notification template attachment
    • fetchByNotificationTemplateId_First

      public static NotificationTemplateAttachment fetchByNotificationTemplateId_First(long notificationTemplateId, com.liferay.portal.kernel.util.OrderByComparator<NotificationTemplateAttachment> orderByComparator)
      Returns the first notification template attachment in the ordered set where notificationTemplateId = ?.
      Parameters:
      notificationTemplateId - the notification template ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the first matching notification template attachment, or null if a matching notification template attachment could not be found
    • findByNotificationTemplateId_Last

      public static NotificationTemplateAttachment findByNotificationTemplateId_Last(long notificationTemplateId, com.liferay.portal.kernel.util.OrderByComparator<NotificationTemplateAttachment> orderByComparator) throws NoSuchNotificationTemplateAttachmentException
      Returns the last notification template attachment in the ordered set where notificationTemplateId = ?.
      Parameters:
      notificationTemplateId - the notification template ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the last matching notification template attachment
    • fetchByNotificationTemplateId_Last

      public static NotificationTemplateAttachment fetchByNotificationTemplateId_Last(long notificationTemplateId, com.liferay.portal.kernel.util.OrderByComparator<NotificationTemplateAttachment> orderByComparator)
      Returns the last notification template attachment in the ordered set where notificationTemplateId = ?.
      Parameters:
      notificationTemplateId - the notification template ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the last matching notification template attachment, or null if a matching notification template attachment could not be found
    • findByNotificationTemplateId_PrevAndNext

      public static NotificationTemplateAttachment[] findByNotificationTemplateId_PrevAndNext(long notificationTemplateAttachmentId, long notificationTemplateId, com.liferay.portal.kernel.util.OrderByComparator<NotificationTemplateAttachment> orderByComparator) throws NoSuchNotificationTemplateAttachmentException
      Returns the notification template attachments before and after the current notification template attachment in the ordered set where notificationTemplateId = ?.
      Parameters:
      notificationTemplateAttachmentId - the primary key of the current notification template attachment
      notificationTemplateId - the notification template ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the previous, current, and next notification template attachment
    • removeByNotificationTemplateId

      public static void removeByNotificationTemplateId(long notificationTemplateId)
      Removes all the notification template attachments where notificationTemplateId = ? from the database.
      Parameters:
      notificationTemplateId - the notification template ID
    • countByNotificationTemplateId

      public static int countByNotificationTemplateId(long notificationTemplateId)
      Returns the number of notification template attachments where notificationTemplateId = ?.
      Parameters:
      notificationTemplateId - the notification template ID
      Returns:
      the number of matching notification template attachments
    • findByNTI_OFI

      public static NotificationTemplateAttachment findByNTI_OFI(long notificationTemplateId, long objectFieldId) throws NoSuchNotificationTemplateAttachmentException
      Returns the notification template attachment where notificationTemplateId = ? and objectFieldId = ? or throws a NoSuchNotificationTemplateAttachmentException if it could not be found.
      Parameters:
      notificationTemplateId - the notification template ID
      objectFieldId - the object field ID
      Returns:
      the matching notification template attachment
    • fetchByNTI_OFI

      public static NotificationTemplateAttachment fetchByNTI_OFI(long notificationTemplateId, long objectFieldId)
      Returns the notification template attachment where notificationTemplateId = ? and objectFieldId = ? or returns null if it could not be found. Uses the finder cache.
      Parameters:
      notificationTemplateId - the notification template ID
      objectFieldId - the object field ID
      Returns:
      the matching notification template attachment, or null if a matching notification template attachment could not be found
    • fetchByNTI_OFI

      public static NotificationTemplateAttachment fetchByNTI_OFI(long notificationTemplateId, long objectFieldId, boolean useFinderCache)
      Returns the notification template attachment where notificationTemplateId = ? and objectFieldId = ? or returns null if it could not be found, optionally using the finder cache.
      Parameters:
      notificationTemplateId - the notification template ID
      objectFieldId - the object field ID
      useFinderCache - whether to use the finder cache
      Returns:
      the matching notification template attachment, or null if a matching notification template attachment could not be found
    • removeByNTI_OFI

      public static NotificationTemplateAttachment removeByNTI_OFI(long notificationTemplateId, long objectFieldId) throws NoSuchNotificationTemplateAttachmentException
      Removes the notification template attachment where notificationTemplateId = ? and objectFieldId = ? from the database.
      Parameters:
      notificationTemplateId - the notification template ID
      objectFieldId - the object field ID
      Returns:
      the notification template attachment that was removed
      Throws:
      NoSuchNotificationTemplateAttachmentException
    • countByNTI_OFI

      public static int countByNTI_OFI(long notificationTemplateId, long objectFieldId)
      Returns the number of notification template attachments where notificationTemplateId = ? and objectFieldId = ?.
      Parameters:
      notificationTemplateId - the notification template ID
      objectFieldId - the object field ID
      Returns:
      the number of matching notification template attachments
    • cacheResult

      public static void cacheResult(NotificationTemplateAttachment notificationTemplateAttachment)
      Caches the notification template attachment in the entity cache if it is enabled.
      Parameters:
      notificationTemplateAttachment - the notification template attachment
    • cacheResult

      public static void cacheResult(List<NotificationTemplateAttachment> notificationTemplateAttachments)
      Caches the notification template attachments in the entity cache if it is enabled.
      Parameters:
      notificationTemplateAttachments - the notification template attachments
    • create

      public static NotificationTemplateAttachment create(long notificationTemplateAttachmentId)
      Creates a new notification template attachment with the primary key. Does not add the notification template attachment to the database.
      Parameters:
      notificationTemplateAttachmentId - the primary key for the new notification template attachment
      Returns:
      the new notification template attachment
    • remove

      public static NotificationTemplateAttachment remove(long notificationTemplateAttachmentId) throws NoSuchNotificationTemplateAttachmentException
      Removes the notification template attachment with the primary key from the database. Also notifies the appropriate model listeners.
      Parameters:
      notificationTemplateAttachmentId - the primary key of the notification template attachment
      Returns:
      the notification template attachment that was removed
    • updateImpl

      public static NotificationTemplateAttachment updateImpl(NotificationTemplateAttachment notificationTemplateAttachment)
    • findByPrimaryKey

      public static NotificationTemplateAttachment findByPrimaryKey(long notificationTemplateAttachmentId) throws NoSuchNotificationTemplateAttachmentException
      Returns the notification template attachment with the primary key or throws a NoSuchNotificationTemplateAttachmentException if it could not be found.
      Parameters:
      notificationTemplateAttachmentId - the primary key of the notification template attachment
      Returns:
      the notification template attachment
    • fetchByPrimaryKey

      public static NotificationTemplateAttachment fetchByPrimaryKey(long notificationTemplateAttachmentId)
      Returns the notification template attachment with the primary key or returns null if it could not be found.
      Parameters:
      notificationTemplateAttachmentId - the primary key of the notification template attachment
      Returns:
      the notification template attachment, or null if a notification template attachment with the primary key could not be found
    • findAll

      public static List<NotificationTemplateAttachment> findAll()
      Returns all the notification template attachments.
      Returns:
      the notification template attachments
    • findAll

      public static List<NotificationTemplateAttachment> findAll(int start, int end)
      Returns a range of all the notification template attachments.

      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. 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 NotificationTemplateAttachmentModelImpl.

      Parameters:
      start - the lower bound of the range of notification template attachments
      end - the upper bound of the range of notification template attachments (not inclusive)
      Returns:
      the range of notification template attachments
    • findAll

      public static List<NotificationTemplateAttachment> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<NotificationTemplateAttachment> orderByComparator)
      Returns an ordered range of all the notification template attachments.

      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. 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 NotificationTemplateAttachmentModelImpl.

      Parameters:
      start - the lower bound of the range of notification template attachments
      end - the upper bound of the range of notification template attachments (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the ordered range of notification template attachments
    • findAll

      public static List<NotificationTemplateAttachment> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<NotificationTemplateAttachment> orderByComparator, boolean useFinderCache)
      Returns an ordered range of all the notification template attachments.

      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. 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 NotificationTemplateAttachmentModelImpl.

      Parameters:
      start - the lower bound of the range of notification template attachments
      end - the upper bound of the range of notification template attachments (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      useFinderCache - whether to use the finder cache
      Returns:
      the ordered range of notification template attachments
    • removeAll

      public static void removeAll()
      Removes all the notification template attachments from the database.
    • countAll

      public static int countAll()
      Returns the number of notification template attachments.
      Returns:
      the number of notification template attachments
    • getPersistence

      public static NotificationTemplateAttachmentPersistence getPersistence()
    • setPersistence

      public static void setPersistence(NotificationTemplateAttachmentPersistence persistence)