Project

General

Profile

« Previous | Next » 

Revision 6f9eb1fe

Added by Andreas Kohlbecker about 7 years ago

ref #6169 using RegistrationItem in the ListView

View differences:

src/main/java/eu/etaxonomy/cdm/mock/RegistrationService.java
37 37
@Transactional
38 38
public class RegistrationService {
39 39

  
40
    /**
41
     *
42
     */
43
    private static final int SIZE = 5; // FIXME test performance with 50 !!!!!
44

  
40 45
    @Autowired
41 46
    @Qualifier("cdmRepository")
42 47
    private CdmRepository repo;
......
57 62
    protected void init(){
58 63
        if(registrationsByUUID.size() == 0){
59 64
            TransactionStatus tx = repo.startTransaction(true);
60
            while(registrationsByUUID.size() < 20){
61
                List<TaxonNameBase> names = repo.getNameService().list(TaxonNameBase.class, 100, 0, null, null);
65
            int pageIndex = 0;
66
            while(registrationsByUUID.size() < SIZE){
67
                List<TaxonNameBase> names = repo.getNameService().list(TaxonNameBase.class, 100, pageIndex++, null, null);
62 68
                for(TaxonNameBase name : names){
63 69
                    if(name != null && name.getRank() != null && name.getRank().isLower(Rank.SUBFAMILY())){
64 70
                        if(name.getTypeDesignations().size() > minTypeDesignationCount - 1) {

Also available in: Unified diff