Package com.jalios.jstore
Class LogEntry
- java.lang.Object
-
- com.jalios.jstore.LogEntry
-
- All Implemented Interfaces:
java.lang.Comparable<LogEntry>
- Direct Known Subclasses:
InnerLogEntry
,StorableLogEntry
public abstract class LogEntry extends java.lang.Object implements java.lang.Comparable<LogEntry>
This abstract class represents a Store operation.- Author:
- Olivier Dedieu
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(LogEntry logEntry)
boolean
equals(java.lang.Object other)
java.util.Map<java.lang.String,java.lang.String>
getAttributes()
Returns the attributes of this LogEntryjava.lang.Exception
getException()
Get the value of exception.long
getLineNumber()
Gets the value of lineNumber.java.lang.String
getName()
Returns the name of the element of this LogEntryjava.util.Map<java.lang.String,java.lang.String>
getSortedAttributeMap()
Returns the attribute map sorted according natural ordering of String.Stamp
getStamp()
Returns the stamp of this LogEntryprotected java.lang.String
openXMLElement()
void
setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
Sets the attribute mapvoid
setException(java.lang.Exception v)
Sets the value of exception.void
setLineNumber(long v)
Sets the value of lineNumber.void
setStamp(Stamp stamp)
Sets the stamp of this LogEntryjava.lang.String
toString()
java.lang.String
toXML()
Returns an XML representation of this LogEntry
-
-
-
Constructor Detail
-
LogEntry
public LogEntry(java.lang.String elementName, java.util.Map<java.lang.String,java.lang.String> attributes)
Creates a new LogEntry- Parameters:
elementName
- the name of the elementattributes
- 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 java.lang.String getName()
Returns the name of the element of this LogEntry- Returns:
- the name of the element
-
getAttributes
public java.util.Map<java.lang.String,java.lang.String> getAttributes()
Returns the attributes of this LogEntry- Returns:
- the attributes
-
setAttributes
public void setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
Sets the attribute map- Parameters:
attributes
- the attributes- Since:
- jcms-5.5.0
-
getLineNumber
public long getLineNumber()
Gets the value of lineNumber.- Returns:
- Value of lineNumber.
-
setLineNumber
public void setLineNumber(long v)
Sets the value of lineNumber.- Parameters:
v
- Value to assign to lineNumber.
-
getException
public java.lang.Exception getException()
Get the value of exception.- Returns:
- Value of exception.
-
setException
public void setException(java.lang.Exception v)
Sets the value of exception.- Parameters:
v
- Value to assign to exception.
-
getSortedAttributeMap
public java.util.Map<java.lang.String,java.lang.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 java.lang.String toXML()
Returns an XML representation of this LogEntry- Returns:
- a String containing the XML representation
- Since:
- jcms-4.1
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
openXMLElement
protected java.lang.String openXMLElement()
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
-