UpsertResult Class

Represents the result of an upsert operation on an external object record. The result is returned by the upsertRows method of the DataSource.Connection class.

DataSource

An upsert operation on external object records generates an array of objects of type DataSource.UpsertResult. Its methods create result records that indicate whether the upsert operation succeeded or failed.

The following are properties for UpsertResult.

  • errorMessage

    The error message that’s generated by a failed upsert operation.

  • externalId

    The unique identifier of a row that represents an external object record to upsert.

  • success

    Indicates whether a delete operation succeeded or failed.

The error message that’s generated by a failed upsert operation.

public String errorMessage {get; set;}

Type: String

The unique identifier of a row that represents an external object record to upsert.

public String externalId {get; set;}

Type: String

Indicates whether a delete operation succeeded or failed.

public Boolean success {get; set;}

Type: Boolean

The following are methods for UpsertResult.

  • equals(obj)

    Maintains the integrity of lists of type UpsertResult by determining the equality of external object records in a list. This method is dynamic and is based on the equals method in Java.

  • failure(externalId, errorMessage)

    Creates an upsert result that indicates the failure of a delete request for a given external ID.

  • hashCode()

    Maintains the integrity of lists of type UpsertResult by determining the uniqueness of the external object records in a list.

  • success(externalId)

    Creates a delete result that indicates the successful completion of an upsert request for a given external ID.

Maintains the integrity of lists of type UpsertResult by determining the equality of external object records in a list. This method is dynamic and is based on the equals method in Java.

public Boolean equals(Object obj)

  • obj:

    Type:

    Object External object whose key is to be validated.

Type: Boolean

Creates an upsert result that indicates the failure of a delete request for a given external ID.

public static DataSource.UpsertResult failure(String externalId, String errorMessage)

  • externalId:

    Type: String The external ID of the record to upsert.

  • errorMessage:

    Type: String

    The reason the upsert operation failed.

Type: DataSource.UpsertResult

Status result for the upsert operation.

Maintains the integrity of lists of type UpsertResult by determining the uniqueness of the external object records in a list.

public Integer hashCode()

Type: Integer

Creates a delete result that indicates the successful completion of an upsert request for a given external ID.

public static DataSource.UpsertResult success(String externalId)

  • externalId:

    Type: String

    The unique identifier of the external object record to upsert.

Type: DataSource.UpsertResult

Status result of the upsert operation for the external object record with the given external ID.