UpdateCriteria

public class UpdateCriteria

Maintains the fields of alert to be updated and the new values for the them

Constructors

UpdateCriteria

public UpdateCriteria()

Methods

data

public UpdateCriteria data(Map<String, String> newData)

Marks that data field of alert is to be updated and stores the new value

Parameters:
  • newData – New property => value pairs to be added / updated to the data field of alert
Returns:

Instance with the current criterion added to it.

description

public UpdateCriteria description(String newDescription)

Marks that description field of alert is to be updated and stores the new value

Parameters:
  • newDescription – New value for the description field of alert
Returns:

Instance with the current criterion added to it.

getAll

public Map<UpdateCriterion, Object> getAll()

Gets all the update criteria that have been added so far

Returns:A map with criterion type as key and new value for the field as value

name

public UpdateCriteria name(String newName)

Marks that name field of alert is to be updated and stores the new value

Parameters:
  • newName – New value for the name field of alert
Returns:

Instance with the current criterion added to it.

priority

public UpdateCriteria priority(int newPriority)

Marks that priority field of alert is to be updated and stores the new value

Parameters:
  • newPriority – New value for the priority field of alert
Returns:

Instance with the current criterion added to it.

status

public UpdateCriteria status(AlertStatus newStatus)

Marks that status field of alert is to be updated and stores the new value

Parameters:
  • newStatus – New value for the status field of alert
Returns:

Instance with the current criterion added to it.

toString

public String toString()