net.sf.xbus.admin.html
Class ReadJournal

java.lang.Object
  extended by net.sf.xbus.admin.html.ReadJournal

public class ReadJournal
extends java.lang.Object

ReadJournal reads information about the activities of the middleware from the database and handles the information which is stored in the database-table journal. An instance of DBConnection is used for handling the database-connection.


Constructor Summary
ReadJournal()
           
 
Method Summary
 int getErrorcode()
          Gets the error code from the journal
 java.lang.String getErrormessage()
          Gets the error message from the journal
 java.lang.String getFunction()
          Gets the function from the journal
 java.lang.String getMessageId()
          Gets the message id from the journal
 int getNumber()
          Gets the number from the journal
 java.lang.String getRequestMessage()
          Gets the request message from the journal
 java.lang.String getRequestTimestamp()
          Gets the request timestamp from the journal
 java.lang.String getResponseMessage()
          Gets the response message from the journal
 java.lang.String getResponseTimestamp()
          Gets the response timestamp from the journal
 java.lang.String getReturncode()
          Gets the return code from the journal
 java.lang.String getSystem()
          Gets the system from the journal
 char getType()
          Gets the type of the message from the journal
static java.util.List readSelected(java.util.HashMap selectionMap, java.lang.String orderBy, java.lang.String sorting)
          readSelected(HashMap, String, String) builds the SQL statement, connects to the database and executes it.
 void setErrorcode(int errorcode)
          Allows you to set the error code
 void setErrormessage(java.lang.String errormessage)
          Allows you to set the error message
 void setFunction(java.lang.String function)
          Allows you to set the function
 void setMessageId(java.lang.String messageId)
          Allows you to set the message id
 void setNumber(int number)
          Allows you to set the number in the journal
 void setRequestMessage(java.lang.String requestMessage)
          Allows you to set the request message
 void setRequestTimestamp(java.lang.String requestTimestamp)
          Allows you to set the request timestamp
 void setResponseMessage(java.lang.String responseMessage)
           
 void setResponseTimestamp(java.lang.String responseTimestamp)
          Allows you to set the response timestamp
 void setReturncode(java.lang.String returncode)
          Allows you to set the returncode
 void setSystem(java.lang.String system)
          Allows you to set the system
 void setType(char type)
          Allows you to set the type of the message
 java.lang.String toString()
          Gets all necessary information from the journal as one String in the following format: number | messageId | function | type | system | requestTimestamp | ResponseTimestamp | Returncode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReadJournal

public ReadJournal()
Method Detail

getNumber

public int getNumber()
Gets the number from the journal


setNumber

public void setNumber(int number)
Allows you to set the number in the journal


getType

public char getType()
Gets the type of the message from the journal


setType

public void setType(char type)
Allows you to set the type of the message


getSystem

public java.lang.String getSystem()
Gets the system from the journal


setSystem

public void setSystem(java.lang.String system)
Allows you to set the system


getFunction

public java.lang.String getFunction()
Gets the function from the journal


setFunction

public void setFunction(java.lang.String function)
Allows you to set the function


getMessageId

public java.lang.String getMessageId()
Gets the message id from the journal


setMessageId

public void setMessageId(java.lang.String messageId)
Allows you to set the message id


getRequestMessage

public java.lang.String getRequestMessage()
Gets the request message from the journal


setRequestMessage

public void setRequestMessage(java.lang.String requestMessage)
Allows you to set the request message


getRequestTimestamp

public java.lang.String getRequestTimestamp()
Gets the request timestamp from the journal


setRequestTimestamp

public void setRequestTimestamp(java.lang.String requestTimestamp)
Allows you to set the request timestamp


getResponseMessage

public java.lang.String getResponseMessage()
Gets the response message from the journal


setResponseMessage

public void setResponseMessage(java.lang.String responseMessage)

getResponseTimestamp

public java.lang.String getResponseTimestamp()
Gets the response timestamp from the journal


setResponseTimestamp

public void setResponseTimestamp(java.lang.String responseTimestamp)
Allows you to set the response timestamp


getReturncode

public java.lang.String getReturncode()
Gets the return code from the journal


setReturncode

public void setReturncode(java.lang.String returncode)
Allows you to set the returncode


getErrorcode

public int getErrorcode()
Gets the error code from the journal


setErrorcode

public void setErrorcode(int errorcode)
Allows you to set the error code


getErrormessage

public java.lang.String getErrormessage()
Gets the error message from the journal


setErrormessage

public void setErrormessage(java.lang.String errormessage)
Allows you to set the error message


readSelected

public static java.util.List readSelected(java.util.HashMap selectionMap,
                                          java.lang.String orderBy,
                                          java.lang.String sorting)
                                   throws XException
readSelected(HashMap, String, String) builds the SQL statement, connects to the database and executes it. All data from the ResultSet strore erst in the ReadJournal object and then in the List.

Parameters:
selectionMap - - HashMap with items should be selected
orderBy - - String (by wich data should be ordered)
sorting - -String (descending or not)
Returns:
List with the ReadJournal objects
Throws:
XException

toString

public java.lang.String toString()
Gets all necessary information from the journal as one String in the following format:
 number | messageId | function | type | system | requestTimestamp
                | ResponseTimestamp | Returncode
 

Overrides:
toString in class java.lang.Object
Returns:
String