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.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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DFUpdateInfo
create(java.lang.Object schemaHandle, java.lang.Comparable<?> id, boolean duplicate)
static DFUpdateInfo
createError(java.lang.Throwable ex)
java.lang.Throwable
getException()
java.lang.Comparable<?>
getId()
boolean
isDuplicate()
java.lang.String
toString()
-
-
-
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
null
for no exception.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-