* a <tt>SchedulePriority</tt> object; cannot be null.
* @throws NullPointerException
* if <tt>priority</tt> is null.
*/
public void setPriority(SchedulePriority priority) {
SchedulePriority old = getPriority();
// Always call setProperty, even if the new priority is identical
// to the old one. This is to make sure that the key-value pairs
// get created in the case where this is the first time this method
// is called and priority is the default priority.
setProperty(PRIORITY_PROPERTY, String.valueOf(priority.getId()));