package com.eactive.eai.rms.data.entity.onl.audit;

import org.hibernate.envers.RevisionListener;

import com.eactive.eai.rms.common.login.SessionManager;

public class CustomRevisionListener implements RevisionListener {

	@Override
	public void newRevision(Object revisionEntity) {
		CustomRevisionEntity customRevisionEntity = (CustomRevisionEntity) revisionEntity;
		String userId = SessionManager.getLoginVo().getUserId();
		customRevisionEntity.setUserId(userId);
	}
}
