@Override
    public Mortgage createNewChild(TreeMap<String, String> properties) {
        Mortgage mortgage = new Mortgage();
        mortgage.setName(properties.get(NAME));
        String startCapitalString = properties.get(Mortgages.TOTAL);
        String nrPayedString = properties.get(Mortgages.NRPAYED);
        if(startCapitalString!=null){
            mortgage.setStartCapital(new BigDecimal(startCapitalString));
        }
        if(nrPayedString!=null){
            mortgage.setAlreadyPayed(Integer.parseInt(nrPayedString));
        }
        String capitalAccount = properties.get(Mortgages.CAPITAL_ACCOUNT);
        if(capitalAccount!=null){
            mortgage.setCapitalAccount(accounts.getBusinessObject(capitalAccount));
        }
        String intrestAccount = properties.get(Mortgages.INTREST_ACCOUNT);
        if(intrestAccount!=null){
            mortgage.setIntrestAccount(accounts.getBusinessObject(intrestAccount));
        }
        return mortgage;
    }