Package sc.db

Class StaleDataException

  • All Implemented Interfaces:
    java.io.Serializable

    public class StaleDataException
    extends java.lang.RuntimeException
    Thrown when an update fails because the version has changed or the row was removed that the update needed. TODO: would it be convenient to have a way to refresh the item, move the state in the delete/update into this object and have a method to reapply one or all properties? Would it be helpful to do a query to get the new version and new properties at the time this error occurs or should the caller, fix the transaction by doing a refresh and just re-update?
    See Also:
    Serialized Form
    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • StaleDataException

        public StaleDataException​(DBObject dbObject,
                                  long version)