text stringlengths 0 234 |
|---|
Value => Object.Uid); |
Object.Clear_Modified (4); |
end if; |
if Object.Is_Modified (5) then |
Stmt.Save_Field (Name => COL_4_1_NAME, -- create_date |
Value => Object.Create_Date); |
Object.Clear_Modified (5); |
end if; |
if Object.Is_Modified (6) then |
Stmt.Save_Field (Name => COL_5_1_NAME, -- update_date |
Value => Object.Update_Date); |
Object.Clear_Modified (6); |
end if; |
if Object.Is_Modified (7) then |
Stmt.Save_Field (Name => COL_6_1_NAME, -- url |
Value => Object.Url); |
Object.Clear_Modified (7); |
end if; |
if Object.Is_Modified (8) then |
Stmt.Save_Field (Name => COL_7_1_NAME, -- workspace_id |
Value => Object.Workspace); |
Object.Clear_Modified (8); |
end if; |
if Stmt.Has_Save_Fields then |
Object.Version := Object.Version + 1; |
Stmt.Save_Field (Name => "version", |
Value => Object.Version); |
Stmt.Set_Filter (Filter => "id = ? and version = ?"); |
Stmt.Add_Param (Value => Object.Get_Key); |
Stmt.Add_Param (Value => Object.Version - 1); |
declare |
Result : Integer; |
begin |
Stmt.Execute (Result); |
if Result /= 1 then |
if Result /= 0 then |
raise ADO.Objects.UPDATE_ERROR; |
else |
raise ADO.Objects.LAZY_LOCK; |
end if; |
end if; |
Function Definition: procedure List (Object : in out Blog_Vector; |
Function Body: Session : in out ADO.Sessions.Session'Class; |
Query : in ADO.SQL.Query'Class) is |
Stmt : ADO.Statements.Query_Statement |
:= Session.Create_Statement (Query, BLOG_DEF'Access); |
begin |
Stmt.Execute; |
Blog_Vectors.Clear (Object); |
while Stmt.Has_Elements loop |
declare |
Item : Blog_Ref; |
Impl : constant Blog_Access := new Blog_Impl; |
begin |
Impl.Load (Stmt, Session); |
ADO.Objects.Set_Object (Item, Impl.all'Access); |
Object.Append (Item); |
Function Definition: procedure Set_Publish_Date (Object : in out Post_Ref; |
Function Body: Value : in ADO.Nullable_Time) is |
Impl : Post_Access; |
begin |
Set_Field (Object, Impl); |
ADO.Objects.Set_Field_Time (Impl.all, 7, Impl.Publish_Date, Value); |
end Set_Publish_Date; |
function Get_Publish_Date (Object : in Post_Ref) |
return ADO.Nullable_Time is |
Impl : constant Post_Access |
:= Post_Impl (Object.Get_Load_Object.all)'Access; |
begin |
return Impl.Publish_Date; |
end Get_Publish_Date; |
procedure Set_Status (Object : in out Post_Ref; |
Value : in AWA.Blogs.Models.Post_Status_Type) is |
procedure Set_Field_Enum is |
new ADO.Objects.Set_Field_Operation (Post_Status_Type); |
Impl : Post_Access; |
begin |
Set_Field (Object, Impl); |
Set_Field_Enum (Impl.all, 8, Impl.Status, Value); |
end Set_Status; |
function Get_Status (Object : in Post_Ref) |
return AWA.Blogs.Models.Post_Status_Type is |
Impl : constant Post_Access |
:= Post_Impl (Object.Get_Load_Object.all)'Access; |
begin |
return Impl.Status; |
end Get_Status; |
procedure Set_Allow_Comments (Object : in out Post_Ref; |
Value : in Boolean) is |
Impl : Post_Access; |
begin |
Set_Field (Object, Impl); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.