Class PersistentEntityVersion

    • Constructor Detail

      • PersistentEntityVersion

        public PersistentEntityVersion​(long persistId,
                                       long editId)
      • PersistentEntityVersion

        public PersistentEntityVersion​(long persistId,
                                       long editId,
                                       long persistTime,
                                       long editTime,
                                       @Nullable
                                       List<String> editStackTrace)
    • Method Detail

      • getPersistId

        public long getPersistId()
        Returns id of the last persist call. Id is updated on each call persisting the entity. Changed id means that the entity was persisted since the time previous id was taken. Id can overflow, so the result can be negative. Also if there was 2 * Long.MAX_VALUE + 2 calls to persist between 2 id measurements, then persist cannot be detected.
        Returns:
        see above
      • getEditId

        public long getEditId()
        Returns id of the last edit operation. The id is updated on each edit of this entity in memory and reset to 0 on each call to persist(). A non-zero id means that entity was edited, but not yet persisted. Id can overflow, so the result can be negative. Also if there was 2 * Long.MAX_VALUE + 2 edits since last persist, then id will be 0 and edits cannot be detected.
        Returns:
        see above
      • getEditTime

        public long getEditTime()
        Returns timestamp of the last entity edit or -1 if this information is not available
        Returns:
        see above
      • getPersistTime

        public long getPersistTime()
        Returns timestamp of the last persist or -1 if this information is not available
        Returns:
        see above
      • getEditStackTrace

        @NotNull
        public List<String> getEditStackTrace()
        Returns stackTrace of the last edit operation
        Returns:
        see above