package com.eactive.eai.rms.data.entity.man.user;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.eactive.eai.rms.data.jpa.AbstractEMSDataSerivce;
import com.querydsl.core.types.dsl.BooleanExpression;

@Service
@Transactional(transactionManager = "transactionManagerForEMS")
public class UserAthrRoleChgHistoryService
		extends AbstractEMSDataSerivce<UserAthrRoleChgHistory, Integer, UserAthrRoleChgHistoryRepository> {

	public Page<UserAthrRoleChgHistory> findAll(Pageable pageable, String userId) {

		BooleanExpression predicate = QUserAthrRoleChgHistory.
				userAthrRoleChgHistory.userId.eq(userId);

		return repository.findAll(predicate, pageable);
	}

}