create or replace function todo_item__new (integer,varchar,text,char,integer,date, varchar, integer)
returns integer as 'declare p_item_id alias for $1;	p_title alias for $2;p_description alias for $3;p_status alias for $4;p_creation_user alias for $5;p_due_date alias for $6;p_creation_ip alias for $7;p_context_id alias for $8;v_id integer;v_type varchar;begin v_type := ''todo_item'';v_id := acs_object__new(p_item_id,v_type,now (),p_creation_user,p_creation_ip,p_context_id::Integer,true);
insert into todo_item (item_id,title,description,status,due_date)	
values (p_item_id,p_title,p_description,p_status,p_due_date);
return v_id;
	end;'	language 'plpgsql';

create or replace function todo_item__delete (integer)
returns void as 'declare p_item_id alias for $1; begin	delete from todo_item where item_id = p_item_id; perform acs_object__delete (p_item_id);end;' language 'plpgsql';

