Class NotificationTemplateAttachmentUtil
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcacheResult(NotificationTemplateAttachment notificationTemplateAttachment) Caches the notification template attachment in the entity cache if it is enabled.static voidcacheResult(List<NotificationTemplateAttachment> notificationTemplateAttachments) Caches the notification template attachments in the entity cache if it is enabled.static voidstatic voidclearCache(NotificationTemplateAttachment notificationTemplateAttachment) static intcountAll()Returns the number of notification template attachments.static intcountByNotificationTemplateId(long notificationTemplateId) Returns the number of notification template attachments where notificationTemplateId = ?.static intcountByNTI_OFI(long notificationTemplateId, long objectFieldId) Returns the number of notification template attachments where notificationTemplateId = ? and objectFieldId = ?.static longcountWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) create(long notificationTemplateAttachmentId) Creates a new notification template attachment with the primary key.fetchByNotificationTemplateId_First(long notificationTemplateId, com.liferay.portal.kernel.util.OrderByComparator<NotificationTemplateAttachment> orderByComparator) Returns the first notification template attachment in the ordered set where notificationTemplateId = ?.fetchByNotificationTemplateId_Last(long notificationTemplateId, com.liferay.portal.kernel.util.OrderByComparator<NotificationTemplateAttachment> orderByComparator) Returns the last notification template attachment in the ordered set where notificationTemplateId = ?.fetchByNTI_OFI(long notificationTemplateId, long objectFieldId) Returns the notification template attachment where notificationTemplateId = ? and objectFieldId = ? or returnsnullif it could not be found.fetchByNTI_OFI(long notificationTemplateId, long objectFieldId, boolean useFinderCache) Returns the notification template attachment where notificationTemplateId = ? and objectFieldId = ? or returnsnullif it could not be found, optionally using the finder cache.fetchByPrimaryKey(long notificationTemplateAttachmentId) Returns the notification template attachment with the primary key or returnsnullif it could not be found.fetchByPrimaryKeys(Set<Serializable> primaryKeys) static List<NotificationTemplateAttachment> findAll()Returns all the notification template attachments.static List<NotificationTemplateAttachment> findAll(int start, int end) Returns a range of all the notification template attachments.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.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.static List<NotificationTemplateAttachment> findByNotificationTemplateId(long notificationTemplateId) Returns all the notification template attachments where notificationTemplateId = ?.static List<NotificationTemplateAttachment> findByNotificationTemplateId(long notificationTemplateId, int start, int end) Returns a range of all the notification template attachments where notificationTemplateId = ?.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 = ?.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 = ?.findByNotificationTemplateId_First(long notificationTemplateId, com.liferay.portal.kernel.util.OrderByComparator<NotificationTemplateAttachment> orderByComparator) Returns the first notification template attachment in the ordered set where notificationTemplateId = ?.findByNotificationTemplateId_Last(long notificationTemplateId, com.liferay.portal.kernel.util.OrderByComparator<NotificationTemplateAttachment> orderByComparator) Returns the last notification template attachment in the ordered set where notificationTemplateId = ?.static NotificationTemplateAttachment[]findByNotificationTemplateId_PrevAndNext(long notificationTemplateAttachmentId, long notificationTemplateId, com.liferay.portal.kernel.util.OrderByComparator<NotificationTemplateAttachment> orderByComparator) Returns the notification template attachments before and after the current notification template attachment in the ordered set where notificationTemplateId = ?.findByNTI_OFI(long notificationTemplateId, long objectFieldId) Returns the notification template attachment where notificationTemplateId = ? and objectFieldId = ? or throws aNoSuchNotificationTemplateAttachmentExceptionif it could not be found.findByPrimaryKey(long notificationTemplateAttachmentId) Returns the notification template attachment with the primary key or throws aNoSuchNotificationTemplateAttachmentExceptionif it could not be found.static List<NotificationTemplateAttachment> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) static List<NotificationTemplateAttachment> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end) static List<NotificationTemplateAttachment> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<NotificationTemplateAttachment> orderByComparator) remove(long notificationTemplateAttachmentId) Removes the notification template attachment with the primary key from the database.static voidRemoves all the notification template attachments from the database.static voidremoveByNotificationTemplateId(long notificationTemplateId) Removes all the notification template attachments where notificationTemplateId = ? from the database.removeByNTI_OFI(long notificationTemplateId, long objectFieldId) Removes the notification template attachment where notificationTemplateId = ? and objectFieldId = ? from the database.static voidsetPersistence(NotificationTemplateAttachmentPersistence persistence) update(NotificationTemplateAttachment notificationTemplateAttachment) update(NotificationTemplateAttachment notificationTemplateAttachment, com.liferay.portal.kernel.service.ServiceContext serviceContext) updateImpl(NotificationTemplateAttachment notificationTemplateAttachment)
-
Constructor Details
-
NotificationTemplateAttachmentUtil
public NotificationTemplateAttachmentUtil()
-
-
Method Details
-
clearCache
public static void clearCache()- See Also:
-
clearCache
- See Also:
-
countWithDynamicQuery
public static long countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) - See Also:
-
fetchByPrimaryKeys
public static Map<Serializable,NotificationTemplateAttachment> fetchByPrimaryKeys(Set<Serializable> primaryKeys) - See Also:
-
findWithDynamicQuery
public static List<NotificationTemplateAttachment> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) - See Also:
-
findWithDynamicQuery
public static List<NotificationTemplateAttachment> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end) - See Also:
-
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:
-
update
public static NotificationTemplateAttachment update(NotificationTemplateAttachment notificationTemplateAttachment) - See Also:
-
update
public static NotificationTemplateAttachment update(NotificationTemplateAttachment notificationTemplateAttachment, com.liferay.portal.kernel.service.ServiceContext serviceContext) - See Also:
-
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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromNotificationTemplateAttachmentModelImpl.- Parameters:
notificationTemplateId- the notification template IDstart- the lower bound of the range of notification template attachmentsend- 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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromNotificationTemplateAttachmentModelImpl.- Parameters:
notificationTemplateId- the notification template IDstart- the lower bound of the range of notification template attachmentsend- the upper bound of the range of notification template attachments (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)- 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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromNotificationTemplateAttachmentModelImpl.- Parameters:
notificationTemplateId- the notification template IDstart- the lower bound of the range of notification template attachmentsend- the upper bound of the range of notification template attachments (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)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 IDorderByComparator- the comparator to order the set by (optionallynull)- 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 IDorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the first matching notification template attachment, or
nullif 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 IDorderByComparator- the comparator to order the set by (optionallynull)- 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 IDorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the last matching notification template attachment, or
nullif 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 attachmentnotificationTemplateId- the notification template IDorderByComparator- the comparator to order the set by (optionallynull)- 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 aNoSuchNotificationTemplateAttachmentExceptionif it could not be found.- Parameters:
notificationTemplateId- the notification template IDobjectFieldId- 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 returnsnullif it could not be found. Uses the finder cache.- Parameters:
notificationTemplateId- the notification template IDobjectFieldId- the object field ID- Returns:
- the matching notification template attachment, or
nullif 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 returnsnullif it could not be found, optionally using the finder cache.- Parameters:
notificationTemplateId- the notification template IDobjectFieldId- the object field IDuseFinderCache- whether to use the finder cache- Returns:
- the matching notification template attachment, or
nullif 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 IDobjectFieldId- 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 IDobjectFieldId- the object field ID- Returns:
- the number of matching notification template attachments
-
cacheResult
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
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 aNoSuchNotificationTemplateAttachmentExceptionif 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 returnsnullif it could not be found.- Parameters:
notificationTemplateAttachmentId- the primary key of the notification template attachment- Returns:
- the notification template attachment, or
nullif a notification template attachment with the primary key could not be found
-
findAll
Returns all the notification template attachments.- Returns:
- the notification template attachments
-
findAll
Returns a range of all the notification template attachments.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromNotificationTemplateAttachmentModelImpl.- Parameters:
start- the lower bound of the range of notification template attachmentsend- 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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromNotificationTemplateAttachmentModelImpl.- Parameters:
start- the lower bound of the range of notification template attachmentsend- the upper bound of the range of notification template attachments (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)- 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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromNotificationTemplateAttachmentModelImpl.- Parameters:
start- the lower bound of the range of notification template attachmentsend- the upper bound of the range of notification template attachments (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)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
-
setPersistence
-