C# 클래스 ActivEarth.DAO.ContestDAO

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

공개 메소드들

메소드 설명
CalculateBracketRewards ( Contest contest ) : List

Calculates the ActivityScore reward that will be awarded to teams in each bracket.

CalculateBracketRewards ( int contestId ) : List

Calculates the ActivityScore reward that will be awarded to teams in each bracket.

CalculateBracketSizes ( int teamCount ) : List

Calculates the number of teams qualifying for each reward bracket in a contest.

CreateNewContest ( Contest contest ) : int

Saves a contest as a new entry in the DB.

FindContests ( string name, bool exactMatch ) : List

Gets the list of currently joinable contests with a search query (searching contests by name).

GetActiveContests ( bool loadTeams, bool loadTeamMembers ) : List

Retrieves all active contests in the DB.

GetAllContests ( ) : IEnumerable
GetContestFromContestId ( int contestId, bool loadTeams, bool loadTeamMembers ) : Contest

Retrieves a Contest from the DB based on its ID.

GetContestIdsFromGroupId ( int groupId ) : List

Returns the list of IDs of all contests that a group is currently participating in.

GetContestIdsFromUserId ( int userId ) : List

Returns the list of IDs of all contests that a user is currently participating in.

GetContestNameFromContestId ( int contestId ) : string

Returns the name of a contest based on its ID.

GetStatisticFromContestId ( int contestId ) : Statistic

Lookup for the statistic being tracked by a specific challenge.

RemoveContestFromContestId ( int contestId ) : bool

Deletes an existing Contest from the DB.

RemoveOldContests ( ) : bool

Removes contests from the DB that have were deactivated more than two weeks ago.

UpdateContest ( Contest contest ) : bool

Updates an existing Contest in the DB.

UpdateContestStandings ( int contestId ) : void

Updates the scores and bracket assignments for all teams in the contest.

메소드 상세

CalculateBracketRewards() 공개 정적인 메소드

Calculates the ActivityScore reward that will be awarded to teams in each bracket.
public static CalculateBracketRewards ( Contest contest ) : List
contest ActivEarth.Objects.Competition.Contests.Contest Contest to calculate rewards for. Must have teams loaded.
리턴 List

CalculateBracketRewards() 공개 정적인 메소드

Calculates the ActivityScore reward that will be awarded to teams in each bracket.
public static CalculateBracketRewards ( int contestId ) : List
contestId int
리턴 List

CalculateBracketSizes() 공개 정적인 메소드

Calculates the number of teams qualifying for each reward bracket in a contest.
public static CalculateBracketSizes ( int teamCount ) : List
teamCount int Number of teams in the contest.
리턴 List

CreateNewContest() 공개 정적인 메소드

Saves a contest as a new entry in the DB.
public static CreateNewContest ( Contest contest ) : int
contest ActivEarth.Objects.Competition.Contests.Contest Contest object to add to the DB.
리턴 int

FindContests() 공개 정적인 메소드

Gets the list of currently joinable contests with a search query (searching contests by name).
public static FindContests ( string name, bool exactMatch ) : List
name string
exactMatch bool
리턴 List

GetActiveContests() 공개 정적인 메소드

Retrieves all active contests in the DB.
public static GetActiveContests ( bool loadTeams, bool loadTeamMembers ) : List
loadTeams bool
loadTeamMembers bool
리턴 List

GetAllContests() 공개 정적인 메소드

public static GetAllContests ( ) : IEnumerable
리턴 IEnumerable

GetContestFromContestId() 공개 정적인 메소드

Retrieves a Contest from the DB based on its ID.
public static GetContestFromContestId ( int contestId, bool loadTeams, bool loadTeamMembers ) : Contest
contestId int Identifier of the contest to retrieve.
loadTeams bool
loadTeamMembers bool
리턴 ActivEarth.Objects.Competition.Contests.Contest

GetContestIdsFromGroupId() 공개 정적인 메소드

Returns the list of IDs of all contests that a group is currently participating in.
public static GetContestIdsFromGroupId ( int groupId ) : List
groupId int ID of the group to search for.
리턴 List

GetContestIdsFromUserId() 공개 정적인 메소드

Returns the list of IDs of all contests that a user is currently participating in.
public static GetContestIdsFromUserId ( int userId ) : List
userId int ID of the user to search for.
리턴 List

GetContestNameFromContestId() 공개 정적인 메소드

Returns the name of a contest based on its ID.
public static GetContestNameFromContestId ( int contestId ) : string
contestId int
리턴 string

GetStatisticFromContestId() 공개 정적인 메소드

Lookup for the statistic being tracked by a specific challenge.
public static GetStatisticFromContestId ( int contestId ) : Statistic
contestId int ID of the contest to query.
리턴 Statistic

RemoveContestFromContestId() 공개 정적인 메소드

Deletes an existing Contest from the DB.
public static RemoveContestFromContestId ( int contestId ) : bool
contestId int ID for the Contest whose record needs to be removed.
리턴 bool

RemoveOldContests() 공개 정적인 메소드

Removes contests from the DB that have were deactivated more than two weeks ago.
public static RemoveOldContests ( ) : bool
리턴 bool

UpdateContest() 공개 정적인 메소드

Updates an existing Contest in the DB.
public static UpdateContest ( Contest contest ) : bool
contest ActivEarth.Objects.Competition.Contests.Contest Contest whose record needs updating.
리턴 bool

UpdateContestStandings() 공개 정적인 메소드

Updates the scores and bracket assignments for all teams in the contest.
public static UpdateContestStandings ( int contestId ) : void
contestId int Contest ID to update.
리턴 void