Class LogEntry

java.lang.Object
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.
Author:
Olivier Dedieu
  • Constructor Details

    • 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 Details

    • 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 - 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 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>