Simias::Storage::JournalSearchState Class Reference

Class used to keep track of outstanding searches. More...

Collaboration diagram for Simias::Storage::JournalSearchState:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 JournalSearchState (Collection collection, string journalFile, string fileID, string userID, DateTime fromTime, DateTime toTime)
 Initializes an instance of a JournalSearchState object.
 JournalSearchState (Collection collection, string journalFile, string fileID, string userID)
 Initializes an instance of a JournalSearchState object.
string GetFileName (string nodeID, out EntryTypes entryType)
 Gets the file name for a file with the specified node ID.
JournalEntry GetNextEntry ()
 Get the next entry from the journal file.
bool MoveNext (long numberOfEntries)
 Move forward in the journal file the specified number of entries.
bool MovePrevious (long numberOfEntries)
 Move back in the journal file the specified number of entries.
string ReadNextRecord ()
 Reads the next record in the journal file.
bool ReturnEntry (JournalEntry entry)
 Compares the specified JournalEntry object against the filter criteria.
bool Seek (uint offset)
 Seeks to the entry with the specified offset.
void Dispose ()
 Allows for quick release of managed and unmanaged resources. Called by applications.

Static Public Member Functions

static JournalSearchState GetSearchState (string contextHandle)
 Returns a search context object that contains the state information for an outstanding search.

Properties

bool IsDisposed [get]
 Indicates if the object has been disposed.
string ContextHandle [get]
 Gets the context handle for this object.
int CurrentRecord [get, set]
 Gets or sets the current record.
int LastCount [get, set]
 Gets or sets the last record count.
int TotalRecords [get]
 Gets the total number of records contained by this search.


Detailed Description

Class used to keep track of outstanding searches.


Constructor & Destructor Documentation

Simias::Storage::JournalSearchState::JournalSearchState ( Collection  collection,
string  journalFile,
string  fileID,
string  userID,
DateTime  fromTime,
DateTime  toTime 
) [inline]

Initializes an instance of a JournalSearchState object.

Parameters:
collection The collection to return journal entries for.
journalFile The path of the journal file to search.
fileID The file ID to search for in the journal file. Pass in a null or an empty string to not search for a specific file.
userID The user ID to search for in the journal file. Pass in a null or an empty string to not search for a specific user.
fromTime Timestamp used to filter journal file entries. Return all entries with a timestamp greater than fromTime. Passing in DateTime.MinValue will cause this parameter to not affect which entries are returned.
toTime Timestamp used to filter journal file entries. Return all entries with a timestamp less than toTime. Passing in DateTime.MaxValue will cause this parameter to not affect which entries are returned.

Simias::Storage::JournalSearchState::JournalSearchState ( Collection  collection,
string  journalFile,
string  fileID,
string  userID 
) [inline]

Initializes an instance of a JournalSearchState object.

Parameters:
collection The collection to return journal entries for.
journalFile The path of the journal file to search.
fileID The file ID to search for in the journal file. Pass in a null or an empty string to not search for a specific file.
userID The user ID to search for in the journal file. Pass in a null or an empty string to not search for a specific user.
totalRecords The total number of records contained in the search.


Member Function Documentation

string Simias::Storage::JournalSearchState::GetFileName ( string  nodeID,
out EntryTypes  entryType 
) [inline]

Gets the file name for a file with the specified node ID.

Parameters:
nodeID The identifier of the file to get the name of.
entryType Upon successful return, contains the type of entry for the given nodeID.
Returns:
The name of the file or an empty string if the file name is not found.

JournalEntry Simias::Storage::JournalSearchState::GetNextEntry (  )  [inline]

Get the next entry from the journal file.

Returns:
A JournalEntry object representing the next entry in the journal file. If no more entries are found a null is returned.

static JournalSearchState Simias::Storage::JournalSearchState::GetSearchState ( string  contextHandle  )  [inline, static]

Returns a search context object that contains the state information for an outstanding search.

Parameters:
contextHandle Context handle that refers to a specific search context object.
Returns:
A SearchState object if a valid one exists, otherwise a null is returned.

bool Simias::Storage::JournalSearchState::MoveNext ( long  numberOfEntries  )  [inline]

Move forward in the journal file the specified number of entries.

Parameters:
numberOfEntries The number of entries to advance past in the journal file.
Returns:
True if the move was successful; otherwise False is returned.

bool Simias::Storage::JournalSearchState::MovePrevious ( long  numberOfEntries  )  [inline]

Move back in the journal file the specified number of entries.

Parameters:
numberOfEntries The number of entries to retreat past in the journal file. Pass in -1 to move to the beginning of the file.
Returns:
True if the move was successful; otherwise False is returned.

string Simias::Storage::JournalSearchState::ReadNextRecord (  )  [inline]

Reads the next record in the journal file.

Returns:
A string representation of the next record in the file. A null is returned if the end of the file is reached.

bool Simias::Storage::JournalSearchState::ReturnEntry ( JournalEntry  entry  )  [inline]

Compares the specified JournalEntry object against the filter criteria.

Parameters:
entry The JournalEntry object to compare against the filter criteria.
Returns:
True if the JournalEntry object meets the filter criteria; otherwise False is returned.

bool Simias::Storage::JournalSearchState::Seek ( uint  offset  )  [inline]

Seeks to the entry with the specified offset.

Parameters:
offset The index of the entry to seek to.
Returns:
True if the seek was successful; otherwise False is returned.

void Simias::Storage::JournalSearchState::Dispose (  )  [inline]

Allows for quick release of managed and unmanaged resources. Called by applications.


Property Documentation

bool Simias::Storage::JournalSearchState::IsDisposed [get]

Indicates if the object has been disposed.

string Simias::Storage::JournalSearchState::ContextHandle [get]

Gets the context handle for this object.

int Simias::Storage::JournalSearchState::CurrentRecord [get, set]

Gets or sets the current record.

int Simias::Storage::JournalSearchState::LastCount [get, set]

Gets or sets the last record count.

int Simias::Storage::JournalSearchState::TotalRecords [get]

Gets the total number of records contained by this search.


The documentation for this class was generated from the following file:

Generated on Wed Apr 8 14:55:32 2009 for simias by  doxygen 1.5.6