EclipseLink 2.2.0, build 'v20110202-r8913' API Reference

org.eclipse.persistence.logging
Class SessionLogEntry

java.lang.Object
  extended by org.eclipse.persistence.logging.SessionLogEntry
All Implemented Interfaces:
java.io.Serializable

public class SessionLogEntry
extends java.lang.Object
implements java.io.Serializable

SessionLogEntry is a simple container object that holds all the information pertinent to an EclipseLink logging event. It has a date/time stamp indicating when the event took place. It holds the session, thread, and accessor responsible for the event. And it holds whatever message was passed through to be logged.

See Also:
SessionLog, DefaultSessionLog, Serialized Form
Author:
Big Country
Since:
TOPLink/Java 3.0

Field Summary
protected  org.eclipse.persistence.internal.databaseaccess.Accessor connection
           
protected  java.util.Date date
           
protected  int level
           
protected  java.lang.String message
           
protected  java.lang.String nameSpace
           
protected  java.lang.Object[] parameters
           
protected  org.eclipse.persistence.internal.sessions.AbstractSession session
           
protected  boolean shouldTranslate
           
protected  java.lang.Thread thread
           
protected  java.lang.Throwable throwable
           
 
Constructor Summary
SessionLogEntry(org.eclipse.persistence.internal.sessions.AbstractSession session)
          PUBLIC: Create a new session log entry for a session
SessionLogEntry(org.eclipse.persistence.internal.sessions.AbstractSession session, int level, java.lang.String category, java.lang.Throwable throwable)
          PUBLIC: Create a new session log entry for a session, a level, a category and an exception.
SessionLogEntry(org.eclipse.persistence.internal.sessions.AbstractSession session, java.lang.String message)
          PUBLIC: Create a new session log entry for a session and a message
SessionLogEntry(org.eclipse.persistence.internal.sessions.AbstractSession session, java.lang.String message, org.eclipse.persistence.internal.databaseaccess.Accessor connection)
          PUBLIC: Create a new session log entry for a session, a message and an accessor
SessionLogEntry(org.eclipse.persistence.internal.sessions.AbstractSession session, java.lang.Throwable throwable)
          PUBLIC: Create a new session log entry for a session and an exception
SessionLogEntry(int level, org.eclipse.persistence.internal.sessions.AbstractSession session, java.lang.String message, java.lang.Object[] params, org.eclipse.persistence.internal.databaseaccess.Accessor connection, boolean shouldTranslate)
          PUBLIC: Create a new session log entry for a request level, a session, a message and an accessor.
SessionLogEntry(int level, java.lang.String category, org.eclipse.persistence.internal.sessions.AbstractSession session, java.lang.String message, java.lang.Object[] params, org.eclipse.persistence.internal.databaseaccess.Accessor connection, boolean shouldTranslate)
          PUBLIC: Create a new session log entry for a request level, a session, a message and an accessor.
 
Method Summary
 org.eclipse.persistence.internal.databaseaccess.Accessor getConnection()
          PUBLIC: Return the connection that generated the log entry.
 java.util.Date getDate()
          PUBLIC: Return the date of the log entry.
 java.lang.Throwable getException()
          PUBLIC: Return the exception that caused the log entry.
 int getLevel()
          PUBLIC: Return the request level of the log entry.
 java.lang.String getMessage()
          PUBLIC: Return the log entry's message.
 java.lang.String getNameSpace()
          PUBLIC: Return the name space of the log entry.
 java.lang.Object[] getParameters()
          PUBLIC: Return the array of parameters to the message.
 org.eclipse.persistence.internal.sessions.AbstractSession getSession()
          PUBLIC: Return the session that generated the log entry.
 java.lang.Thread getThread()
          PUBLIC: Return the thread that was active when the log entry was generated.
 boolean hasException()
          PUBLIC: Return if the log entry was for an exception.
 void setConnection(org.eclipse.persistence.internal.databaseaccess.Accessor connection)
          PUBLIC: Set the connection that generated the log entry.
 void setDate(java.util.Date date)
          PUBLIC: Set the date of the log entry.
 void setException(java.lang.Throwable throwable)
          PUBLIC: Set the exception that caused the log entry.
 void setLevel(int level)
          PUBLIC: Set the request level of the log entry.
 void setMessage(java.lang.String message)
          PUBLIC: Set the entry's message.
 void setNameSpace(java.lang.String nameSpace)
          PUBLIC: Set the name space of the log entry.
 void setParameters(java.lang.Object[] params)
          PUBLIC: Set the array of parameters to the message.
 void setSession(org.eclipse.persistence.internal.sessions.AbstractSession session)
          PUBLIC: Set the session that generated the log entry.
 void setShouldTranslate(boolean shouldTranslate)
          PUBLIC: Set if the message should be translated.
 void setThread(java.lang.Thread thread)
          PUBLIC: Set the thread that was active when the log entry was generated.
 boolean shouldTranslate()
          PUBLIC: Return if the message should be translated.
 java.lang.String toString()
          PUBLIC: Print message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

date

protected java.util.Date date

session

protected transient org.eclipse.persistence.internal.sessions.AbstractSession session

thread

protected transient java.lang.Thread thread

connection

protected transient org.eclipse.persistence.internal.databaseaccess.Accessor connection

message

protected java.lang.String message

throwable

protected java.lang.Throwable throwable

level

protected int level

nameSpace

protected java.lang.String nameSpace

parameters

protected java.lang.Object[] parameters

shouldTranslate

protected boolean shouldTranslate
Constructor Detail

SessionLogEntry

public SessionLogEntry(org.eclipse.persistence.internal.sessions.AbstractSession session)
PUBLIC: Create a new session log entry for a session


SessionLogEntry

public SessionLogEntry(org.eclipse.persistence.internal.sessions.AbstractSession session,
                       java.lang.Throwable throwable)
PUBLIC: Create a new session log entry for a session and an exception


SessionLogEntry

public SessionLogEntry(org.eclipse.persistence.internal.sessions.AbstractSession session,
                       java.lang.String message)
PUBLIC: Create a new session log entry for a session and a message


SessionLogEntry

public SessionLogEntry(org.eclipse.persistence.internal.sessions.AbstractSession session,
                       java.lang.String message,
                       org.eclipse.persistence.internal.databaseaccess.Accessor connection)
PUBLIC: Create a new session log entry for a session, a message and an accessor


SessionLogEntry

public SessionLogEntry(int level,
                       org.eclipse.persistence.internal.sessions.AbstractSession session,
                       java.lang.String message,
                       java.lang.Object[] params,
                       org.eclipse.persistence.internal.databaseaccess.Accessor connection,
                       boolean shouldTranslate)
PUBLIC: Create a new session log entry for a request level, a session, a message and an accessor.
Possible values for log level are listed in SessionLog.

See Also:
SessionLog

SessionLogEntry

public SessionLogEntry(int level,
                       java.lang.String category,
                       org.eclipse.persistence.internal.sessions.AbstractSession session,
                       java.lang.String message,
                       java.lang.Object[] params,
                       org.eclipse.persistence.internal.databaseaccess.Accessor connection,
                       boolean shouldTranslate)
PUBLIC: Create a new session log entry for a request level, a session, a message and an accessor.
Possible values for log level and category are listed in SessionLog.

See Also:
SessionLog

SessionLogEntry

public SessionLogEntry(org.eclipse.persistence.internal.sessions.AbstractSession session,
                       int level,
                       java.lang.String category,
                       java.lang.Throwable throwable)
PUBLIC: Create a new session log entry for a session, a level, a category and an exception.
Possible values for log level and category are listed in SessionLog.

See Also:
SessionLog
Method Detail

getConnection

public org.eclipse.persistence.internal.databaseaccess.Accessor getConnection()
PUBLIC: Return the connection that generated the log entry.


getDate

public java.util.Date getDate()
PUBLIC: Return the date of the log entry.


getException

public java.lang.Throwable getException()
PUBLIC: Return the exception that caused the log entry.


getMessage

public java.lang.String getMessage()
PUBLIC: Return the log entry's message.


getSession

public org.eclipse.persistence.internal.sessions.AbstractSession getSession()
PUBLIC: Return the session that generated the log entry.


getThread

public java.lang.Thread getThread()
PUBLIC: Return the thread that was active when the log entry was generated.


getLevel

public int getLevel()
PUBLIC: Return the request level of the log entry.
Possible values for log level are listed in SessionLog.

See Also:
SessionLog

getNameSpace

public java.lang.String getNameSpace()
PUBLIC: Return the name space of the log entry.
Possible values for log category (a String) are listed in SessionLog.

See Also:
SessionLog

getParameters

public java.lang.Object[] getParameters()
PUBLIC: Return the array of parameters to the message.


shouldTranslate

public boolean shouldTranslate()
PUBLIC: Return if the message should be translated.


hasException

public boolean hasException()
PUBLIC: Return if the log entry was for an exception.


setConnection

public void setConnection(org.eclipse.persistence.internal.databaseaccess.Accessor connection)
PUBLIC: Set the connection that generated the log entry.


setDate

public void setDate(java.util.Date date)
PUBLIC: Set the date of the log entry.


setException

public void setException(java.lang.Throwable throwable)
PUBLIC: Set the exception that caused the log entry.


setMessage

public void setMessage(java.lang.String message)
PUBLIC: Set the entry's message.


setSession

public void setSession(org.eclipse.persistence.internal.sessions.AbstractSession session)
PUBLIC: Set the session that generated the log entry.


setThread

public void setThread(java.lang.Thread thread)
PUBLIC: Set the thread that was active when the log entry was generated.


setLevel

public void setLevel(int level)
PUBLIC: Set the request level of the log entry.
Possible values for log level are listed in SessionLog.

See Also:
SessionLog

setNameSpace

public void setNameSpace(java.lang.String nameSpace)
PUBLIC: Set the name space of the log entry.
Possible values for log category (a String) are listed in SessionLog.

See Also:
SessionLog

setParameters

public void setParameters(java.lang.Object[] params)
PUBLIC: Set the array of parameters to the message.


setShouldTranslate

public void setShouldTranslate(boolean shouldTranslate)
PUBLIC: Set if the message should be translated.


toString

public java.lang.String toString()
PUBLIC: Print message.

Overrides:
toString in class java.lang.Object

EclipseLink 2.2.0, build 'v20110202-r8913' API Reference