org.modeshape.jcr.journal

## Class JournalRecord

- java.lang.Object
- - org.modeshape.jcr.journal.JournalRecord

- All Implemented Interfaces:
    Serializable, Iterable<Change>

      public final class JournalRecord
      extends Object
      implements Serializable, Iterable<Change>

  A record stored by the `LocalJournal`
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `JournalRecord(ChangeSet content)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Set<NodeKey>` | `changedNodes()` Returns the set of keys for the nodes which has been changed.
    `boolean` | `equals(Object o)`
    `ChangeSet` | `getChangeSet()` Returns the underlying change set.
    `long` | `getChangeTimeMillis()` Returns the time of the changeset, in UTC millis.
    `String` | `getJournalId()` Returns the identifier of the local `ChangeJournal` instance.
    `String` | `getProcessKey()` Get the key of the process in which the changes were made.
    `String` | `getRepositoryKey()` Get the key of the repository in which the changes were made.
    `long` | `getTimeBasedKey()`
    `String` | `getUserId()` Returns the ID (username) of the user which performed the changes.
    `String` | `getWorkspaceName()` Get the name of the workspace in which the changes were made.
    `int` | `hashCode()`
    `Iterator<Change>` | `iterator()`
    `String` | `toString()`
    `protected JournalRecord` | `withTimeBasedKey(long timeBasedKey)`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### JournalRecord

          protected JournalRecord(ChangeSet content)

  - ### Method Detail

    - #### withTimeBasedKey

          protected JournalRecord withTimeBasedKey(long timeBasedKey)

    - #### getTimeBasedKey

          public long getTimeBasedKey()

      Returns:
        the time when this record was created

    - #### getProcessKey

          public String getProcessKey()

      Get the key of the process in which the changes were made.
      Returns:
        the process key; never null
      See Also:
        `ChangeSet.getProcessKey()`

    - #### getRepositoryKey

          public String getRepositoryKey()

      Get the key of the repository in which the changes were made.
      Returns:
        the repository key; never null
      See Also:
        `ChangeSet.getRepositoryKey()`

    - #### getUserId

          public String getUserId()

      Returns the ID (username) of the user which performed the changes.
      Returns:
        a `String` representing the username; may be `null` in the case of changes performed "by the system.
      See Also:
        `ChangeSet.getUserId()`

    - #### getWorkspaceName

          public String getWorkspaceName()

      Get the name of the workspace in which the changes were made.
      Returns:
        the workspace name; may be null only when workspaces are added or removed
      See Also:
        `ChangeSet.getWorkspaceName()`

    - #### getChangeTimeMillis

          public long getChangeTimeMillis()

      Returns the time of the changeset, in UTC millis.
      Returns:
        a timestamp
      See Also:
        `ChangeSet.getTimestamp()`

    - #### changedNodes

          public Set<NodeKey> changedNodes()

      Returns the set of keys for the nodes which has been changed.
      Returns:
        the set of changed node keys; never `null`
      See Also:
        `ChangeSet.changedNodes()`

    - #### getJournalId

          public String getJournalId()

      Returns the identifier of the local `ChangeJournal` instance.
      Returns:
        either a non-null `String` if journaling is enabled, or `null` if journaling isn't enabled.
      See Also:
        `ChangeSet.getJournalId()`

    - #### getChangeSet

          public ChangeSet getChangeSet()

      Returns the underlying change set.
      Returns:
        `ChangeSet` instance; never null

    - #### iterator

          public Iterator<Change> iterator()

      Specified by:
        `iterator` in interface `Iterable<Change>`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.