note description: "Class which allows EiffelStore to retrieve/store% %the content relative to a column of the table USER" class USER inherit ANY redefine out end create make feature -- Access user_id: INTEGER -- Auto-generated. name: STRING -- Auto-generated. pass: STRING -- Auto-generated. email: STRING -- Auto-generated. -- user_key: STRING -- -- Auto-generated. disabled: STRING -- Auto-generated. feature -- Initialization make do user_id := 0 name := "" pass := "" email := "" -- Disabled user_key because of EiffelStore error to insert NULL if "" is inserted -- user_key := "" disabled := "false" end feature -- Settings set_user_id (a_user_id: like user_id) --Set the value of user_id require value_exists: a_user_id > 0 do user_id := a_user_id ensure user_id_set: a_user_id = user_id end set_name (a_name: like name) --Set the value of name require value_exists: a_name /= Void do name := a_name ensure name_set: a_name = name end set_pass (a_pass: like pass) --Set the value of pass require value_exists: a_pass /= Void do pass := a_pass ensure pass_set: a_pass = pass end set_email (a_email: like email) --Set the value of email require value_exists: a_email /= Void do email := a_email ensure email_set: a_email = email end -- set_user_key (a_user_key: like user_key) is -- --Set the value of user_key -- require -- value_exist: a_user_key /= Void -- do -- user_key := a_user_key -- ensure -- user_key_set: a_user_key = user_key -- end set_disabled (a_disabled: like disabled) --Set the value of disabled require value_exist: a_disabled /= Void do disabled := a_disabled ensure disabled_set: a_disabled = disabled end feature -- Output out: STRING do Result := "" Result.append (user_id.out + "%N") Result.append (name.out + "%N") Result.append (pass.out + "%N") Result.append (email.out + "%N") -- Result.append (user_key.out + "%N") Result.append (disabled.out + "%N") end end -- class USER