List<DaoCommunityAccount2> resultsTmp = (List<DaoCommunityAccount2>) query.execute(user);
if(resultsTmp.size() != 0 )
{
DaoCommunityAccount2 daoComAcc = resultsTmp.get(0);
CommunityAccount comAcc= TransformDtoObject.TransformDaoCommunityAccountToCommunityAccount(daoComAcc);
String previousDate = "";
for (DaoCommunityAccount2 myDaoCommunityAccount : resultsTmp ) {
//si 2 dates identiques se suivent on ne prend la deuxième
String dateCurrent = "";
if (myDaoCommunityAccount.getDateCommunityAccount() != null) {
dateCurrent = sdf.format(myDaoCommunityAccount.getDateCommunityAccount());
if (!dateCurrent.equalsIgnoreCase(previousDate)) {
comAcc.listDates.add(dateCurrent);
comAcc.listbattles.add(myDaoCommunityAccount.getData().getStats().getBattles());
comAcc.listBattlesWins.add(myDaoCommunityAccount.getData().getStats().getBattle_wins());
CommunityAccount comA= TransformDtoObject.TransformDaoCommunityAccountToCommunityAccount(myDaoCommunityAccount);
comAcc.listDataPlayerInfos.add(comA.getData());
}
}
previousDate = dateCurrent;
}
resultsFinal.add(comAcc);