text stringlengths 0 234 |
|---|
ADO.Objects.Set_Field_Boolean (Impl.all, 9, Impl.Allow_Comments, Value); |
ADO.Objects.Set_Field_Boolean (Impl.all, 9, Impl.Allow_Comments, Value); |
end Set_Allow_Comments; |
function Get_Allow_Comments (Object : in Post_Ref) |
return Boolean is |
Impl : constant Post_Access |
:= Post_Impl (Object.Get_Load_Object.all)'Access; |
begin |
return Impl.Allow_Comments; |
end Get_Allow_Comments; |
procedure Set_Read_Count (Object : in out Post_Ref; |
Value : in Integer) is |
Impl : Post_Access; |
begin |
Set_Field (Object, Impl); |
ADO.Objects.Set_Field_Integer (Impl.all, 10, Impl.Read_Count, Value); |
end Set_Read_Count; |
function Get_Read_Count (Object : in Post_Ref) |
return Integer is |
Impl : constant Post_Access |
:= Post_Impl (Object.Get_Load_Object.all)'Access; |
begin |
return Impl.Read_Count; |
end Get_Read_Count; |
procedure Set_Author (Object : in out Post_Ref; |
Value : in AWA.Users.Models.User_Ref'Class) is |
Impl : Post_Access; |
begin |
Set_Field (Object, Impl); |
ADO.Objects.Set_Field_Object (Impl.all, 11, Impl.Author, Value); |
end Set_Author; |
function Get_Author (Object : in Post_Ref) |
return AWA.Users.Models.User_Ref'Class is |
Impl : constant Post_Access |
:= Post_Impl (Object.Get_Load_Object.all)'Access; |
begin |
return Impl.Author; |
end Get_Author; |
procedure Set_Blog (Object : in out Post_Ref; |
Value : in AWA.Blogs.Models.Blog_Ref'Class) is |
Impl : Post_Access; |
begin |
Set_Field (Object, Impl); |
ADO.Objects.Set_Field_Object (Impl.all, 12, Impl.Blog, Value); |
end Set_Blog; |
function Get_Blog (Object : in Post_Ref) |
return AWA.Blogs.Models.Blog_Ref'Class is |
Impl : constant Post_Access |
:= Post_Impl (Object.Get_Load_Object.all)'Access; |
begin |
return Impl.Blog; |
end Get_Blog; |
-- Copy of the object. |
procedure Copy (Object : in Post_Ref; |
Into : in out Post_Ref) is |
Result : Post_Ref; |
begin |
if not Object.Is_Null then |
declare |
Impl : constant Post_Access |
:= Post_Impl (Object.Get_Load_Object.all)'Access; |
Copy : constant Post_Access |
:= new Post_Impl; |
begin |
ADO.Objects.Set_Object (Result, Copy.all'Access); |
Copy.Copy (Impl.all); |
Copy.Title := Impl.Title; |
Copy.Text := Impl.Text; |
Copy.Create_Date := Impl.Create_Date; |
Copy.Uri := Impl.Uri; |
Copy.Version := Impl.Version; |
Copy.Publish_Date := Impl.Publish_Date; |
Copy.Status := Impl.Status; |
Copy.Allow_Comments := Impl.Allow_Comments; |
Copy.Read_Count := Impl.Read_Count; |
Copy.Author := Impl.Author; |
Copy.Blog := Impl.Blog; |
Function Definition: procedure Unchecked_Free is new Ada.Unchecked_Deallocation |
Function Body: (Post_Impl, Post_Impl_Ptr); |
pragma Warnings (Off, "*redundant conversion*"); |
Ptr : Post_Impl_Ptr := Post_Impl (Object.all)'Access; |
pragma Warnings (On, "*redundant conversion*"); |
begin |
Unchecked_Free (Ptr); |
end Destroy; |
procedure Find (Object : in out Post_Impl; |
Session : in out ADO.Sessions.Session'Class; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.