C# Class gov.va.medora.mdws.dao.sql.UsageDao

Mostrar archivo Open project: OSEHRA/mdws Class Usage Examples

Public Methods

Method Description
UsageDao ( ) : System
UsageDao ( string connectionString ) : System
deleteSession ( string sessionId ) : gov.va.medora.mdws.dto.BoolTO

Delete a session by it's ID and all the corresponding saved requests

getSessions ( System.DateTime start, System.DateTime end ) : ApplicationSessionsTO

Get all the MDWS sessions and the related requests for a given date range

saveSession ( ApplicationSession session ) : gov.va.medora.mdws.dto.BoolTO

Save a ApplicationSession object and it's requests

Private Methods

Method Description
addApplicationRequest ( DataRow row, ApplicationSession parentSession ) : void
buildDeleteSessionAdapter ( string sessionId, SqlConnection conn, SqlTransaction tx ) : SqlDataAdapter
buildInsertRequestAdapter ( ApplicationRequest request, SqlConnection conn, SqlTransaction tx ) : SqlDataAdapter

This is going to be commented out because it becomes unusably slow after a few hundred thousand unique sessions are created. Use the getSessions(int howMany) function instead to retrieve the latest howMany number of sessions

buildInsertSessionAdapter ( ApplicationSession session, SqlConnection conn, SqlTransaction tx ) : SqlDataAdapter
buildSelectSessionRequestsAdapter ( SqlConnection conn, SqlTransaction tx ) : SqlDataAdapter
buildSelectSessionsAdapter ( System.DateTime start, System.DateTime end, SqlConnection conn, SqlTransaction tx ) : SqlDataAdapter

Build SQL adapter for selecting all MDWS sessions saved to database that where started between a given date range

getApplicationSessions ( DataSet dataSet ) : ApplicationSessions
getConnection ( ) : SqlConnection

Method Details

UsageDao() public method

public UsageDao ( ) : System
return System

UsageDao() public method

public UsageDao ( string connectionString ) : System
connectionString string
return System

deleteSession() public method

Delete a session by it's ID and all the corresponding saved requests
public deleteSession ( string sessionId ) : gov.va.medora.mdws.dto.BoolTO
sessionId string The session ID to be deleted
return gov.va.medora.mdws.dto.BoolTO

getSessions() public method

Get all the MDWS sessions and the related requests for a given date range
public getSessions ( System.DateTime start, System.DateTime end ) : ApplicationSessionsTO
start System.DateTime The start date
end System.DateTime The end date
return ApplicationSessionsTO

saveSession() public method

Save a ApplicationSession object and it's requests
public saveSession ( ApplicationSession session ) : gov.va.medora.mdws.dto.BoolTO
session ApplicationSession The session object to save
return gov.va.medora.mdws.dto.BoolTO