public class NotificationTemplateAttachmentUtil
extends java.lang.Object
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
NotificationTemplateAttachmentPersistence
Constructor and Description |
---|
NotificationTemplateAttachmentUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
cacheResult(java.util.List<NotificationTemplateAttachment> notificationTemplateAttachments)
Caches the notification template attachments in the entity cache if it is enabled.
|
static void |
cacheResult(NotificationTemplateAttachment notificationTemplateAttachment)
Caches the notification template attachment in the entity cache if it is enabled.
|
static void |
clearCache() |
static void |
clearCache(NotificationTemplateAttachment notificationTemplateAttachment) |
static int |
countAll()
Returns the number of notification template attachments.
|
static int |
countByNotificationTemplateId(long notificationTemplateId)
Returns the number of notification template attachments where notificationTemplateId = ?.
|
static int |
countByNTI_OFI(long notificationTemplateId,
long objectFieldId)
Returns the number of notification template attachments where notificationTemplateId = ? and objectFieldId = ?.
|
static long |
countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static NotificationTemplateAttachment |
create(long notificationTemplateAttachmentId)
Creates a new notification template attachment with the primary key.
|
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 = ?.
|
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 = ?.
|
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. |
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. |
static NotificationTemplateAttachment |
fetchByPrimaryKey(long notificationTemplateAttachmentId)
Returns the notification template attachment with the primary key or returns
null if it could not be found. |
static java.util.Map<java.io.Serializable,NotificationTemplateAttachment> |
fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys) |
static java.util.List<NotificationTemplateAttachment> |
findAll()
Returns all the notification template attachments.
|
static java.util.List<NotificationTemplateAttachment> |
findAll(int start,
int end)
Returns a range of all the notification template attachments.
|
static java.util.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 java.util.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 NotificationTemplateAttachment |
findByNotificationTemplateId_First(long notificationTemplateId,
com.liferay.portal.kernel.util.OrderByComparator<NotificationTemplateAttachment> orderByComparator)
Returns the first notification template attachment in the ordered set where notificationTemplateId = ?.
|
static NotificationTemplateAttachment |
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 = ?.
|
static java.util.List<NotificationTemplateAttachment> |
findByNotificationTemplateId(long notificationTemplateId)
Returns all the notification template attachments where notificationTemplateId = ?.
|
static java.util.List<NotificationTemplateAttachment> |
findByNotificationTemplateId(long notificationTemplateId,
int start,
int end)
Returns a range of all the notification template attachments where notificationTemplateId = ?.
|
static java.util.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 java.util.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 = ?.
|
static NotificationTemplateAttachment |
findByNTI_OFI(long notificationTemplateId,
long objectFieldId)
Returns the notification template attachment where notificationTemplateId = ? and objectFieldId = ? or throws a
NoSuchNotificationTemplateAttachmentException if it could not be found. |
static NotificationTemplateAttachment |
findByPrimaryKey(long notificationTemplateAttachmentId)
Returns the notification template attachment with the primary key or throws a
NoSuchNotificationTemplateAttachmentException if it could not be found. |
static java.util.List<NotificationTemplateAttachment> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static java.util.List<NotificationTemplateAttachment> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end) |
static java.util.List<NotificationTemplateAttachment> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<NotificationTemplateAttachment> orderByComparator) |
static NotificationTemplateAttachmentPersistence |
getPersistence() |
static NotificationTemplateAttachment |
remove(long notificationTemplateAttachmentId)
Removes the notification template attachment with the primary key from the database.
|
static void |
removeAll()
Removes all the notification template attachments from the database.
|
static void |
removeByNotificationTemplateId(long notificationTemplateId)
Removes all the notification template attachments where notificationTemplateId = ? from the database.
|
static NotificationTemplateAttachment |
removeByNTI_OFI(long notificationTemplateId,
long objectFieldId)
Removes the notification template attachment where notificationTemplateId = ? and objectFieldId = ? from the database.
|
static void |
setPersistence(NotificationTemplateAttachmentPersistence persistence) |
static NotificationTemplateAttachment |
update(NotificationTemplateAttachment notificationTemplateAttachment) |
static NotificationTemplateAttachment |
update(NotificationTemplateAttachment notificationTemplateAttachment,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
static NotificationTemplateAttachment |
updateImpl(NotificationTemplateAttachment notificationTemplateAttachment) |
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(NotificationTemplateAttachment notificationTemplateAttachment)
BasePersistence.clearCache(com.liferay.portal.kernel.model.BaseModel)
public static long countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.countWithDynamicQuery(DynamicQuery)
public static java.util.Map<java.io.Serializable,NotificationTemplateAttachment> fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys)
BasePersistence.fetchByPrimaryKeys(Set)
public static java.util.List<NotificationTemplateAttachment> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.findWithDynamicQuery(DynamicQuery)
public static java.util.List<NotificationTemplateAttachment> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
public static java.util.List<NotificationTemplateAttachment> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<NotificationTemplateAttachment> orderByComparator)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
public static NotificationTemplateAttachment update(NotificationTemplateAttachment notificationTemplateAttachment)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel)
public static NotificationTemplateAttachment update(NotificationTemplateAttachment notificationTemplateAttachment, com.liferay.portal.kernel.service.ServiceContext serviceContext)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel, ServiceContext)
public static java.util.List<NotificationTemplateAttachment> findByNotificationTemplateId(long notificationTemplateId)
notificationTemplateId
- the notification template IDpublic static java.util.List<NotificationTemplateAttachment> findByNotificationTemplateId(long notificationTemplateId, int start, int end)
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
.
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)public static java.util.List<NotificationTemplateAttachment> findByNotificationTemplateId(long notificationTemplateId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<NotificationTemplateAttachment> orderByComparator)
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
.
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 (optionally null
)public static java.util.List<NotificationTemplateAttachment> findByNotificationTemplateId(long notificationTemplateId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<NotificationTemplateAttachment> orderByComparator, boolean useFinderCache)
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
.
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 (optionally null
)useFinderCache
- whether to use the finder cachepublic static NotificationTemplateAttachment findByNotificationTemplateId_First(long notificationTemplateId, com.liferay.portal.kernel.util.OrderByComparator<NotificationTemplateAttachment> orderByComparator) throws NoSuchNotificationTemplateAttachmentException
notificationTemplateId
- the notification template IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchNotificationTemplateAttachmentException
- if a matching notification template attachment could not be foundpublic static NotificationTemplateAttachment fetchByNotificationTemplateId_First(long notificationTemplateId, com.liferay.portal.kernel.util.OrderByComparator<NotificationTemplateAttachment> orderByComparator)
notificationTemplateId
- the notification template IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching notification template attachment could not be foundpublic static NotificationTemplateAttachment findByNotificationTemplateId_Last(long notificationTemplateId, com.liferay.portal.kernel.util.OrderByComparator<NotificationTemplateAttachment> orderByComparator) throws NoSuchNotificationTemplateAttachmentException
notificationTemplateId
- the notification template IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchNotificationTemplateAttachmentException
- if a matching notification template attachment could not be foundpublic static NotificationTemplateAttachment fetchByNotificationTemplateId_Last(long notificationTemplateId, com.liferay.portal.kernel.util.OrderByComparator<NotificationTemplateAttachment> orderByComparator)
notificationTemplateId
- the notification template IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching notification template attachment could not be foundpublic static NotificationTemplateAttachment[] findByNotificationTemplateId_PrevAndNext(long notificationTemplateAttachmentId, long notificationTemplateId, com.liferay.portal.kernel.util.OrderByComparator<NotificationTemplateAttachment> orderByComparator) throws NoSuchNotificationTemplateAttachmentException
notificationTemplateAttachmentId
- the primary key of the current notification template attachmentnotificationTemplateId
- the notification template IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchNotificationTemplateAttachmentException
- if a notification template attachment with the primary key could not be foundpublic static void removeByNotificationTemplateId(long notificationTemplateId)
notificationTemplateId
- the notification template IDpublic static int countByNotificationTemplateId(long notificationTemplateId)
notificationTemplateId
- the notification template IDpublic static NotificationTemplateAttachment findByNTI_OFI(long notificationTemplateId, long objectFieldId) throws NoSuchNotificationTemplateAttachmentException
NoSuchNotificationTemplateAttachmentException
if it could not be found.notificationTemplateId
- the notification template IDobjectFieldId
- the object field IDNoSuchNotificationTemplateAttachmentException
- if a matching notification template attachment could not be foundpublic static NotificationTemplateAttachment fetchByNTI_OFI(long notificationTemplateId, long objectFieldId)
null
if it could not be found. Uses the finder cache.notificationTemplateId
- the notification template IDobjectFieldId
- the object field IDnull
if a matching notification template attachment could not be foundpublic static NotificationTemplateAttachment fetchByNTI_OFI(long notificationTemplateId, long objectFieldId, boolean useFinderCache)
null
if it could not be found, optionally using the finder cache.notificationTemplateId
- the notification template IDobjectFieldId
- the object field IDuseFinderCache
- whether to use the finder cachenull
if a matching notification template attachment could not be foundpublic static NotificationTemplateAttachment removeByNTI_OFI(long notificationTemplateId, long objectFieldId) throws NoSuchNotificationTemplateAttachmentException
notificationTemplateId
- the notification template IDobjectFieldId
- the object field IDNoSuchNotificationTemplateAttachmentException
public static int countByNTI_OFI(long notificationTemplateId, long objectFieldId)
notificationTemplateId
- the notification template IDobjectFieldId
- the object field IDpublic static void cacheResult(NotificationTemplateAttachment notificationTemplateAttachment)
notificationTemplateAttachment
- the notification template attachmentpublic static void cacheResult(java.util.List<NotificationTemplateAttachment> notificationTemplateAttachments)
notificationTemplateAttachments
- the notification template attachmentspublic static NotificationTemplateAttachment create(long notificationTemplateAttachmentId)
notificationTemplateAttachmentId
- the primary key for the new notification template attachmentpublic static NotificationTemplateAttachment remove(long notificationTemplateAttachmentId) throws NoSuchNotificationTemplateAttachmentException
notificationTemplateAttachmentId
- the primary key of the notification template attachmentNoSuchNotificationTemplateAttachmentException
- if a notification template attachment with the primary key could not be foundpublic static NotificationTemplateAttachment updateImpl(NotificationTemplateAttachment notificationTemplateAttachment)
public static NotificationTemplateAttachment findByPrimaryKey(long notificationTemplateAttachmentId) throws NoSuchNotificationTemplateAttachmentException
NoSuchNotificationTemplateAttachmentException
if it could not be found.notificationTemplateAttachmentId
- the primary key of the notification template attachmentNoSuchNotificationTemplateAttachmentException
- if a notification template attachment with the primary key could not be foundpublic static NotificationTemplateAttachment fetchByPrimaryKey(long notificationTemplateAttachmentId)
null
if it could not be found.notificationTemplateAttachmentId
- the primary key of the notification template attachmentnull
if a notification template attachment with the primary key could not be foundpublic static java.util.List<NotificationTemplateAttachment> findAll()
public static java.util.List<NotificationTemplateAttachment> findAll(int start, int end)
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
.
start
- the lower bound of the range of notification template attachmentsend
- the upper bound of the range of notification template attachments (not inclusive)public static java.util.List<NotificationTemplateAttachment> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<NotificationTemplateAttachment> orderByComparator)
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
.
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 (optionally null
)public static java.util.List<NotificationTemplateAttachment> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<NotificationTemplateAttachment> orderByComparator, boolean useFinderCache)
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
.
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 (optionally null
)useFinderCache
- whether to use the finder cachepublic static void removeAll()
public static int countAll()
public static NotificationTemplateAttachmentPersistence getPersistence()
public static void setPersistence(NotificationTemplateAttachmentPersistence persistence)