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