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

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

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

Метод Описание
CreateNewBadge ( Badge badge ) : int

Saves a badge as a new entry in the DB.

GetAllBadges ( ) : IEnumerable
GetBadgeFromBadgeId ( int badgeId ) : Badge

Retrieves a badge matching a provided ID.

GetBadgeFromUserIdAndStatistic ( int userId, Statistic statistic ) : Badge

Retrieves a badge of a particular statistic for a specific user.

GetBadgesFromUserId ( int userId ) : List

Retrieves the collection of badges belonging to a given user.

UpdateBadge ( Badge badge ) : bool

Updates an existing Badge in the DB.

Приватные методы

Метод Описание
LoadExternalBadgeData ( Badge badge ) : void

Loads the information stored in external tables for the badge (LevelRequirements, LevelRewards, etc.)

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

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

Saves a badge as a new entry in the DB.
public static CreateNewBadge ( Badge badge ) : int
badge ActivEarth.Objects.Competition.Badges.Badge Badge object to add to the DB.
Результат int

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

public static GetAllBadges ( ) : IEnumerable
Результат IEnumerable

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

Retrieves a badge matching a provided ID.
public static GetBadgeFromBadgeId ( int badgeId ) : Badge
badgeId int Identifier of the badge.
Результат ActivEarth.Objects.Competition.Badges.Badge

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

Retrieves a badge of a particular statistic for a specific user.
public static GetBadgeFromUserIdAndStatistic ( int userId, Statistic statistic ) : Badge
userId int Identifier of the badge owner.
statistic Statistic Statistic tracked by the badge.
Результат ActivEarth.Objects.Competition.Badges.Badge

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

Retrieves the collection of badges belonging to a given user.
public static GetBadgesFromUserId ( int userId ) : List
userId int
Результат List

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

Updates an existing Badge in the DB.
public static UpdateBadge ( Badge badge ) : bool
badge ActivEarth.Objects.Competition.Badges.Badge Badge whose record needs updating.
Результат bool