ArrayList numberoffields = new ArrayList(NUMBEROFPARAMETERS);
ArrayList numberoffields = (ArrayList)   data.get(NUMBERARRAY);
    public void upgrade() {        log.debug(">upgrade");        if(LATEST_VERSION != getVersion()){            log.info("upgrading entityprofile with version "+getVersion());            // New version of the class, upgrade            if(getVersion() < 1){                ArrayList numberarray = (ArrayList)   data.get(NUMBERARRAY);                while(numberarray.size() < 37){                   numberarray.add(new Integer(0));                }                data.put(NUMBERARRAY,numberarray);              }            if(getVersion() < 2){                ArrayList numberarray = (ArrayList)   data.get(NUMBERARRAY);                while(numberarray.size() < 39){                   numberarray.add(new Integer(0));                }                data.put(NUMBERARRAY,numberarray);                                addField(AVAILCAS);                addField(DEFAULTCA);                setRequired(AVAILCAS,0,true);                setRequired(DEFAULTCA,0,true);            }            if(getVersion() < 3){                setNotificationSubject("");                setNotificationSender("");                setNotificationMessage("");            }                        if(getVersion() < 4){                ArrayList numberoffields = new ArrayList(NUMBEROFPARAMETERS);                                for(int i =numberoffields.size(); i < NUMBEROFPARAMETERS; i++){                  numberoffields.add(new Integer(0));                }                data.put(NUMBERARRAY,numberoffields);                            }                        data.put(VERSION, new Float(LATEST_VERSION));        }        log.debug("<upgrade");    }