userExists = TurbineSecurity.accountExists(user);
groupExists = checkExists(group);
roleExists = checkExists(role);
if (userExists && groupExists && roleExists)
{
Criteria criteria = new Criteria();
criteria.add(UserGroupRolePeer.USER_ID,
((BaseObject) user).getPrimaryKey());
criteria.add(UserGroupRolePeer.GROUP_ID,
((BaseObject) group).getPrimaryKey());
criteria.add(UserGroupRolePeer.ROLE_ID,
((BaseObject) role).getPrimaryKey());
UserGroupRolePeer.doInsert(criteria);
return;
}
}