. */ namespace SP\Domain\User\In; use SP\Core\Exceptions\ConstraintException; use SP\Core\Exceptions\QueryException; use SP\Domain\Common\In\RepositoryInterface; use SP\Infrastructure\Database\QueryResult; /** * Class UserGroupRepository * * @package SP\Infrastructure\User\Repositories */ interface UserGroupRepositoryInterface extends RepositoryInterface { /** * Returns the items that are using the given group id * * @param $id int * * @return QueryResult * @throws ConstraintException * @throws QueryException */ public function getUsage(int $id): QueryResult; /** * Returns the users that are using the given group id * * @param $id int * * @return QueryResult * @throws ConstraintException * @throws QueryException */ public function getUsageByUsers(int $id): QueryResult; /** * Returns the item for given name * * @param string $name * * @return QueryResult * @throws ConstraintException * @throws QueryException */ public function getByName(string $name): QueryResult; }