org.jafer.zclient
Class SearchResult

java.lang.Object
  extended by org.jafer.zclient.SearchResult

public class SearchResult
extends java.lang.Object

This class represents a search result returned by a search performed on a session connection to a SRW/ZClient server


Field Summary
private  java.lang.String databaseName
          Stores a reference to the database name this result set is against
private  JaferException diagnostic
          Stores a reference to the diagnostic information returned if the search failed
private  int noOfResults
          Stores a reference to the number of results returned from this database.
 
Constructor Summary
SearchResult()
           
 
Method Summary
 java.lang.String getDatabaseName()
          Return the name of the database that this result set represents
 JaferException getDiagnostic()
          Return the diagnostic if the search failed for this database
 int getNoOfResults()
          Return the number of results found for this database.
 void setDatabaseName(java.lang.String databaseName)
          Set the name of the database that this result set represents
 void setDiagnostic(JaferException diagnostic)
          Set the diagnostic if the search failed for this database
 void setNoOfResults(int noOfResults)
          Set the number of results found for this database
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

databaseName

private java.lang.String databaseName
Stores a reference to the database name this result set is against


noOfResults

private int noOfResults
Stores a reference to the number of results returned from this database. Default this to 0 records


diagnostic

private JaferException diagnostic
Stores a reference to the diagnostic information returned if the search failed

Constructor Detail

SearchResult

public SearchResult()
Method Detail

getDatabaseName

public java.lang.String getDatabaseName()
Return the name of the database that this result set represents

Returns:
The database name

setDatabaseName

public void setDatabaseName(java.lang.String databaseName)
Set the name of the database that this result set represents

Parameters:
databaseName - The name of the database

getNoOfResults

public int getNoOfResults()
Return the number of results found for this database.

Note 0 results could also mean that an error occurred and hence the diagnostic value should also be checked to see if it is not null in this case

Returns:
The number of results found

setNoOfResults

public void setNoOfResults(int noOfResults)
Set the number of results found for this database

Parameters:
noOfResults - The number of results found

getDiagnostic

public JaferException getDiagnostic()
Return the diagnostic if the search failed for this database

Returns:
The diagnostic record - This can be null

setDiagnostic

public void setDiagnostic(JaferException diagnostic)
Set the diagnostic if the search failed for this database

Parameters:
diagnostic - The diagnostic record