C# 클래스 ActivEarth.DAO.BadgeDAO

파일 보기 프로젝트 열기: mlcamilli/ActivEarth

공개 메소드들

메소드 설명
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