@ProviderType public interface AttachmentPersistence extends com.liferay.portal.kernel.service.persistence.BasePersistence<Attachment>
Caching information and settings can be found in portal.properties
com.liferay.mail.reader.service.persistence.impl.AttachmentPersistenceImpl
,
AttachmentUtil
Modifier and Type | Method and Description |
---|---|
void |
cacheResult(Attachment attachment)
Caches the attachment in the entity cache if it is enabled.
|
void |
cacheResult(java.util.List<Attachment> attachments)
Caches the attachments in the entity cache if it is enabled.
|
int |
countAll()
Returns the number of attachments.
|
int |
countByMessageId(long messageId)
Returns the number of attachments where messageId = ?.
|
Attachment |
create(long attachmentId)
Creates a new attachment with the primary key.
|
Attachment |
fetchByMessageId_First(long messageId,
com.liferay.portal.kernel.util.OrderByComparator<Attachment> orderByComparator)
Returns the first attachment in the ordered set where messageId = ?.
|
Attachment |
fetchByMessageId_Last(long messageId,
com.liferay.portal.kernel.util.OrderByComparator<Attachment> orderByComparator)
Returns the last attachment in the ordered set where messageId = ?.
|
Attachment |
fetchByPrimaryKey(long attachmentId)
Returns the attachment with the primary key or returns
null if it could not be found. |
java.util.Map<java.io.Serializable,Attachment> |
fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys) |
java.util.List<Attachment> |
findAll()
Returns all the attachments.
|
java.util.List<Attachment> |
findAll(int start,
int end)
Returns a range of all the attachments.
|
java.util.List<Attachment> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<Attachment> orderByComparator)
Returns an ordered range of all the attachments.
|
java.util.List<Attachment> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<Attachment> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the attachments.
|
Attachment |
findByMessageId_First(long messageId,
com.liferay.portal.kernel.util.OrderByComparator<Attachment> orderByComparator)
Returns the first attachment in the ordered set where messageId = ?.
|
Attachment |
findByMessageId_Last(long messageId,
com.liferay.portal.kernel.util.OrderByComparator<Attachment> orderByComparator)
Returns the last attachment in the ordered set where messageId = ?.
|
Attachment[] |
findByMessageId_PrevAndNext(long attachmentId,
long messageId,
com.liferay.portal.kernel.util.OrderByComparator<Attachment> orderByComparator)
Returns the attachments before and after the current attachment in the ordered set where messageId = ?.
|
java.util.List<Attachment> |
findByMessageId(long messageId)
Returns all the attachments where messageId = ?.
|
java.util.List<Attachment> |
findByMessageId(long messageId,
int start,
int end)
Returns a range of all the attachments where messageId = ?.
|
java.util.List<Attachment> |
findByMessageId(long messageId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<Attachment> orderByComparator)
Returns an ordered range of all the attachments where messageId = ?.
|
java.util.List<Attachment> |
findByMessageId(long messageId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<Attachment> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the attachments where messageId = ?.
|
Attachment |
findByPrimaryKey(long attachmentId)
Returns the attachment with the primary key or throws a
NoSuchAttachmentException if it could not be found. |
java.util.Set<java.lang.String> |
getBadColumnNames() |
Attachment |
remove(long attachmentId)
Removes the attachment with the primary key from the database.
|
void |
removeAll()
Removes all the attachments from the database.
|
void |
removeByMessageId(long messageId)
Removes all the attachments where messageId = ? from the database.
|
Attachment |
updateImpl(Attachment attachment) |
clearCache, clearCache, clearCache, closeSession, countWithDynamicQuery, countWithDynamicQuery, fetchByPrimaryKey, findByPrimaryKey, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, flush, getCurrentSession, getDataSource, getListeners, getModelClass, openSession, processException, registerListener, remove, remove, setDataSource, unregisterListener, update, update
java.util.List<Attachment> findByMessageId(long messageId)
messageId
- the message IDjava.util.List<Attachment> findByMessageId(long messageId, 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 and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from AttachmentModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
messageId
- the message IDstart
- the lower bound of the range of attachmentsend
- the upper bound of the range of attachments (not inclusive)java.util.List<Attachment> findByMessageId(long messageId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<Attachment> 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 and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from AttachmentModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
messageId
- the message IDstart
- the lower bound of the range of attachmentsend
- the upper bound of the range of attachments (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)java.util.List<Attachment> findByMessageId(long messageId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<Attachment> orderByComparator, boolean retrieveFromCache)
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 and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from AttachmentModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
messageId
- the message IDstart
- the lower bound of the range of attachmentsend
- the upper bound of the range of attachments (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)retrieveFromCache
- whether to retrieve from the finder cacheAttachment findByMessageId_First(long messageId, com.liferay.portal.kernel.util.OrderByComparator<Attachment> orderByComparator) throws NoSuchAttachmentException
messageId
- the message IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchAttachmentException
- if a matching attachment could not be foundAttachment fetchByMessageId_First(long messageId, com.liferay.portal.kernel.util.OrderByComparator<Attachment> orderByComparator)
messageId
- the message IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching attachment could not be foundAttachment findByMessageId_Last(long messageId, com.liferay.portal.kernel.util.OrderByComparator<Attachment> orderByComparator) throws NoSuchAttachmentException
messageId
- the message IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchAttachmentException
- if a matching attachment could not be foundAttachment fetchByMessageId_Last(long messageId, com.liferay.portal.kernel.util.OrderByComparator<Attachment> orderByComparator)
messageId
- the message IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching attachment could not be foundAttachment[] findByMessageId_PrevAndNext(long attachmentId, long messageId, com.liferay.portal.kernel.util.OrderByComparator<Attachment> orderByComparator) throws NoSuchAttachmentException
attachmentId
- the primary key of the current attachmentmessageId
- the message IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchAttachmentException
- if a attachment with the primary key could not be foundvoid removeByMessageId(long messageId)
messageId
- the message IDint countByMessageId(long messageId)
messageId
- the message IDvoid cacheResult(Attachment attachment)
attachment
- the attachmentvoid cacheResult(java.util.List<Attachment> attachments)
attachments
- the attachmentsAttachment create(long attachmentId)
attachmentId
- the primary key for the new attachmentAttachment remove(long attachmentId) throws NoSuchAttachmentException
attachmentId
- the primary key of the attachmentNoSuchAttachmentException
- if a attachment with the primary key could not be foundAttachment updateImpl(Attachment attachment)
Attachment findByPrimaryKey(long attachmentId) throws NoSuchAttachmentException
NoSuchAttachmentException
if it could not be found.attachmentId
- the primary key of the attachmentNoSuchAttachmentException
- if a attachment with the primary key could not be foundAttachment fetchByPrimaryKey(long attachmentId)
null
if it could not be found.attachmentId
- the primary key of the attachmentnull
if a attachment with the primary key could not be foundjava.util.Map<java.io.Serializable,Attachment> fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys)
fetchByPrimaryKeys
in interface com.liferay.portal.kernel.service.persistence.BasePersistence<Attachment>
java.util.List<Attachment> findAll()
java.util.List<Attachment> 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 and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from AttachmentModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
start
- the lower bound of the range of attachmentsend
- the upper bound of the range of attachments (not inclusive)java.util.List<Attachment> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<Attachment> 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 and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from AttachmentModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
start
- the lower bound of the range of attachmentsend
- the upper bound of the range of attachments (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)java.util.List<Attachment> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<Attachment> orderByComparator, boolean retrieveFromCache)
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 and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from AttachmentModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
start
- the lower bound of the range of attachmentsend
- the upper bound of the range of attachments (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)retrieveFromCache
- whether to retrieve from the finder cachevoid removeAll()
int countAll()
java.util.Set<java.lang.String> getBadColumnNames()
getBadColumnNames
in interface com.liferay.portal.kernel.service.persistence.BasePersistence<Attachment>