C# Класс ActivEarth.DAO.UserStatisticDAO

Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Описание методов

CreateNewStatisticForUser() публичный статический Метод

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.
Результат int

GetAllStatisticsByUserId() публичный статический Метод

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.
Результат List

GetStatisticFromStatisticId() публичный статический Метод

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.
Результат ActivEarth.Objects.Profile.UserStatistic

GetStatisticFromUserIdAndStatType() публичный статический Метод

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.
Результат ActivEarth.Objects.Profile.UserStatistic

UpdateUserStatistic() публичный статический Метод

Updates an existing UserStatistic in the DB.
public static UpdateUserStatistic ( UserStatistic statistic ) : bool
statistic ActivEarth.Objects.Profile.UserStatistic UserStatistic whose record needs updating.
Результат bool