@Override
	public List<ECollisionType> getCollisions(Long id, Long lecturerId,
			List<Long> roomIds, List<Long> studentGroupIds,
			int numberOfAppointments, Date startDate, Date endDate) {
		if (id != null) {
			return new ArrayList<ECollisionType>();
		}
		// The set with all found collionsTypes
		Set<ECollisionType> collisionsSet = new HashSet<ECollisionType>();

		// generate appointments
		Set<Appointment> appointments = meetingService.createAppointments(
				numberOfAppointments, startDate, endDate);
		
		for (Appointment appointment : appointments) {
			// set start and end date
			Date start = appointment.getStart();
			Date end = appointment.getEnd();
			
			for (Long roomId : roomIds) {
				// Check for RoomCollisions
				if (this.roomService.isOccupied(roomId, start, end)) {
					collisionsSet.add(ECollisionType.ROOM_OCCUPIED);
				}
				// Check for RoomSizeCollisions
				for (Long studentGroupId : studentGroupIds) {
					if (!this.roomService.hasEnoughSeats(roomId, studentGroupId)) {
						collisionsSet.add(ECollisionType.ROOM_TOO_SMALL);
					}
				}
			}
			// Check for LecturerCollisions
			if (lecturerService.isBusy(lecturerId, start, end)) {
				collisionsSet.add(ECollisionType.LECTURER_BUSY);
			}
	
			// Check for StudentGroupCollisions
			for (Long studentGroupId : studentGroupIds) {
				if (studentGroupService.isBusy(studentGroupId, start, end)) {
					collisionsSet.add(ECollisionType.STUDENTGROUP_BUSY);
				}
			}
		}
		// returns a List of all found collsionTypes
		return new ArrayList<ECollisionType>(collisionsSet);
	}