Class PrivateMessageDao
- java.lang.Object
-
- org.apache.openmeetings.db.dao.user.PrivateMessageDao
-
- All Implemented Interfaces:
IDataProviderDao<PrivateMessage>
@Repository @Transactional public class PrivateMessageDao extends Object implements IDataProviderDao<PrivateMessage>
-
-
Constructor Summary
Constructors Constructor Description PrivateMessageDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LongaddPrivateMessage(String subject, String message, User from, User to, User owner, boolean isContactRequest, Long userContactId)longcount()Count the number of instances ofIDataProviderDaoLongcount(Long ownerId, Long folderId, String search)longcount(String search)Count the number of instances ofIDataProviderDaointdelete(Collection<Long> ids)voiddelete(PrivateMessage entity, Long userId)Delete an instance ofIDataProviderDaoList<PrivateMessage>get(long first, long count)Get a list of instances ofIDataProviderDaoPrivateMessageget(Long id)Get an instance of anIDataProviderDaoList<PrivateMessage>get(Long ownerId, Long folderId, String search, String orderBy, boolean asc, long start, long max)List<PrivateMessage>get(String search, long start, long count, String order)Get a list of instances ofIDataProviderDaoList<PrivateMessage>getByRoom(Long roomId)intmoveMailsToFolder(Collection<Long> ids, Long folderId)PrivateMessageupdate(PrivateMessage entity, Long userId)Update an instance ofIDataProviderDaointupdateReadStatus(Collection<Long> ids, Boolean isRead)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.openmeetings.db.dao.IDataProviderDao
get
-
-
-
-
Method Detail
-
addPrivateMessage
public Long addPrivateMessage(String subject, String message, User from, User to, User owner, boolean isContactRequest, Long userContactId)
-
get
public List<PrivateMessage> get(long first, long count)
Description copied from interface:IDataProviderDaoGet a list of instances ofIDataProviderDao- Specified by:
getin interfaceIDataProviderDao<PrivateMessage>- Parameters:
first- - the start to range to retrievecount- - maximum instance count to retrieve- Returns:
- list of instances in the range specified
-
get
public PrivateMessage get(Long id)
Description copied from interface:IDataProviderDaoGet an instance of anIDataProviderDao- Specified by:
getin interfaceIDataProviderDao<PrivateMessage>- Parameters:
id- - id of instance to retrieve- Returns:
- instance with the id gived
-
update
public PrivateMessage update(PrivateMessage entity, Long userId)
Description copied from interface:IDataProviderDaoUpdate an instance ofIDataProviderDao- Specified by:
updatein interfaceIDataProviderDao<PrivateMessage>- Parameters:
entity- - entity to be updateduserId- - user performed update- Returns:
- - updated entity
-
get
public List<PrivateMessage> get(Long ownerId, Long folderId, String search, String orderBy, boolean asc, long start, long max)
-
updateReadStatus
public int updateReadStatus(Collection<Long> ids, Boolean isRead)
-
moveMailsToFolder
public int moveMailsToFolder(Collection<Long> ids, Long folderId)
-
delete
public int delete(Collection<Long> ids)
-
getByRoom
public List<PrivateMessage> getByRoom(Long roomId)
-
get
public List<PrivateMessage> get(String search, long start, long count, String order)
Description copied from interface:IDataProviderDaoGet a list of instances ofIDataProviderDao- Specified by:
getin interfaceIDataProviderDao<PrivateMessage>- Parameters:
search- - string search criteria to filter entitiesstart- - the start to range to retrievecount- - maximum instance count to retrieveorder- - column and sort order- Returns:
- list of instances in the range specified
-
count
public long count()
Description copied from interface:IDataProviderDaoCount the number of instances ofIDataProviderDao- Specified by:
countin interfaceIDataProviderDao<PrivateMessage>- Returns:
- count of instances
-
count
public long count(String search)
Description copied from interface:IDataProviderDaoCount the number of instances ofIDataProviderDao- Specified by:
countin interfaceIDataProviderDao<PrivateMessage>- Parameters:
search- - string search criteria to filter entities- Returns:
- count of instances satisfying given search criteria
-
delete
public void delete(PrivateMessage entity, Long userId)
Description copied from interface:IDataProviderDaoDelete an instance ofIDataProviderDao- Specified by:
deletein interfaceIDataProviderDao<PrivateMessage>- Parameters:
entity- - entity to be deleteduserId- - user performed delete
-
-