use of com.marshalchen.common.usefulModule.standuptimer.model.Meeting in project UltimateAndroid by cymcsg.
the class MeetingDAO method createMeetingFromCursorData.
private Meeting createMeetingFromCursorData(Cursor cursor) {
long id = cursor.getLong(0);
String teamName = cursor.getString(1);
Date meetingTime = new Date(cursor.getLong(2));
int numParticipants = cursor.getInt(3);
int individualStatusLength = cursor.getInt(4);
int meetingLength = cursor.getInt(5);
int quickestStatus = cursor.getInt(6);
int longestStatus = cursor.getInt(7);
return new Meeting(id, new Team(teamName), meetingTime, numParticipants, individualStatusLength, meetingLength, quickestStatus, longestStatus);
}
use of com.marshalchen.common.usefulModule.standuptimer.model.Meeting in project UltimateAndroid by cymcsg.
the class StandupTimer method storeMeetingStats.
private void storeMeetingStats() {
if (team != null) {
long meetingEndTime = System.currentTimeMillis();
if (individualStatusEndTime == 0) {
individualStatusEndTime = meetingEndTime;
}
try {
Meeting meeting = new Meeting(team, new Date(meetingStartTime), completedParticipants, (int) ((individualStatusEndTime - individualStatusStartTime) / 1000), (int) ((meetingEndTime - meetingStartTime) / 1000), quickestStatus, longestStatus);
persistMeeting(meeting);
} catch (IllegalArgumentException e) {
Logger.e("Could not store the meeting in the database. " + e);
}
}
}
use of com.marshalchen.common.usefulModule.standuptimer.model.Meeting in project UltimateAndroid by cymcsg.
the class TeamDetails method deleteMeeting.
private void deleteMeeting(String dateString) {
try {
Date date = new SimpleDateFormat(Meeting.DESCRIPTION_FORMAT).parse(dateString);
Meeting meeting = Meeting.findByTeamAndDate(team, date, this);
meeting.delete(this);
} catch (ParseException e) {
Logger.e(e.getMessage());
Logger.e("Could not parse the date string '" + dateString + "'. Will not attempt to delete the meeting.");
}
}
Aggregations