C# Class ActivEarth.DAO.UserStatisticDAO

Afficher le fichier Open project: mlcamilli/ActivEarth

Méthodes publiques

Méthode Description
CreateNewStatisticForUser ( int userId, Statistic statType, float val ) : int

Saves a user statistic as a new entry in the DB.

GetAllStatisticsByUserId ( int userId ) : List

Retrieves all of a User's Statistics from the DB.

GetStatisticFromStatisticId ( int statisticId ) : UserStatistic

Retrieve's a UserStatistic from the DB based on the statistic's ID.

GetStatisticFromUserIdAndStatType ( int userId, Statistic statType ) : UserStatistic

Retrieves a User's Statistic from the DB based on the user's ID and statistic type.

UpdateUserStatistic ( UserStatistic statistic ) : bool

Updates an existing UserStatistic in the DB.

Method Details

CreateNewStatisticForUser() public static méthode

Saves a user statistic as a new entry in the DB.
public static CreateNewStatisticForUser ( int userId, Statistic statType, float val ) : int
userId int User to create stat for.
statType Statistic Statistic type to create.
val float Value of the statistic.
Résultat int

GetAllStatisticsByUserId() public static méthode

Retrieves all of a User's Statistics from the DB.
public static GetAllStatisticsByUserId ( int userId ) : List
userId int ID of user to fetch statistic info for.
Résultat List

GetStatisticFromStatisticId() public static méthode

Retrieve's a UserStatistic from the DB based on the statistic's ID.
public static GetStatisticFromStatisticId ( int statisticId ) : UserStatistic
statisticId int ID of statistic to fetch.
Résultat ActivEarth.Objects.Profile.UserStatistic

GetStatisticFromUserIdAndStatType() public static méthode

Retrieves a User's Statistic from the DB based on the user's ID and statistic type.
public static GetStatisticFromUserIdAndStatType ( int userId, Statistic statType ) : UserStatistic
userId int ID of user to fetch statistic info for.
statType Statistic Type of statistic to retrieve from user.
Résultat ActivEarth.Objects.Profile.UserStatistic

UpdateUserStatistic() public static méthode

Updates an existing UserStatistic in the DB.
public static UpdateUserStatistic ( UserStatistic statistic ) : bool
statistic ActivEarth.Objects.Profile.UserStatistic UserStatistic whose record needs updating.
Résultat bool