SFRMMessageDAO

public interface SFRMMessageDAO extends DAO

The Interface of SFRM message dao. Creation Date: 3/10/2006

Author:Twinsen Tsang

Methods

findMessageByMessageBoxAndPartnershipIdAndStatus

public List findMessageByMessageBoxAndPartnershipIdAndStatus(String messageBox, String partnershipId, String status)

Find a list of message record according to the message box and partnership id and status.

Parameters:
  • messageBox – The message box of the message.
  • partnershipId – The partnership id of the message.
  • status – The status of the message.
Throws:
Returns:

a list of message record the satisfy this condition.

findMessageByMessageBoxAndStatus

public List findMessageByMessageBoxAndStatus(String messageBox, String status)

Find a list of message record according to the message box and it’s status.

Parameters:
  • messageBox – The message box of message. it should be “INBOX” or “OUTBOX”.
  • status – The status of the message.
Throws:
Returns:

a list of message record that satisfy this condition.

findMessageByMessageIdAndBox

public SFRMMessageDVO findMessageByMessageIdAndBox(String messageId, String messageBox)

Find a message record with specified message id.

Parameters:
  • messageId – The message id of message to be found.
  • messageBox – The message box of message. it should be “INBOX” or “OUTBOX”.
Throws:
Returns:

return null if not found, otherwise a message record.

findMessageByMessageIdAndBox

public SFRMMessageDVO findMessageByMessageIdAndBox(SFRMMessageDVO message)

Find a message record with specified message record. The field “message id” and “message box” will be used for record finding.

Parameters:
  • message – The message record object to be used for searching.
Throws:
Returns:

return null if not found, otherwise a message record.

findMessageForAcknowledgement

public List findMessageForAcknowledgement(int numberOfMessage, int offset)

Find the message that is ready for requesting the acknowledgement

Parameters:
  • numberOfMessage – Number of message show in the page
  • offset – Offset of the data in the list of the search result
Throws:
Returns:

List of SFRMMessageDVO that is determined for ready to request for acknowledgement

findMessagesByHistory

public List findMessagesByHistory(SFRMMessageDVO data, int numberOfMessage, int offset)

Find messages order by descending timestamp by different criteria.

Parameters:
  • data – The message data value object carrying query criteria.
  • numberOfMessage – max no. of message in return.
  • offset – no. of starting record in return.
Throws:

findMessagesByTime

public List findMessagesByTime(int time_period, SFRMMessageDVO data, int numberOfMessage, int offset)

Find the message by the bound of certain time period

Parameters:
  • time_period – How many month before today
  • data – Criteria to search the message for
  • numberOfMessage – Number of message show in the page
  • offset – Offset of the data in the list of the search result
Throws:
Returns:

List of SFRMMessageDVO that contain the search result

findNumberOfMessagesByHistory

public int findNumberOfMessagesByHistory(SFRMMessageDVO dao)

Find number of the message in the message history by a given search criteria given by dao

Parameters:
  • dao – Search Criteria
Returns:

Number of message found