This class defines the structure for a Keyword object. A Keyword object holds information about a Keyword within a Keyword Group.

Keyword contains the following public methods:

MethodDescription
clear() Clear all properties, resetting them to default values.
checkEpisodesAndClipsForLocks() Checks Episodes and Clips to see if a Keyword record is free of related locks
removeDuplicatesForMerge() When merging keywords, we need to remove instances of the OLD keyword that already exist in Episodes or Clips that also contain the NEW keyword. (Doing it this way reduces overhead.)
lock_record() Lock a record. If the lock is unable to be obtained, a RecordLockedError exception is raised with the username of the lock holder passed.
unlock_record() Unlock a record.
db_load_by_name() Load a record. Raise a RecordNotFound exception if record is not found in database.
db_save() Save the record to the database using Insert or Update as appropriate.
db_delete() Delete this object record from the database. Raises RecordLockedError exception if record is locked and unable to be deleted.

Keyword contains the following public properties:

PropertyDescription
keywordGroup The Keyword Group.
keyword The keyword.
definition The keyword Definition
record_lock Username of person who has locked the record (Read only).
lock_time Time of the last record lock (Read only).