public final class VoteHome extends Object
| Modifier and Type | Method and Description |
|---|---|
static Map<String,Integer> |
countNbVotesByCampaignCode()
Return number of votes by campaign
|
static Map<String,Map<String,Integer>> |
countNbVotesByDateAllCampaigns()
Return number of votes by campaign then by date
|
static Map<String,Integer> |
countNbVotesByLocation(int campaignId)
Return number of votes by location for a campaign
|
static Map<Integer,Integer> |
countNbVotesByProjectId(int campaignId)
Return number of votes by project for a campaign
|
static Map<String,Integer> |
countNbVotesByTheme(int campaignId)
Return number of votes by theme for a campaign
|
static Vote |
create(Vote vote)
Create an instance of the vote class
|
static List<String> |
getAllUserId() |
static Vote |
getVote(String strUserId,
int nIdProject) |
static List<Vote> |
getVotesList()
Load the data of all the vote objects and returns them in form of a list
|
static List<Vote> |
getVoteUser(String strUserId) |
static List<Vote> |
getVoteUser(String userId,
int status) |
static int |
getVoteUserArrondissement(String strUserId,
int nLocation) |
static int |
getVoteUserNotLocation(String strUserId,
int nLocation) |
static void |
remove(String strUserId,
int nProjetId)
Remove the vote whose identifier is specified in parameter
|
static void |
removeAll(String strUserId) |
static void |
validateVote(String userId,
int status) |
public static Vote create(Vote vote)
vote - The instance of the Vote which contains the informations to storepublic static void remove(String strUserId, int nProjetId)
nVoteId - The vote Idplugin - the Pluginpublic static List<Vote> getVotesList()
public static void removeAll(String strUserId)
nUserId - nProjetId - public static int getVoteUserArrondissement(String strUserId, int nLocation)
nUserId - nLocation - public static int getVoteUserNotLocation(String strUserId, int nLocation)
nUserId - nLocation - public static Map<String,Integer> countNbVotesByCampaignCode()
public static Map<String,Map<String,Integer>> countNbVotesByDateAllCampaigns()
public static Map<String,Integer> countNbVotesByTheme(int campaignId)
campaignId - The id of the campaignpublic static Map<Integer,Integer> countNbVotesByProjectId(int campaignId)
campaignId - The id of the campaignpublic static Map<String,Integer> countNbVotesByLocation(int campaignId)
campaignId - The id of the campaignpublic static Vote getVote(String strUserId, int nIdProject)
strUserId - nIdProject - public static void validateVote(String userId, int status)
nUserId - nStatus - Copyright © 2020 City of Paris. All rights reserved.