Class JsonJournal.Entry

java.lang.Object
com.ultikits.ultitools.interfaces.impl.data.json.JsonJournal.Entry
Enclosing class:
JsonJournal

static final class JsonJournal.Entry extends Object
One change of a record: an entity file to write with its after-image, or to delete. The table name and the key are single path segments, so the entity file is always <identity root>/<table>/<key>.json and nothing is written outside that directory.
  • Field Details

    • table

      private final String table
    • key

      private final String key
    • afterImage

      private final String afterImage
  • Constructor Details

  • Method Details

    • put

      static JsonJournal.Entry put(String table, Object key, String afterImage)
      Parameters:
      table - the table directory's name
      key - the entity's key; a non-string key is written in its string form
      afterImage - the entity's JSON, written to the file as is
    • delete

      static JsonJournal.Entry delete(String table, Object key)
    • checkTable

      private static String checkTable(String table)
    • checkKey

      private static String checkKey(String key)
    • checkSegment

      private static String checkSegment(String what, String value)
    • table

      String table()
    • key

      String key()
    • afterImage

      String afterImage()
      The entity's JSON for a put; null for a delete.
    • isDelete

      boolean isDelete()
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object