com.jalios.jstore
Class LogEntry

java.lang.Object
  extended by com.jalios.jstore.LogEntry
All Implemented Interfaces:
Comparable<LogEntry>
Direct Known Subclasses:
InnerLogEntry, StorableLogEntry

public abstract class LogEntry
extends Object
implements Comparable<LogEntry>

This abstract class represents a Store operation.

Version:
$Revision: 28011 $
Author:
Olivier Dedieu

Field Summary
static String REVISION
           
 
Constructor Summary
LogEntry(LogEntry entry)
          Creates a new LogEntry by cloning
LogEntry(String elementName, Map<String,String> attributes)
          Creates a new LogEntry
 
Method Summary
 int compareTo(LogEntry logEntry)
           
 boolean equals(Object other)
           
 Map<String,String> getAttributes()
          Returns the attributes of this LogEntry
 Exception getException()
          Get the value of exception.
 int getLineNumber()
          Gets the value of lineNumber.
 String getName()
          Returns the name of the element of this LogEntry
 Map<String,String> getSortedAttributeMap()
          Returns the attribute map sorted according natural ordering of String.
 Stamp getStamp()
          Returns the stamp of this LogEntry
protected  String openXMLElement()
           
 void setAttributes(Map<String,String> attributes)
          Sets the attribute map
 void setException(Exception v)
          Sets the value of exception.
 void setLineNumber(int v)
          Sets the value of lineNumber.
 void setStamp(Stamp stamp)
          Sets the stamp of this LogEntry
 String toString()
           
 String toXML()
          Returns an XML representation of this LogEntry
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values
Constructor Detail

LogEntry

public LogEntry(String elementName,
                Map<String,String> attributes)
Creates a new LogEntry

Parameters:
elementName - the name of the element
attributes - targe attributes of the entry

LogEntry

public LogEntry(LogEntry entry)
Creates a new LogEntry by cloning

Parameters:
entry - the LogEntry to clone
Method Detail

setStamp

public void setStamp(Stamp stamp)
Sets the stamp of this LogEntry

Parameters:
stamp - the stamp

getStamp

public Stamp getStamp()
Returns the stamp of this LogEntry

Returns:
the stamp

getName

public String getName()
Returns the name of the element of this LogEntry

Returns:
the name of the element

getAttributes

public Map<String,String> getAttributes()
Returns the attributes of this LogEntry

Returns:
the attributes

setAttributes

public void setAttributes(Map<String,String> attributes)
Sets the attribute map

Parameters:
attributes -
Since:
jcms-5.5.0

getLineNumber

public int getLineNumber()
Gets the value of lineNumber.

Returns:
Value of lineNumber.

setLineNumber

public void setLineNumber(int v)
Sets the value of lineNumber.

Parameters:
v - Value to assign to lineNumber.

getException

public Exception getException()
Get the value of exception.

Returns:
Value of exception.

setException

public void setException(Exception v)
Sets the value of exception.

Parameters:
v - Value to assign to exception.

getSortedAttributeMap

public Map<String,String> getSortedAttributeMap()
Returns the attribute map sorted according natural ordering of String. This method is called by toXML when writing the logEntry

Returns:
a sorted map
Since:
jcms-4.1

toXML

public String toXML()
Returns an XML representation of this LogEntry

Returns:
a String containing the XML representation
Since:
jcms-4.1

toString

public String toString()
Overrides:
toString in class Object

openXMLElement

protected String openXMLElement()

equals

public boolean equals(Object other)
Overrides:
equals in class Object

compareTo

public int compareTo(LogEntry logEntry)
Specified by:
compareTo in interface Comparable<LogEntry>


Copyright © 2001-2010 Jalios SA. All Rights Reserved.