public boolean isObjectInUse(User user) {
UserProjectActivity upa = userProjectActivityDao.findMaxOneObject("select * from UserProjectActirviy upa where upa.user = ?1", user);
if (upa != null) {
return true;
}
Contract contract = contractDao.findMaxOneObject("select * from Contract c where c.user = ?1", user);
if (contract != null) {
return true;
}
return false;
}