C# Class ActivEarth.Server.Service.Statistics.StatisticManager

Serves as a wrapper class for the StatisticDAO class, further abstracting actions.
Mostra file Open project: mlcamilli/ActivEarth Class Usage Examples

Public Methods

Method Description
GetUserStatistic ( Statistic statToGet ) : UserStatistic

Gets a statistic for a user based on the statistic type.

GetUserStatistic ( int id ) : UserStatistic

Returns a User's Statistic based on its ID.

SetUserStatistic ( Statistic statToSet, float val ) : void
SetUserStatistic ( int userId, Statistic statistic, float value ) : void

Sets the value of a statistic for a specific user.

StatisticManager ( User user ) : System
UpdateUserStatistics ( ) : void

Method Details

GetUserStatistic() public method

Gets a statistic for a user based on the statistic type.
public GetUserStatistic ( Statistic statToGet ) : UserStatistic
statToGet Statistic Statistic to retrieve.
return ActivEarth.Objects.Profile.UserStatistic

GetUserStatistic() public method

Returns a User's Statistic based on its ID.
public GetUserStatistic ( int id ) : UserStatistic
id int The ID of the UserStatistic to get.
return ActivEarth.Objects.Profile.UserStatistic

SetUserStatistic() public method

public SetUserStatistic ( Statistic statToSet, float val ) : void
statToSet Statistic
val float
return void

SetUserStatistic() public static method

Sets the value of a statistic for a specific user.
public static SetUserStatistic ( int userId, Statistic statistic, float value ) : void
userId int ID of the user to update.
statistic Statistic Statistic to be updated.
value float New value for the statistic.
return void

StatisticManager() public method

public StatisticManager ( User user ) : System
user ActivEarth.Objects.Profile.User
return System

UpdateUserStatistics() public method

public UpdateUserStatistics ( ) : void
return void