Package com.axelor.mail.db.repo
Class MailMessageRepository
- java.lang.Object
-
- com.axelor.db.JpaRepository<MailMessage>
-
- com.axelor.mail.db.repo.MailMessageRepository
-
- All Implemented Interfaces:
Repository<MailMessage>
public class MailMessageRepository extends JpaRepository<MailMessage>
-
-
Field Summary
-
Fields inherited from class com.axelor.db.JpaRepository
modelClass
-
-
Constructor Summary
Constructors Constructor Description MailMessageRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
count(Model related)
long
countBy(String type, Model related)
Map<String,Object>
details(MailMessage message)
void
email(MailMessage message)
List<MailMessage>
findAll(Model related, int limit, int offset)
List<MetaAttachment>
findAttachments(MailMessage message)
List<MailMessage>
findBy(String type, Model related, int limit, int offset)
Model
findRelated(MailMessage message)
protected String
generateMessageId(MailMessage entity)
MailMessage
post(Model entity, MailMessage message, List<MetaFile> files)
void
remove(MailMessage message)
Remove the given entity.MailMessage
save(MailMessage entity)
Save the given entity.
-
-
-
Method Detail
-
findAll
public List<MailMessage> findAll(Model related, int limit, int offset)
-
findBy
public List<MailMessage> findBy(String type, Model related, int limit, int offset)
-
count
public long count(Model related)
-
findRelated
public Model findRelated(MailMessage message)
-
remove
public void remove(MailMessage message)
Description copied from interface:Repository
Remove the given entity.- Specified by:
remove
in interfaceRepository<MailMessage>
- Overrides:
remove
in classJpaRepository<MailMessage>
- Parameters:
message
- the entity object
-
generateMessageId
protected String generateMessageId(MailMessage entity)
-
save
public MailMessage save(MailMessage entity)
Description copied from interface:Repository
Save the given entity.Depending on the implementation, it may return same entity or a copy of it. For example JPA implementation may return a copy if the given entity can't be managed.
- Specified by:
save
in interfaceRepository<MailMessage>
- Overrides:
save
in classJpaRepository<MailMessage>
- Parameters:
entity
- the entity object to save- Returns:
- an instance of the entity with saved state
-
email
public void email(MailMessage message)
-
post
public MailMessage post(Model entity, MailMessage message, List<MetaFile> files)
-
findAttachments
public List<MetaAttachment> findAttachments(MailMessage message)
-
details
public Map<String,Object> details(MailMessage message)
-
-