La méthode clearWindow() efface tous les enregistrements candidats dans la fenêtre de correspondance actuelle.
Syntaxe
public void clearWindow(int handle, int retCode[]);
Paramètres
Nom |
Type |
Utilisation |
Longueur |
Description |
---|---|---|---|---|
handle |
entier |
Entrant |
–– |
Handle vers un serveur de programme de correspondance Director. |
retCode |
int[ ] |
Sortant |
4 |
Code d'erreur indiquant le statut de l'appel de la méthode. |
Valeurs renvoyées
Reportez-vous à la section Valeurs renvoyées.
Exemple
TrilTGenClient testClient = new TrilTGenClient(); int[] retCode= new int[1]; // Return code and handle int handle = 0; char systemID; // System and Server ID for attach() String serverName; String[] matchFields = {"FirstName", "LastName", "MiddleName"}; String[] inputData = new String[3]; systemID = 'G'; String keyValue; serverName = "RMatcher"; handle = testClient.openMatcherEx(systemID, serverName, retCode); // Call the clearWindow() method before populating the match window with records testClient.clearWindow(handle, retCode); // Error handling omitted // Add three records to the match window inputData[0] = "JOHN"; inputData[1] = "SMITH"; inputData[2] = "D"; keyValue = "1ST JOHN"; testClient.addToMatchWindow(handle, matchFields, inputData, keyValue, retCode); inputData[0] = "JOHNATHAN"; inputData[1] = "SMITH"; inputData[2] = "DAVID"; keyValue = "2ND JOHN"; testClient.addToMatchWindow(handle, matchFields, inputData, keyValue, retCode); inputData[0] = "J"; inputData[1] = "SMITH"; inputData[2] = "D"; keyValue = "3RD JOHN"; testClient.addToMatchWindow(handle, matchFields, inputData, keyValue, retCode); // Match this record inputData[0] = "JOHN"; inputData[1] = "SMITH"; inputData[2] = ""; testClient.matchCandidate(handle, matchFields, inputData, outKeys, outPats, retCode); // Clear all candidates from match window to prepare for next match testClient.clearWindow(handle, retCode);