{$IfDef FPC}{$CodePage cp1251}{$EndIf FPC}
unit m3IDListQueryExecutor;
// --------------------------------------------------------------------------
// Родители: "Queries" <> MUID: (66FB115B029F) :: "m3" <> MUID: (66FB10950007) :: "Shared Delphi For Archi" <> MUID: (4ABA2360025A)
// --------------------------------------------------------------------------
// Модуль: "w:\common\components\rtl\Garant\m3\m3IDListQueryExecutor.pas" GeneratorVersion: 1.0.0.883901
// Стереотип: "<>"
// Элемент модели: "Tm3IDListQueryExecutor" MUID: (6759537E0284)
// --------------------------------------------------------------------------
//#UC START# *6759537E0284BeforeDefines*
//#UC END# *6759537E0284BeforeDefines*
{$Include daDefine.inc}
interface
uses
l3IntfUses
, daIDListQueryParams
, l3Ranges
, m3AttrIndexInterfaces
, daQueryInterfaces
, m3QueryInterfaces
, daEnumerableInterfaces
, l3Interfaces
, m4SearchResult
, daQueryParams
, l3LongintList
, daTypes
, evdDATypes
, daAbstractQueryExecutor
;
type
{$If not Defined(_ParamsType_Defined_) }
{Tm3IDListQueryExecutor.}_ParamsType_ = TdaIDListQueryParams;
{$Define _ParamsType_Defined_ }
{$Define _ParamsType_IsClass_ }
{$Define _ParamsType_IsAcceptableForScripts_ }
{$IfEnd} // not Defined(_ParamsType_Defined_)
{$Include Mm3QueryExecutor_imp.pas}
Tm3IDListQueryExecutor = class(_Mm3QueryExecutor_)
protected
function FindByParams(const aParams: TdaIDListQueryParams;
const aSearcher: Im3AttrIndexSearcher): Il3RangeEnumerable; override;
procedure DoDropResult; override;
function DoGetIsEmpty: Boolean; override;
public
{$If NOT Defined(l3NoSRT)}
function SetRefTo(var thePlace: Tm3IDListQueryExecutor): Boolean; overload; {$If Defined(l3HasInl)}inline;{$IfEnd}
{$IfEnd} // NOT Defined(l3NoSRT)
end;//Tm3IDListQueryExecutor
implementation
uses
l3ImplUses
, m3QueryResultSetFromLongintList
, daQueryExecutorFactory
, m3AttrIndexSearcher
, SysUtils
, l3Enumerators
, l3InterfacedIntegerList
, k2Tags
//#UC START# *6759537E0284impl_uses*
//#UC END# *6759537E0284impl_uses*
;
{$Include Mm3QueryExecutor_imp.pas}
{$If NOT Defined(l3NoSRT)}
function Tm3IDListQueryExecutor.SetRefTo(var thePlace: Tm3IDListQueryExecutor): Boolean;
begin
if (thePlace = Self) then
Result := false
else
begin
Result := true;
thePlace.Free;
thePlace := Self.Use;
end;//thePlace = Self
end;//Tm3IDListQueryExecutor.SetRefTo
{$IfEnd} // NOT Defined(l3NoSRT)
function Tm3IDListQueryExecutor.FindByParams(const aParams: TdaIDListQueryParams;
const aSearcher: Im3AttrIndexSearcher): Il3RangeEnumerable;
//#UC START# *670660CF0357_6759537E0284_var*
{$IfDef l3Use_Tl3RangeEnumerableIntersect}
var
l_All : Il3RangeEnumerable;
{$EndIf l3Use_Tl3RangeEnumerableIntersect}
//#UC END# *670660CF0357_6759537E0284_var*
begin
//#UC START# *670660CF0357_6759537E0284_impl*
Result := Il3RangeEnumerable_FromIntegerEnumerable(aParams.IDList.AsEnumerable);
{$IfDef l3Use_Tl3RangeEnumerableIntersect}
l_All := aSearcher.AllDocuments;
Result := Il3RangeEnumerable_Intersect(Result, l_All);
// - minus not existent
{$EndIf l3Use_Tl3RangeEnumerableIntersect}
//#UC END# *670660CF0357_6759537E0284_impl*
end;//Tm3IDListQueryExecutor.FindByParams
procedure Tm3IDListQueryExecutor.DoDropResult;
//#UC START# *5F148B0D0239_6759537E0284_var*
//#UC END# *5F148B0D0239_6759537E0284_var*
begin
//#UC START# *5F148B0D0239_6759537E0284_impl*
f_Found := nil;
f_ResultSet := nil;
f_FilteredFoundIDList := nil;
f_List := nil;
inherited;
//#UC END# *5F148B0D0239_6759537E0284_impl*
end;//Tm3IDListQueryExecutor.DoDropResult
function Tm3IDListQueryExecutor.DoGetIsEmpty: Boolean;
//#UC START# *675953F10122_6759537E0284_var*
//#UC END# *675953F10122_6759537E0284_var*
begin
//#UC START# *675953F10122_6759537E0284_impl*
Result := Self.Params.IDList.Empty;
//#UC END# *675953F10122_6759537E0284_impl*
end;//Tm3IDListQueryExecutor.DoGetIsEmpty
//#UC START# *6759537E0284forDiagramm*
(*
*)
//#UC END# *6759537E0284forDiagramm*
end.
Заметки о тестировании, программировании и прочий "поток сознания", который жалко писать "в стол"
воскресенье, 12 апреля 2026 г.
m3IDListQueryExecutor
Подписаться на:
Комментарии к сообщению (Atom)
Комментариев нет:
Отправить комментарий