text stringlengths 0 234 |
|---|
raise ADO.Objects.UPDATE_ERROR; |
end if; |
end if; |
Function Definition: function Permission_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key is |
Function Body: Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER, |
Of_Class => PERMISSION_DEF'Access); |
begin |
ADO.Objects.Set_Value (Result, Id); |
return Result; |
end Permission_Key; |
function Permission_Key (Id : in String) return ADO.Objects.Object_Key is |
Result : ADO.Objects.Object_Key (Of_Type => ADO.Objects.KEY_INTEGER, |
Of_Class => PERMISSION_DEF'Access); |
begin |
ADO.Objects.Set_Value (Result, Id); |
return Result; |
end Permission_Key; |
function "=" (Left, Right : Permission_Ref'Class) return Boolean is |
begin |
return ADO.Objects.Object_Ref'Class (Left) = ADO.Objects.Object_Ref'Class (Right); |
end "="; |
procedure Set_Field (Object : in out Permission_Ref'Class; |
Impl : out Permission_Access) is |
Result : ADO.Objects.Object_Record_Access; |
begin |
Object.Prepare_Modify (Result); |
Impl := Permission_Impl (Result.all)'Access; |
end Set_Field; |
-- Internal method to allocate the Object_Record instance |
procedure Allocate (Object : in out Permission_Ref) is |
Impl : Permission_Access; |
begin |
Impl := new Permission_Impl; |
ADO.Objects.Set_Object (Object, Impl.all'Access); |
end Allocate; |
-- ---------------------------------------- |
-- Data object: Permission |
-- ---------------------------------------- |
procedure Set_Id (Object : in out Permission_Ref; |
Value : in ADO.Identifier) is |
Impl : Permission_Access; |
begin |
Set_Field (Object, Impl); |
ADO.Objects.Set_Field_Key_Value (Impl.all, 1, Value); |
end Set_Id; |
function Get_Id (Object : in Permission_Ref) |
return ADO.Identifier is |
Impl : constant Permission_Access |
:= Permission_Impl (Object.Get_Object.all)'Access; |
begin |
return Impl.Get_Key_Value; |
end Get_Id; |
procedure Set_Name (Object : in out Permission_Ref; |
Value : in String) is |
Impl : Permission_Access; |
begin |
Set_Field (Object, Impl); |
ADO.Objects.Set_Field_String (Impl.all, 2, Impl.Name, Value); |
end Set_Name; |
procedure Set_Name (Object : in out Permission_Ref; |
Value : in Ada.Strings.Unbounded.Unbounded_String) is |
Impl : Permission_Access; |
begin |
Set_Field (Object, Impl); |
ADO.Objects.Set_Field_Unbounded_String (Impl.all, 2, Impl.Name, Value); |
end Set_Name; |
function Get_Name (Object : in Permission_Ref) |
return String is |
begin |
return Ada.Strings.Unbounded.To_String (Object.Get_Name); |
end Get_Name; |
function Get_Name (Object : in Permission_Ref) |
return Ada.Strings.Unbounded.Unbounded_String is |
Impl : constant Permission_Access |
:= Permission_Impl (Object.Get_Load_Object.all)'Access; |
begin |
return Impl.Name; |
end Get_Name; |
-- Copy of the object. |
procedure Copy (Object : in Permission_Ref; |
Into : in out Permission_Ref) is |
Result : Permission_Ref; |
begin |
if not Object.Is_Null then |
declare |
Impl : constant Permission_Access |
:= Permission_Impl (Object.Get_Load_Object.all)'Access; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.