Class DFUpdateInfo


  • @Immutable
    public final class DFUpdateInfo
    extends java.lang.Object
    Provides data about result of insert or update DIF operation. This object is immutable.

    TODO P2 - it is possible this object will change to support more rows inserting in one method call. Then it will keep info about more than one row. See DFEntityDataProvider update method comments.

    Author:
    Petr Hamernik
    • Method Detail

      • create

        public static DFUpdateInfo create​(java.lang.Object schemaHandle,
                                          java.lang.Comparable<?> id,
                                          boolean duplicate)
        Parameters:
        schemaHandle - The handle for the schema, which properly implements hashCode() and equals()
        id - ID of the entity that was updated.
        duplicate - whether created entry was a duplicate
        Returns:
        information describing the update
      • createError

        public static DFUpdateInfo createError​(java.lang.Throwable ex)
        Parameters:
        ex - exception during the update
        Returns:
        information describing error during the update
      • getId

        public java.lang.Comparable<?> getId()
        Returns:
        the row id
      • isDuplicate

        public boolean isDuplicate()
        Returns:
        whether the insert/update operation created duplicate entry
      • getException

        public java.lang.Throwable getException()
        Returns:
        Exception which happened during the update. Is null for no exception.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object