text stringlengths 0 234 |
|---|
function Get_Description (Object : in Project_Ref) |
return Ada.Strings.Unbounded.Unbounded_String is |
Impl : constant Project_Access |
:= Project_Impl (Object.Get_Load_Object.all)'Access; |
begin |
return Impl.Description; |
end Get_Description; |
procedure Set_Wiki (Object : in out Project_Ref; |
Value : in AWA.Wikis.Models.Wiki_Space_Ref'Class) is |
Impl : Project_Access; |
begin |
Set_Field (Object, Impl); |
ADO.Objects.Set_Field_Object (Impl.all, 9, Impl.Wiki, Value); |
end Set_Wiki; |
function Get_Wiki (Object : in Project_Ref) |
return AWA.Wikis.Models.Wiki_Space_Ref'Class is |
Impl : constant Project_Access |
:= Project_Impl (Object.Get_Load_Object.all)'Access; |
begin |
return Impl.Wiki; |
end Get_Wiki; |
procedure Set_Owner (Object : in out Project_Ref; |
Value : in AWA.Users.Models.User_Ref'Class) is |
Impl : Project_Access; |
begin |
Set_Field (Object, Impl); |
ADO.Objects.Set_Field_Object (Impl.all, 10, Impl.Owner, Value); |
end Set_Owner; |
function Get_Owner (Object : in Project_Ref) |
return AWA.Users.Models.User_Ref'Class is |
Impl : constant Project_Access |
:= Project_Impl (Object.Get_Load_Object.all)'Access; |
begin |
return Impl.Owner; |
end Get_Owner; |
-- Copy of the object. |
procedure Copy (Object : in Project_Ref; |
Into : in out Project_Ref) is |
Result : Project_Ref; |
begin |
if not Object.Is_Null then |
declare |
Impl : constant Project_Access |
:= Project_Impl (Object.Get_Load_Object.all)'Access; |
Copy : constant Project_Access |
:= new Project_Impl; |
begin |
ADO.Objects.Set_Object (Result, Copy.all'Access); |
Copy.Copy (Impl.all); |
Copy.Version := Impl.Version; |
Copy.Name := Impl.Name; |
Copy.Create_Date := Impl.Create_Date; |
Copy.Status := Impl.Status; |
Copy.Last_Ticket := Impl.Last_Ticket; |
Copy.Update_Date := Impl.Update_Date; |
Copy.Description := Impl.Description; |
Copy.Wiki := Impl.Wiki; |
Copy.Owner := Impl.Owner; |
Function Definition: procedure Unchecked_Free is new Ada.Unchecked_Deallocation |
Function Body: (Project_Impl, Project_Impl_Ptr); |
pragma Warnings (Off, "*redundant conversion*"); |
Ptr : Project_Impl_Ptr := Project_Impl (Object.all)'Access; |
pragma Warnings (On, "*redundant conversion*"); |
begin |
Unchecked_Free (Ptr); |
end Destroy; |
overriding |
procedure Find (Object : in out Project_Impl; |
Session : in out ADO.Sessions.Session'Class; |
Query : in ADO.SQL.Query'Class; |
Found : out Boolean) is |
Stmt : ADO.Statements.Query_Statement |
:= Session.Create_Statement (Query, PROJECT_DEF'Access); |
begin |
Stmt.Execute; |
if Stmt.Has_Elements then |
Object.Load (Stmt, Session); |
Stmt.Next; |
Found := not Stmt.Has_Elements; |
else |
Found := False; |
end if; |
end Find; |
overriding |
procedure Load (Object : in out Project_Impl; |
Session : in out ADO.Sessions.Session'Class) is |
Found : Boolean; |
Query : ADO.SQL.Query; |
Id : constant ADO.Identifier := Object.Get_Key_Value; |
begin |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.