Package com.im.df.api.support
Class DFUpdateInfo
- java.lang.Object
-
- com.im.df.api.support.DFUpdateInfo
-
@Immutable public final class DFUpdateInfo extends java.lang.ObjectProvides 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
DFEntityDataProviderupdate method comments.- Author:
- Petr Hamernik
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DFUpdateInfocreate(java.lang.Object schemaHandle, java.lang.Comparable<?> id, boolean duplicate)static DFUpdateInfocreateError(java.lang.Throwable ex)java.lang.ThrowablegetException()java.lang.Comparable<?>getId()booleanisDuplicate()java.lang.StringtoString()
-
-
-
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 implementshashCode()andequals()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
nullfor no exception.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-