indexing description: "Issue attachment object. It allows Eiffelstore to read/write issue attachments." author: "Michael Stämpfli " date: "$Date$" revision: "$Revision$" class ISSUE_ATTACHMENT inherit ANY redefine out end create make feature -- Access issue_attachment_id: INTEGER -- Auto-generated issue_id: INTEGER -- Reference to the primary key of an issue file_name: STRING -- The name of the attachment file description: STRING -- A description of the attachment file feature -- Initialization make is -- do issue_attachment_id := 0 issue_id := 0 file_name := "" description := "" end feature -- Settings set_issue_attachment_id (a_issue_attachment_id: like issue_attachment_id) is -- set the issue attachment id require value_exists: a_issue_attachment_id > 0 do issue_attachment_id := a_issue_attachment_id ensure value_set: issue_attachment_id = a_issue_attachment_id end set_issue_id (a_issue_id: like issue_id) is -- set the issue id require value_exists: a_issue_id > 0 do issue_id := a_issue_id ensure value_set: issue_id = a_issue_id end set_file_name (a_file_name: like file_name) is -- set the file name require value_exists: a_file_name /= Void and then not a_file_name.is_empty do file_name := a_file_name ensure value_set: file_name = a_file_name end set_description (a_description: like description) is -- set the description require value_exists: a_description /= Void and then not a_description.is_empty do description := a_description ensure value_set: description = a_description end feature -- Output out: STRING is -- do Result := "" Result.append (issue_attachment_id.out + "%N") Result.append (issue_id.out + "%N") Result.append (file_name + "%N") Result.append (description + "%N") end end