@ProviderType public interface MessagePersistence extends com.liferay.portal.kernel.service.persistence.BasePersistence<Message>
Caching information and settings can be found in portal.properties
com.liferay.mail.reader.service.persistence.impl.MessagePersistenceImpl
,
MessageUtil
Modifier and Type | Method and Description |
---|---|
void |
cacheResult(java.util.List<Message> messages)
Caches the messages in the entity cache if it is enabled.
|
void |
cacheResult(Message message)
Caches the message in the entity cache if it is enabled.
|
int |
countAll()
Returns the number of messages.
|
int |
countByCompanyId(long companyId)
Returns the number of messages where companyId = ?.
|
int |
countByF_R(long folderId,
long remoteMessageId)
Returns the number of messages where folderId = ? and remoteMessageId = ?.
|
int |
countByFolderId(long folderId)
Returns the number of messages where folderId = ?.
|
Message |
create(long messageId)
Creates a new message with the primary key.
|
Message |
fetchByCompanyId_First(long companyId,
com.liferay.portal.kernel.util.OrderByComparator<Message> orderByComparator)
Returns the first message in the ordered set where companyId = ?.
|
Message |
fetchByCompanyId_Last(long companyId,
com.liferay.portal.kernel.util.OrderByComparator<Message> orderByComparator)
Returns the last message in the ordered set where companyId = ?.
|
Message |
fetchByF_R(long folderId,
long remoteMessageId)
Returns the message where folderId = ? and remoteMessageId = ? or returns
null if it could not be found. |
Message |
fetchByF_R(long folderId,
long remoteMessageId,
boolean retrieveFromCache)
Returns the message where folderId = ? and remoteMessageId = ? or returns
null if it could not be found, optionally using the finder cache. |
Message |
fetchByFolderId_First(long folderId,
com.liferay.portal.kernel.util.OrderByComparator<Message> orderByComparator)
Returns the first message in the ordered set where folderId = ?.
|
Message |
fetchByFolderId_Last(long folderId,
com.liferay.portal.kernel.util.OrderByComparator<Message> orderByComparator)
Returns the last message in the ordered set where folderId = ?.
|
Message |
fetchByPrimaryKey(long messageId)
Returns the message with the primary key or returns
null if it could not be found. |
java.util.Map<java.io.Serializable,Message> |
fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys) |
java.util.List<Message> |
findAll()
Returns all the messages.
|
java.util.List<Message> |
findAll(int start,
int end)
Returns a range of all the messages.
|
java.util.List<Message> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<Message> orderByComparator)
Returns an ordered range of all the messages.
|
java.util.List<Message> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<Message> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the messages.
|
Message |
findByCompanyId_First(long companyId,
com.liferay.portal.kernel.util.OrderByComparator<Message> orderByComparator)
Returns the first message in the ordered set where companyId = ?.
|
Message |
findByCompanyId_Last(long companyId,
com.liferay.portal.kernel.util.OrderByComparator<Message> orderByComparator)
Returns the last message in the ordered set where companyId = ?.
|
Message[] |
findByCompanyId_PrevAndNext(long messageId,
long companyId,
com.liferay.portal.kernel.util.OrderByComparator<Message> orderByComparator)
Returns the messages before and after the current message in the ordered set where companyId = ?.
|
java.util.List<Message> |
findByCompanyId(long companyId)
Returns all the messages where companyId = ?.
|
java.util.List<Message> |
findByCompanyId(long companyId,
int start,
int end)
Returns a range of all the messages where companyId = ?.
|
java.util.List<Message> |
findByCompanyId(long companyId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<Message> orderByComparator)
Returns an ordered range of all the messages where companyId = ?.
|
java.util.List<Message> |
findByCompanyId(long companyId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<Message> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the messages where companyId = ?.
|
Message |
findByF_R(long folderId,
long remoteMessageId)
Returns the message where folderId = ? and remoteMessageId = ? or throws a
NoSuchMessageException if it could not be found. |
Message |
findByFolderId_First(long folderId,
com.liferay.portal.kernel.util.OrderByComparator<Message> orderByComparator)
Returns the first message in the ordered set where folderId = ?.
|
Message |
findByFolderId_Last(long folderId,
com.liferay.portal.kernel.util.OrderByComparator<Message> orderByComparator)
Returns the last message in the ordered set where folderId = ?.
|
Message[] |
findByFolderId_PrevAndNext(long messageId,
long folderId,
com.liferay.portal.kernel.util.OrderByComparator<Message> orderByComparator)
Returns the messages before and after the current message in the ordered set where folderId = ?.
|
java.util.List<Message> |
findByFolderId(long folderId)
Returns all the messages where folderId = ?.
|
java.util.List<Message> |
findByFolderId(long folderId,
int start,
int end)
Returns a range of all the messages where folderId = ?.
|
java.util.List<Message> |
findByFolderId(long folderId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<Message> orderByComparator)
Returns an ordered range of all the messages where folderId = ?.
|
java.util.List<Message> |
findByFolderId(long folderId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<Message> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the messages where folderId = ?.
|
Message |
findByPrimaryKey(long messageId)
Returns the message with the primary key or throws a
NoSuchMessageException if it could not be found. |
java.util.Set<java.lang.String> |
getBadColumnNames() |
Message |
remove(long messageId)
Removes the message with the primary key from the database.
|
void |
removeAll()
Removes all the messages from the database.
|
void |
removeByCompanyId(long companyId)
Removes all the messages where companyId = ? from the database.
|
Message |
removeByF_R(long folderId,
long remoteMessageId)
Removes the message where folderId = ? and remoteMessageId = ? from the database.
|
void |
removeByFolderId(long folderId)
Removes all the messages where folderId = ? from the database.
|
Message |
updateImpl(Message message) |
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.Map<java.io.Serializable,Message> fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys)
fetchByPrimaryKeys
in interface com.liferay.portal.kernel.service.persistence.BasePersistence<Message>
java.util.List<Message> findByCompanyId(long companyId)
companyId
- the company IDjava.util.List<Message> findByCompanyId(long companyId, 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 MessageModelImpl
. 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.
companyId
- the company IDstart
- the lower bound of the range of messagesend
- the upper bound of the range of messages (not inclusive)java.util.List<Message> findByCompanyId(long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<Message> 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 MessageModelImpl
. 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.
companyId
- the company IDstart
- the lower bound of the range of messagesend
- the upper bound of the range of messages (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)java.util.List<Message> findByCompanyId(long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<Message> 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 MessageModelImpl
. 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.
companyId
- the company IDstart
- the lower bound of the range of messagesend
- the upper bound of the range of messages (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)retrieveFromCache
- whether to retrieve from the finder cacheMessage findByCompanyId_First(long companyId, com.liferay.portal.kernel.util.OrderByComparator<Message> orderByComparator) throws NoSuchMessageException
companyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchMessageException
- if a matching message could not be foundMessage fetchByCompanyId_First(long companyId, com.liferay.portal.kernel.util.OrderByComparator<Message> orderByComparator)
companyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching message could not be foundMessage findByCompanyId_Last(long companyId, com.liferay.portal.kernel.util.OrderByComparator<Message> orderByComparator) throws NoSuchMessageException
companyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchMessageException
- if a matching message could not be foundMessage fetchByCompanyId_Last(long companyId, com.liferay.portal.kernel.util.OrderByComparator<Message> orderByComparator)
companyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching message could not be foundMessage[] findByCompanyId_PrevAndNext(long messageId, long companyId, com.liferay.portal.kernel.util.OrderByComparator<Message> orderByComparator) throws NoSuchMessageException
messageId
- the primary key of the current messagecompanyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchMessageException
- if a message with the primary key could not be foundvoid removeByCompanyId(long companyId)
companyId
- the company IDint countByCompanyId(long companyId)
companyId
- the company IDjava.util.List<Message> findByFolderId(long folderId)
folderId
- the folder IDjava.util.List<Message> findByFolderId(long folderId, 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 MessageModelImpl
. 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.
folderId
- the folder IDstart
- the lower bound of the range of messagesend
- the upper bound of the range of messages (not inclusive)java.util.List<Message> findByFolderId(long folderId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<Message> 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 MessageModelImpl
. 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.
folderId
- the folder IDstart
- the lower bound of the range of messagesend
- the upper bound of the range of messages (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)java.util.List<Message> findByFolderId(long folderId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<Message> 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 MessageModelImpl
. 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.
folderId
- the folder IDstart
- the lower bound of the range of messagesend
- the upper bound of the range of messages (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)retrieveFromCache
- whether to retrieve from the finder cacheMessage findByFolderId_First(long folderId, com.liferay.portal.kernel.util.OrderByComparator<Message> orderByComparator) throws NoSuchMessageException
folderId
- the folder IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchMessageException
- if a matching message could not be foundMessage fetchByFolderId_First(long folderId, com.liferay.portal.kernel.util.OrderByComparator<Message> orderByComparator)
folderId
- the folder IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching message could not be foundMessage findByFolderId_Last(long folderId, com.liferay.portal.kernel.util.OrderByComparator<Message> orderByComparator) throws NoSuchMessageException
folderId
- the folder IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchMessageException
- if a matching message could not be foundMessage fetchByFolderId_Last(long folderId, com.liferay.portal.kernel.util.OrderByComparator<Message> orderByComparator)
folderId
- the folder IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching message could not be foundMessage[] findByFolderId_PrevAndNext(long messageId, long folderId, com.liferay.portal.kernel.util.OrderByComparator<Message> orderByComparator) throws NoSuchMessageException
messageId
- the primary key of the current messagefolderId
- the folder IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchMessageException
- if a message with the primary key could not be foundvoid removeByFolderId(long folderId)
folderId
- the folder IDint countByFolderId(long folderId)
folderId
- the folder IDMessage findByF_R(long folderId, long remoteMessageId) throws NoSuchMessageException
NoSuchMessageException
if it could not be found.folderId
- the folder IDremoteMessageId
- the remote message IDNoSuchMessageException
- if a matching message could not be foundMessage fetchByF_R(long folderId, long remoteMessageId)
null
if it could not be found. Uses the finder cache.folderId
- the folder IDremoteMessageId
- the remote message IDnull
if a matching message could not be foundMessage fetchByF_R(long folderId, long remoteMessageId, boolean retrieveFromCache)
null
if it could not be found, optionally using the finder cache.folderId
- the folder IDremoteMessageId
- the remote message IDretrieveFromCache
- whether to retrieve from the finder cachenull
if a matching message could not be foundMessage removeByF_R(long folderId, long remoteMessageId) throws NoSuchMessageException
folderId
- the folder IDremoteMessageId
- the remote message IDNoSuchMessageException
int countByF_R(long folderId, long remoteMessageId)
folderId
- the folder IDremoteMessageId
- the remote message IDvoid cacheResult(Message message)
message
- the messagevoid cacheResult(java.util.List<Message> messages)
messages
- the messagesMessage create(long messageId)
messageId
- the primary key for the new messageMessage remove(long messageId) throws NoSuchMessageException
messageId
- the primary key of the messageNoSuchMessageException
- if a message with the primary key could not be foundMessage findByPrimaryKey(long messageId) throws NoSuchMessageException
NoSuchMessageException
if it could not be found.messageId
- the primary key of the messageNoSuchMessageException
- if a message with the primary key could not be foundMessage fetchByPrimaryKey(long messageId)
null
if it could not be found.messageId
- the primary key of the messagenull
if a message with the primary key could not be foundjava.util.List<Message> findAll()
java.util.List<Message> 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 MessageModelImpl
. 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 messagesend
- the upper bound of the range of messages (not inclusive)java.util.List<Message> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<Message> 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 MessageModelImpl
. 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 messagesend
- the upper bound of the range of messages (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)java.util.List<Message> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<Message> 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 MessageModelImpl
. 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 messagesend
- the upper bound of the range of messages (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<Message>