Class SILVERMAILMessageBeanRepository
- java.lang.Object
-
- org.silverpeas.core.persistence.datasource.repository.jpa.AbstractJpaEntityRepository<E>
-
- org.silverpeas.core.persistence.datasource.repository.jpa.BasicJpaEntityRepository<SILVERMAILMessageBean>
-
- org.silverpeas.core.notification.user.server.channel.silvermail.SILVERMAILMessageBeanRepository
-
- All Implemented Interfaces:
EntityRepository<SILVERMAILMessageBean>
,WithSaveAndFlush<SILVERMAILMessageBean>
public class SILVERMAILMessageBeanRepository extends BasicJpaEntityRepository<SILVERMAILMessageBean>
JPA repository ofSILVERMAILMessageBean
instances.- Author:
- mmoquillon
-
-
Constructor Summary
Constructors Constructor Description SILVERMAILMessageBeanRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
countByCriteria(SilvermailCriteria criteria)
Finds user notifications according to the given criteria.long
deleteAllMessagesByUserIdAndFolderId(String userId, String folderId)
Deletes all the messages of folder specified by given identifier which belong to the user represented by the given identifier.long
deleteMessagesByUserIdAndByIds(String userId, Collection<String> ids)
Deletes the messages specified by given identifiers which belong to the user represented by the given identifier.SilverpeasList<SILVERMAILMessageBean>
findByCriteria(SilvermailCriteria criteria)
Finds user notifications according to the given criteria.List<String>
getLongTextIdsOfAllMessagesByUserIdAndFolderId(String userId, String folderId)
Gets all long text ids of the messages of folder specified by given identifier which belong to the user represented by the given identifier.List<String>
getLongTextIdsOfMessagesByUserIdAndByIds(String userId, Collection<String> ids)
Gets all long text ids of the messages specified by given identifiers which belong to the user represented by the given identifier.long
markAsReadAllMessagesByUserIdAndFolderId(String userId, String folderId)
Marks as read all the messages of folder specified by given identifier which belong to the user represented by the given identifier.long
markAsReadMessagesByUserIdAndByIds(String userId, Collection<String> ids)
Marks as read the messages specified by given identifiers which belong to the user represented by the given identifier.-
Methods inherited from class org.silverpeas.core.persistence.datasource.repository.jpa.BasicJpaEntityRepository
deleteByComponentInstanceId, saveAndFlush
-
Methods inherited from class org.silverpeas.core.persistence.datasource.repository.jpa.AbstractJpaEntityRepository
contains, countByCriteria, countFromJpqlString, delete, deleteById, deleteFromJpqlQuery, deleteFromNamedQuery, findByCriteria, findByNamedQuery, findFirstByNamedQuery, flush, getAll, getById, getById, getEntityClass, getEntityManager, getFromJpqlString, getFromJpqlString, getFromNamedQuery, getFromNamedQuery, getIdentifierConverter, getMaximumItemsInClause, listFromJpqlString, listFromJpqlString, listFromJpqlString, listFromJpqlString, listFromNamedQuery, listFromNamedQuery, newNamedParameters, noParameter, save, setMaximumItemsInClause, split, streamByNamedQuery, streamByNamedQuery, streamFromJpqlString, streamFromJpqlString, updateFromJpqlQuery, updateFromNamedQuery
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.silverpeas.core.persistence.datasource.repository.EntityRepository
delete, deleteById, getById, save, save
-
-
-
-
Method Detail
-
countByCriteria
public long countByCriteria(SilvermailCriteria criteria)
Finds user notifications according to the given criteria.- Parameters:
criteria
- the user notification criteria.- Returns:
- the list corresponding to the given criteria.
-
findByCriteria
public SilverpeasList<SILVERMAILMessageBean> findByCriteria(SilvermailCriteria criteria)
Finds user notifications according to the given criteria.- Parameters:
criteria
- the user notification criteria.- Returns:
- the list corresponding to the given criteria.
-
markAsReadAllMessagesByUserIdAndFolderId
public long markAsReadAllMessagesByUserIdAndFolderId(String userId, String folderId)
Marks as read all the messages of folder specified by given identifier which belong to the user represented by the given identifier.- Parameters:
userId
- the identifier of a user.folderId
- the identifier of a folder.- Returns:
- the number of message marked as read.
-
markAsReadMessagesByUserIdAndByIds
public long markAsReadMessagesByUserIdAndByIds(String userId, Collection<String> ids)
Marks as read the messages specified by given identifiers which belong to the user represented by the given identifier.- Parameters:
userId
- the identifier of a user.ids
- the identifiers of user notifications.- Returns:
- the number of message marked as read.
-
getLongTextIdsOfAllMessagesByUserIdAndFolderId
public List<String> getLongTextIdsOfAllMessagesByUserIdAndFolderId(String userId, String folderId)
Gets all long text ids of the messages of folder specified by given identifier which belong to the user represented by the given identifier.- Parameters:
userId
- the identifier of a user.folderId
- the identifier of a folder.- Returns:
- a list of string identifier.
-
deleteAllMessagesByUserIdAndFolderId
public long deleteAllMessagesByUserIdAndFolderId(String userId, String folderId)
Deletes all the messages of folder specified by given identifier which belong to the user represented by the given identifier.- Parameters:
userId
- the identifier of a user.folderId
- the identifier of a folder.- Returns:
- the number of message deleted.
-
getLongTextIdsOfMessagesByUserIdAndByIds
public List<String> getLongTextIdsOfMessagesByUserIdAndByIds(String userId, Collection<String> ids)
Gets all long text ids of the messages specified by given identifiers which belong to the user represented by the given identifier.- Parameters:
userId
- the identifier of a user.ids
- the identifiers of user notifications.- Returns:
- a list of string identifier.
-
deleteMessagesByUserIdAndByIds
public long deleteMessagesByUserIdAndByIds(String userId, Collection<String> ids)
Deletes the messages specified by given identifiers which belong to the user represented by the given identifier.- Parameters:
userId
- the identifier of a user.ids
- the identifiers of user notifications.- Returns:
- the number of message marked as read.
-
-