@Test void createDecoratedRepository() { @SuppressWarnings("unchecked") Repository<Role> repository = mock(Repository.class); EntityType entityType = mock(EntityType.class); when(repository.getEntityType()).thenReturn(entityType); Repository<Role> decoratedRepository = roleRepositoryDecoratorFactory.createDecoratedRepository(repository); assertEquals(entityType, decoratedRepository.getEntityType()); }
@Override public Repository<Role> createDecoratedRepository(Repository<Role> repository) { return new RoleRepositoryDecorator(repository, cachedRoleHierarchy); }
RoleRepositoryDecoratorFactory extends AbstractSystemRepositoryDecoratorFactory<Role, RoleMetadata> { @Override public Repository<Role> createDecoratedRepository(Repository<Role> repository) { return new RoleRepositoryDecorator(repository, cachedRoleHierarchy); } }
RoleRepositoryDecoratorFactory extends AbstractSystemRepositoryDecoratorFactory<Role, RoleMetadata> { @Override public Repository<Role> createDecoratedRepository(Repository<Role> repository) { return new RoleRepositoryDecorator(repository, cachedRoleHierarchy); } RoleRepositoryDecoratorFactory(
      RoleMetadata roleMetadata, CachedRoleHierarchy cachedRoleHierarchy); }
RoleRepositoryDecoratorFactory extends AbstractSystemRepositoryDecoratorFactory<Role, RoleMetadata> { @Override public Repository<Role> createDecoratedRepository(Repository<Role> repository) { return new RoleRepositoryDecorator(repository, cachedRoleHierarchy); } RoleRepositoryDecoratorFactory(
      RoleMetadata roleMetadata, CachedRoleHierarchy cachedRoleHierarchy); @Override Repository<Role> createDecoratedRepository(Repository<Role> repository); }
RoleRepositoryDecoratorFactory extends AbstractSystemRepositoryDecoratorFactory<Role, RoleMetadata> { @Override public Repository<Role> createDecoratedRepository(Repository<Role> repository) { return new RoleRepositoryDecorator(repository, cachedRoleHierarchy); } RoleRepositoryDecoratorFactory(
      RoleMetadata roleMetadata, CachedRoleHierarchy cachedRoleHierarchy); @Override Repository<Role> createDecoratedRepository(Repository<Role> repository);  }