Add missing repositories and update corresponding entities.

This commit is contained in:
Pol Dellaiera
2021-06-11 12:38:15 +02:00
parent f25365f651
commit 670ba1713a
14 changed files with 357 additions and 7 deletions

View File

@@ -0,0 +1,50 @@
<?php
declare(strict_types=1);
namespace Chill\MainBundle\Repository;
use Chill\MainBundle\Entity\Address;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use Doctrine\Persistence\ObjectRepository;
final class AddressRepository implements ObjectRepository
{
private EntityRepository $repository;
public function __construct(EntityManagerInterface $entityManager)
{
$this->repository = $entityManager->getRepository(Address::class);
}
public function find($id, $lockMode = null, $lockVersion = null): ?Address
{
return $this->repository->find($id, $lockMode, $lockVersion);
}
public function findOneBy(array $criteria, array $orderBy = null): ?Address
{
return $this->repository->findOneBy($criteria, $orderBy);
}
/**
* @return Address[]
*/
public function findAll(): array
{
return $this->repository->findAll();
}
/**
* @return Address[]
*/
public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array
{
return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
}
public function getClassName() {
return Address::class;
}
}

View File

@@ -0,0 +1,50 @@
<?php
declare(strict_types=1);
namespace Chill\MainBundle\Repository;
use Chill\MainBundle\Entity\Country;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use Doctrine\Persistence\ObjectRepository;
final class CountryRepository implements ObjectRepository
{
private EntityRepository $repository;
public function __construct(EntityManagerInterface $entityManager)
{
$this->repository = $entityManager->getRepository(Country::class);
}
public function find($id, $lockMode = null, $lockVersion = null): ?Country
{
return $this->repository->find($id, $lockMode, $lockVersion);
}
public function findOneBy(array $criteria, array $orderBy = null): ?Country
{
return $this->repository->findOneBy($criteria, $orderBy);
}
/**
* @return Country[]
*/
public function findAll(): array
{
return $this->repository->findAll();
}
/**
* @return Country[]
*/
public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array
{
return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
}
public function getClassName() {
return Country::class;
}
}

View File

@@ -0,0 +1,50 @@
<?php
declare(strict_types=1);
namespace Chill\MainBundle\Repository;
use Chill\MainBundle\Entity\GroupCenter;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use Doctrine\Persistence\ObjectRepository;
final class GroupCenterRepository implements ObjectRepository
{
private EntityRepository $repository;
public function __construct(EntityManagerInterface $entityManager)
{
$this->repository = $entityManager->getRepository(GroupCenter::class);
}
public function find($id, $lockMode = null, $lockVersion = null): ?GroupCenter
{
return $this->repository->find($id, $lockMode, $lockVersion);
}
public function findOneBy(array $criteria, array $orderBy = null): ?GroupCenter
{
return $this->repository->findOneBy($criteria, $orderBy);
}
/**
* @return GroupCenter[]
*/
public function findAll(): array
{
return $this->repository->findAll();
}
/**
* @return GroupCenter[]
*/
public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array
{
return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
}
public function getClassName() {
return GroupCenter::class;
}
}

View File

@@ -0,0 +1,50 @@
<?php
declare(strict_types=1);
namespace Chill\MainBundle\Repository;
use Chill\MainBundle\Entity\Language;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use Doctrine\Persistence\ObjectRepository;
final class LanguageRepository implements ObjectRepository
{
private EntityRepository $repository;
public function __construct(EntityManagerInterface $entityManager)
{
$this->repository = $entityManager->getRepository(Language::class);
}
public function find($id, $lockMode = null, $lockVersion = null): ?Language
{
return $this->repository->find($id, $lockMode, $lockVersion);
}
public function findOneBy(array $criteria, array $orderBy = null): ?Language
{
return $this->repository->findOneBy($criteria, $orderBy);
}
/**
* @return Language[]
*/
public function findAll(): array
{
return $this->repository->findAll();
}
/**
* @return Language[]
*/
public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array
{
return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
}
public function getClassName() {
return Language::class;
}
}

View File

@@ -0,0 +1,50 @@
<?php
declare(strict_types=1);
namespace Chill\MainBundle\Repository;
use Chill\MainBundle\Entity\PermissionsGroup;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use Doctrine\Persistence\ObjectRepository;
final class PermissionsGroupRepository implements ObjectRepository
{
private EntityRepository $repository;
public function __construct(EntityManagerInterface $entityManager)
{
$this->repository = $entityManager->getRepository(PermissionsGroup::class);
}
public function find($id, $lockMode = null, $lockVersion = null): ?PermissionsGroup
{
return $this->repository->find($id, $lockMode, $lockVersion);
}
public function findOneBy(array $criteria, array $orderBy = null): ?PermissionsGroup
{
return $this->repository->findOneBy($criteria, $orderBy);
}
/**
* @return PermissionsGroup[]
*/
public function findAll(): array
{
return $this->repository->findAll();
}
/**
* @return PermissionsGroup[]
*/
public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array
{
return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
}
public function getClassName() {
return PermissionsGroup::class;
}
}

View File

@@ -0,0 +1,50 @@
<?php
declare(strict_types=1);
namespace Chill\MainBundle\Repository;
use Chill\MainBundle\Entity\RoleScope;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use Doctrine\Persistence\ObjectRepository;
final class RoleScopeRepository implements ObjectRepository
{
private EntityRepository $repository;
public function __construct(EntityManagerInterface $entityManager)
{
$this->repository = $entityManager->getRepository(RoleScope::class);
}
public function find($id, $lockMode = null, $lockVersion = null): ?RoleScope
{
return $this->repository->find($id, $lockMode, $lockVersion);
}
public function findOneBy(array $criteria, array $orderBy = null): ?RoleScope
{
return $this->repository->findOneBy($criteria, $orderBy);
}
/**
* @return RoleScope[]
*/
public function findAll(): array
{
return $this->repository->findAll();
}
/**
* @return RoleScope[]
*/
public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array
{
return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
}
public function getClassName() {
return RoleScope::class;
}
}

View File

@@ -0,0 +1,50 @@
<?php
declare(strict_types=1);
namespace Chill\MainBundle\Repository;
use Chill\MainBundle\Entity\Scope;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use Doctrine\Persistence\ObjectRepository;
final class ScopeRepository implements ObjectRepository
{
private EntityRepository $repository;
public function __construct(EntityManagerInterface $entityManager)
{
$this->repository = $entityManager->getRepository(Scope::class);
}
public function find($id, $lockMode = null, $lockVersion = null): ?Scope
{
return $this->repository->find($id, $lockMode, $lockVersion);
}
public function findOneBy(array $criteria, array $orderBy = null): ?Scope
{
return $this->repository->findOneBy($criteria, $orderBy);
}
/**
* @return Scope[]
*/
public function findAll(): array
{
return $this->repository->findAll();
}
/**
* @return Scope[]
*/
public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array
{
return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
}
public function getClassName() {
return Scope::class;
}
}