DatabaseCommunication
Class MessageManager

java.lang.Object
  extended byDatabaseCommunication.MessageManager

public class MessageManager
extends java.lang.Object

Author:
student This class manages communication of Message data with application database.

Constructor Summary
MessageManager()
          This is the constructor for MessageManager.java
 
Method Summary
static long addDays(java.util.Date startDate, int numberOfDays)
          Method: addDays This method is being used for
 void deleteMessageData(MessageData data)
          This method is being used to delete Message Data
 void insertMessageData(MessageData data)
          This method is being used to insert Message data
 MessageData[] selectAllMessages(java.lang.String id)
          This method is being used to select all the messages for the user in a particular order.
 java.lang.String stripTrailing(java.lang.String value)
          This method is being used stripping string
 void updateMessageData(MessageData data)
          This method is being used to update Message Data
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageManager

public MessageManager()
This is the constructor for MessageManager.java

Method Detail

selectAllMessages

public MessageData[] selectAllMessages(java.lang.String id)
                                throws java.lang.Exception
This method is being used to select all the messages for the user in a particular order.

Parameters:
id - user the message is for
Returns:
array of selected messages.
Throws:
java.lang.Exception - MessageData[]

stripTrailing

public java.lang.String stripTrailing(java.lang.String value)
This method is being used stripping string

Parameters:
value - String which is being stripped
Returns:
String

insertMessageData

public void insertMessageData(MessageData data)
                       throws java.lang.Exception
This method is being used to insert Message data

Parameters:
data - Message Data to be inserted.
Throws:
java.lang.Exception - void

updateMessageData

public void updateMessageData(MessageData data)
                       throws java.lang.Exception
This method is being used to update Message Data

Parameters:
data - Message Data being updated
Throws:
java.lang.Exception - void

deleteMessageData

public void deleteMessageData(MessageData data)
                       throws java.lang.Exception
This method is being used to delete Message Data

Parameters:
data -
Throws:
java.lang.Exception - void

addDays

public static long addDays(java.util.Date startDate,
                           int numberOfDays)
Method: addDays This method is being used for

Parameters:
startDate -
numberOfDays -
Returns:
long