Method | Description | |
---|---|---|
CreateNewTeam ( ContestTeam team ) : int |
Saves a Team as a new entry in the DB.
|
|
CreateNewTeamMember ( ContestTeamMember teamMember, int teamId ) : int |
Creates a new DB entry for a team member.
|
|
CreateNewTeamMember ( int userId, int teamId ) : int |
Creates a new DB entry for a team member.
|
|
GetCompetitorCount ( int contestId ) : int |
Retrieves the number of competitors for a contest.
|
|
GetTeamFromTeamId ( int teamId, bool loadMembers ) : ContestTeam |
Retrieves a Team from the DB based on its ID.
|
|
GetTeamFromUserIdAndContestId ( int userId, int contestId, bool loadMembers ) : ContestTeam |
Retrieves the team from a given contest which contains a given member.
|
|
GetTeamIdsFromGroupId ( int groupId ) : List |
Retrieves all team IDs which match the provided group.
|
|
GetTeamIdsFromUserId ( int userId ) : List |
Retrieves all team IDs of which the provided user is a member.
|
|
GetTeamMembersFromTeamId ( int teamId ) : List |
Retrieves the list of team members for a particular team.
|
|
GetTeamsFromContestId ( int contestId, bool loadMembers ) : List |
Retrieves all teams competing in a particular contest.
|
|
LockTeam ( ContestTeam team ) : void |
Notes each user's state at the beginning of a contest so that the delta score can be calculated. Sets the initialized flag to true, allowing the calculation of delta scores.
|
|
RemoveTeam ( int teamId ) : bool |
Removes an existing Team from the DB.
|
|
RemoveTeamMemberFromUserIdAndContestId ( int userId, int contestId ) : bool |
Removes a team member DB entry.
|
|
RemoveTeamMembersFromTeamId ( int teamId ) : bool |
Removes all team member entries pertaining to a given team.
|
|
UpdateTeam ( ContestTeam team ) : bool |
Updates an existing Team in the DB.
|
|
UpdateTeamMembers ( ContestTeam team ) : bool |
Updates the entry of any members already existing on the team, and creates new entries for new members of the team.
|
|
UpdateTeamScore ( int teamId ) : void |
Recalculates and updates the team's contest score.
|
|
UserCompetingInContest ( int userId, int contestId ) : bool |
Queries the DB to see if a user is registered for a particular contest.
|
Method | Description | |
---|---|---|
CalculateUserScore ( int userId, float initial, Statistic statistic ) : float |
Calculates the user's change in the relevant statistic since the beginning of the contest; their 'score' for the contest.
|
|
GetContestIdFromTeamId ( int teamId ) : int |
Retrieves the contest ID for the contest that a team is participating in.
|
public static CreateNewTeam ( ContestTeam team ) : int | ||
team | ActivEarth.Objects.Competition.Contests.ContestTeam | Team object to add to the DB. |
return | int |
public static CreateNewTeamMember ( ContestTeamMember teamMember, int teamId ) : int | ||
teamMember | ActivEarth.Objects.Competition.Contests.ContestTeamMember | Member to be added to the DB. |
teamId | int | Team ID that the member should be added to. |
return | int |
public static CreateNewTeamMember ( int userId, int teamId ) : int | ||
userId | int | ID of the Member to be added to the DB. |
teamId | int | Team ID that the member should be added to. |
return | int |
public static GetCompetitorCount ( int contestId ) : int | ||
contestId | int | ID of the contest. |
return | int |
public static GetTeamFromTeamId ( int teamId, bool loadMembers ) : ContestTeam | ||
teamId | int | Identifier of the team to retrieve. |
loadMembers | bool | Indicates whether or not the team member list should be populated. |
return | ActivEarth.Objects.Competition.Contests.ContestTeam |
public static GetTeamFromUserIdAndContestId ( int userId, int contestId, bool loadMembers ) : ContestTeam | ||
userId | int | ID of the user to match the team to. |
contestId | int | ID of the contest to match the team to. |
loadMembers | bool | Indicates whether or not the team member lists should be populated. |
return | ActivEarth.Objects.Competition.Contests.ContestTeam |
public static GetTeamIdsFromGroupId ( int groupId ) : List |
||
groupId | int | |
return | List |
public static GetTeamIdsFromUserId ( int userId ) : List |
||
userId | int | |
return | List |
public static GetTeamMembersFromTeamId ( int teamId ) : List |
||
teamId | int | Team ID to retrieve the members for. |
return | List |
public static GetTeamsFromContestId ( int contestId, bool loadMembers ) : List |
||
contestId | int | ID of the contest to load teams for. |
loadMembers | bool | Indicates whether or not the team member lists should be populated. |
return | List |
public static LockTeam ( ContestTeam team ) : void | ||
team | ActivEarth.Objects.Competition.Contests.ContestTeam | |
return | void |
public static RemoveTeam ( int teamId ) : bool | ||
teamId | int | |
return | bool |
public static RemoveTeamMemberFromUserIdAndContestId ( int userId, int contestId ) : bool | ||
userId | int | User to remove. |
contestId | int | Contest to remove the user from. |
return | bool |
public static RemoveTeamMembersFromTeamId ( int teamId ) : bool | ||
teamId | int | Team to remove the members from. |
return | bool |
public static UpdateTeam ( ContestTeam team ) : bool | ||
team | ActivEarth.Objects.Competition.Contests.ContestTeam | Team whose record needs updating. |
return | bool |
public static UpdateTeamMembers ( ContestTeam team ) : bool | ||
team | ActivEarth.Objects.Competition.Contests.ContestTeam | Team whose members must be updated. |
return | bool |
public static UpdateTeamScore ( int teamId ) : void | ||
teamId | int | |
return | void |
public static UserCompetingInContest ( int userId, int contestId ) : bool | ||
userId | int | ID of the user. |
contestId | int | ID of the contest to query. |
return | bool |