final Long o = iObject.getDetails().getOwner().getId(); final Long g = iObject.getDetails().getGroup().getId();
final Long o = HibernateUtils.nullSafeOwnerId(iObject); final Long g = HibernateUtils.nullSafeGroupId(iObject);
	public boolean isOwnerOrSupervisor( IObject iObject )	{		if ( iObject == null ) throw new ApiUsageException("Object can't be null");		final Long o = iObject.getDetails().getOwner().getId();		final Long g = iObject.getDetails().getGroup().getId();				final EventContext ec = cd.getCurrentEventContext();		final boolean isAdmin = ec.isCurrentUserAdmin();		final boolean isPI    = ec.getLeaderOfGroupsList().contains(g);		final boolean isOwner = ec.getCurrentUserId().equals(o);		if (isAdmin || isPI || isOwner)		{			return true;		}		return false;	}