'레코드 찾기' 기능을 제공합니다. 주어진 레코드 데이터베이스 ID(DBID)의 EntitiyDef 오브젝트를 리턴합니다. 메소드에서 EntityDef 유형을 지정해야 하며 DBID에서 검색할 EntityDef 이름을 선택적으로 지정합니다.
다중 레코드 유형에서 entDefNames 배열을 검색할 수 있으므로 일치하는 레코드 유형을 결정하려면 리턴된 EntityDef 유형을 체크인해야 합니다. 또한 ANY_ENTITY가 entityDeftype 인수로 사용되는 경우 Stateful(REQ_ENTITY)이나 Stateless(AUX_ENTITY) 레코드가 리턴되었는지 결정해야 합니다.
GetEntityDefOfName 또는 GetEntityDefOfDbId 중 하나를 호출하여 주어진 displayName 또는 DBID가 사용자 데이터베이스에 존재하는지 찾을 수 있습니다. EntityDef가 존재하면 Session 오브젝트의 GetEntity 메소드를 호출하여 엔티티를 얻을 수 있습니다.
데이터베이스 ID 대신 표시 이름을 사용하여 레코드 유형을 요청하려면 GetEntityDefOfName 메소드를 사용하십시오.
VBScript
session.GetEntityDefOfDbId(db_id, entitydef_names,entitydef_type)
Perl
$session->GetEntityDefOfDbId(db_identitydef_names, entitydef_type);
Visual Basic의 경우 문자열의 배열이 포함된 Variant입니다. 각 문자열에는 EntityDef의 이름이 포함됩니다.
Perl의 경우 문자열 배열에 대한 참조가 리턴됩니다. 각 문자열에는 EntityDef의 이름이 포함됩니다.
EntityDefs의 이름은 displayName 또는 DbId에서 식별되는 엔티티를 검색하는 데 사용됩니다. 이 EntityDef 이름 목록은 반복되며 주어진 순서대로 처리됩니다. entDefNames 인수에 제공된 EntityDef 이름이 올바르지 않으면 올바르지 않은 이름을 식별하는 예외가 처리됩니다. 빈 배열 값이 제공되는 경우 처음에 검색된, 빈도가 가장 높은 EntityDef에서 마지막에 검색된 빈도가 가장 낮은 EntityDef의 검색 순서로 스키마에 정의된 모든 EntityDef 유형이 사용됩니다.
Perl
use CQPerlExt; # Build session... # Log in...'Session UserLogon method' # Determine the array of Entity Def Names for searching... eval { $entDefNamesDB = $CQSession->GetEntityDefNames(); }; # Sort the list of entity def names returned from GetEntityDefNames() @entDefNamesDBsorted = sort @$entDefNamesDB; $entDefNamesDBsorted = \@entDefNamesDBsorted; # EntityDef Names can be supplied by the user. For example: # @entDefNamesUser = ($ARG{'EDEF1'},$ARG{'EDEF2'},$ARG{'EDEF3'}); # $entDefNamesUser = \@entDefNamesUser; # if using user supplied EntityDef Names for searching then # $entDefNames = $entDefNamesUser; # else use all DB EntityDef names for searching: $entDefNames = $entDefNamesDBsorted; # Call CQSession->GetEntityDefOfDbId()... my($DbId) = $ARG{'DBID'}; eval { $CQEntityDefOfDbId = $CQSession->GetEntityDefOfDbId($DbId, $entDefNames, $ARG{'ENTTYPE'}); }; # exception handling goes here... # Get the Entity Def Name of the record... eval { $CQEntityDefName = $CQEntityDefOfDbId->GetName(); }; # exception handling goes here... # Get entity...