class DefaultIdmProcessedTaskItemService extends AbstractReadWriteDtoService<IdmProcessedTaskItemDto, IdmProcessedTaskItem, IdmProcessedTaskItemFilter> implements IdmProcessedTaskItemService {

	@Override
	@Transactional
	public IdmProcessedTaskItemDto saveInternal(IdmProcessedTaskItemDto dto) {
		Assert.notNull(dto, "DTO is required.");
		//
		if (dto.getLongRunningTask() != null && dto.getScheduledTaskQueueOwner() != null) {
			throw new CoreException("Item cannot be in both scheduled task queue and long running task log.");
		}
		if (dto.getLongRunningTask() == null && dto.getScheduledTaskQueueOwner() == null) {
			throw new CoreException("Item must have either queue (IdmScheduledTask) or log (IdmLongRunningTask) association.");
		}
		return super.saveInternal(dto);
	}

	@Autowired public  DefaultIdmProcessedTaskItemService(IdmProcessedTaskItemRepository repository);

}