toolbox.services.util.logging.beans
Class LogMessage

Package class diagram package LogMessage
java.lang.Object
  extended by toolbox.services.util.logging.beans.LogMessage
All Implemented Interfaces:
java.io.Serializable, DaoBean, DaoBeanEx

public class LogMessage
extends java.lang.Object
implements DaoBeanEx, java.io.Serializable

Java Bean representing a log message.

LogMessage bean generated by the Toolbox Bean Generator.

This bean implements the DaoBeanEx interface that allows it to be persisted by sub-class instances of the toolbox.services.dao.DaoService class. In addition DaoBeanEx implementations provide metadata on the mapping and property types.

See Also:
Serialized Form

Constructor Summary
LogMessage()
          Default constructor to initialise the internal Maps for storing bean properties, mappings and types.
 
Method Summary
static LogMessage create(java.util.Map map)
          Create a new LogMessage bean instance using the properties in the given Map as the values of the bean properties.
 java.lang.String getDetail1()
          Return the detail1 property.
 java.lang.String getDetail2()
          Return the detail2 property.
 java.lang.String getDetail3()
          Return the detail3 property.
 java.lang.String getDetail4()
          Return the detail4 property.
 java.lang.String getDetail5()
          Return the detail5 property.
 java.lang.String getExceptionDetail()
          Return the exceptionDetail property.
 java.lang.String getLogger()
          Return the logger property.
 java.lang.String getLogLevel()
          Return the logLevel property.
 java.util.Map getMap()
          Return the Map containing the bean properties.
 java.lang.String getMapping(java.lang.String prop)
          Return the mapped value for the provided property name.
 java.util.Map getMappings()
          Return the Map containing the property mappings.
 java.lang.Class getMappingType(java.lang.String mapping)
          Return the type of the provided mapping.
 java.util.Map getMappingTypes()
          Return the mapping types.
 java.lang.Class getPropertyType(java.lang.String prop)
          Return the type of the provided property.
 java.util.Map getPropertyTypes()
          Return the property types.
 java.lang.String getSourceComponent()
          Return the sourceComponent property.
 java.lang.String getSourceOperation()
          Return the sourceOperation property.
 java.lang.String getThread()
          Return the thread property.
 java.lang.Long getTimeStamp()
          Return the timeStamp property.
 void setDetail1(java.lang.String detail1)
          Set the detail1 property.
 void setDetail2(java.lang.String detail2)
          Set the detail2 property.
 void setDetail3(java.lang.String detail3)
          Set the detail3 property.
 void setDetail4(java.lang.String detail4)
          Set the detail4 property.
 void setDetail5(java.lang.String detail5)
          Set the detail5 property.
 void setExceptionDetail(java.lang.String exceptionDetail)
          Set the exceptionDetail property.
 void setLogger(java.lang.String logger)
          Set the logger property.
 void setLogLevel(java.lang.String logLevel)
          Set the logLevel property.
 void setMap(java.util.Map map)
          Set the Map containing the bean properties.
 void setSourceComponent(java.lang.String sourceComponent)
          Set the sourceComponent property.
 void setSourceOperation(java.lang.String sourceOperation)
          Set the sourceOperation property.
 void setThread(java.lang.String thread)
          Set the thread property.
 void setTimeStamp(java.lang.Long timeStamp)
          Set the timeStamp property.
 java.lang.String toString()
          Return a String representation of this DaoBean instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LogMessage

public LogMessage()
Default constructor to initialise the internal Maps for storing bean properties, mappings and types.

Method Detail

setLogLevel

public void setLogLevel(java.lang.String logLevel)
Set the logLevel property.

Parameters:
logLevel - New value of the logLevel property.

getLogLevel

public java.lang.String getLogLevel()
Return the logLevel property.

Returns:
String containinig the value of the logLevel property.

setLogger

public void setLogger(java.lang.String logger)
Set the logger property.

Parameters:
logger - New value of the logger property.

getLogger

public java.lang.String getLogger()
Return the logger property.

Returns:
String containinig the value of the logger property.

setTimeStamp

public void setTimeStamp(java.lang.Long timeStamp)
Set the timeStamp property.

Parameters:
timeStamp - New value of the timeStamp property.

getTimeStamp

public java.lang.Long getTimeStamp()
Return the timeStamp property.

Returns:
Long containinig the value of the timeStamp property.

setThread

public void setThread(java.lang.String thread)
Set the thread property.

Parameters:
thread - New value of the thread property.

getThread

public java.lang.String getThread()
Return the thread property.

Returns:
String containinig the value of the thread property.

setSourceComponent

public void setSourceComponent(java.lang.String sourceComponent)
Set the sourceComponent property.

Parameters:
sourceComponent - New value of the sourceComponent property.

getSourceComponent

public java.lang.String getSourceComponent()
Return the sourceComponent property.

Returns:
String containinig the value of the sourceComponent property.

setSourceOperation

public void setSourceOperation(java.lang.String sourceOperation)
Set the sourceOperation property.

Parameters:
sourceOperation - New value of the sourceOperation property.

getSourceOperation

public java.lang.String getSourceOperation()
Return the sourceOperation property.

Returns:
String containinig the value of the sourceOperation property.

setDetail1

public void setDetail1(java.lang.String detail1)
Set the detail1 property.

Parameters:
detail1 - New value of the detail1 property.

getDetail1

public java.lang.String getDetail1()
Return the detail1 property.

Returns:
String containinig the value of the detail1 property.

setDetail2

public void setDetail2(java.lang.String detail2)
Set the detail2 property.

Parameters:
detail2 - New value of the detail2 property.

getDetail2

public java.lang.String getDetail2()
Return the detail2 property.

Returns:
String containinig the value of the detail2 property.

setDetail3

public void setDetail3(java.lang.String detail3)
Set the detail3 property.

Parameters:
detail3 - New value of the detail3 property.

getDetail3

public java.lang.String getDetail3()
Return the detail3 property.

Returns:
String containinig the value of the detail3 property.

setDetail4

public void setDetail4(java.lang.String detail4)
Set the detail4 property.

Parameters:
detail4 - New value of the detail4 property.

getDetail4

public java.lang.String getDetail4()
Return the detail4 property.

Returns:
String containinig the value of the detail4 property.

setDetail5

public void setDetail5(java.lang.String detail5)
Set the detail5 property.

Parameters:
detail5 - New value of the detail5 property.

getDetail5

public java.lang.String getDetail5()
Return the detail5 property.

Returns:
String containinig the value of the detail5 property.

setExceptionDetail

public void setExceptionDetail(java.lang.String exceptionDetail)
Set the exceptionDetail property.

Parameters:
exceptionDetail - New value of the exceptionDetail property.

getExceptionDetail

public java.lang.String getExceptionDetail()
Return the exceptionDetail property.

Returns:
String containinig the value of the exceptionDetail property.

setMap

public void setMap(java.util.Map map)
Set the Map containing the bean properties.

Specified by:
setMap in interface DaoBean
Parameters:
map - Map containing bean properties.

getMap

public java.util.Map getMap()
Return the Map containing the bean properties.

Specified by:
getMap in interface DaoBean
Returns:
Map containing bean properties.

getMapping

public java.lang.String getMapping(java.lang.String prop)
Return the mapped value for the provided property name.

Specified by:
getMapping in interface DaoBean
Parameters:
prop - Return the mapping for this property.
Returns:
String containing the mapping for the provided property.

getMappings

public java.util.Map getMappings()
Return the Map containing the property mappings.

Specified by:
getMappings in interface DaoBean
Returns:
Map instance containing property mappings.

getMappingType

public java.lang.Class getMappingType(java.lang.String mapping)
Return the type of the provided mapping.

Specified by:
getMappingType in interface DaoBeanEx
Parameters:
mapping - String containing the mapping value.
Returns:
Class containing the mapping type.

getPropertyType

public java.lang.Class getPropertyType(java.lang.String prop)
Return the type of the provided property.

Specified by:
getPropertyType in interface DaoBeanEx
Parameters:
prop - String containing the property name.
Returns:
Class containing the property type.

getMappingTypes

public java.util.Map getMappingTypes()
Return the mapping types.

Specified by:
getMappingTypes in interface DaoBeanEx
Returns:
Map instance containing mapping types.

getPropertyTypes

public java.util.Map getPropertyTypes()
Return the property types.

Specified by:
getPropertyTypes in interface DaoBeanEx
Returns:
Map instance containing property types.

create

public static LogMessage create(java.util.Map map)
                         throws java.lang.Exception
Create a new LogMessage bean instance using the properties in the given Map as the values of the bean properties.

Property mappings are done using Java Reflection and is performed as follows:

The keys in the Map are used as the names of the bean properties. If the Map contains a key with the value name it will be translated into a method call that will invoke the setName(...) method on the target bean using the value associated with the key in the Map.

Parameters:
map - Map containing bean properties.
Returns:
LogMessage bean instance.
Throws:
java.lang.Exception - if the bean cannot be created.

toString

public java.lang.String toString()
Return a String representation of this DaoBean instance.

Overrides:
toString in class java.lang.Object
Returns:
String representation of the properties of this bean.