get Entity
Return the changed entity, if isEntity(index) is true, otherwise throws undefined.
The {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#isCreated EntityValue.isCreated}, {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#isUpdated EntityValue.isUpdated} and {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#isDeleted EntityValue.isDeleted} properties can be accessed on the resulting entity value to determine the type of change.
- Example:
open fun showChangedEntities(changes: ChangeSet): kotlin.Unit { val n = changes.size; do { var i = 0; var first_1133 = true; L1133@ while (true) { if (first_1133) { first_1133 = false; } else { i++; } if (!(i < n)) break; if (changes.isEntity(i)) { val change = changes.getEntity(i); if (change.isCreated) { Example.show("created entity"); } else if (change.isUpdated) { Example.show("updated entity"); } else if (change.isDeleted) { Example.show("deleted entity"); } } } } while (false); }
Return
The changed entity, if isEntity(index) is true, otherwise throws undefined.
Parameters
index
From zero to size - 1.