class Materials extends AbstractFinanceRowItem {

    @Override
    public BigDecimal getTotal() {
        // calculated, no validation
        BigDecimal total = BigDecimal.ZERO;
        if (quantity != null && cost != null) {
            total = cost.multiply(new BigDecimal(quantity));
        }
        return total;
    }

    private  Materials();
    public  Materials(Long targetId);
    public  Materials(Long id, String item, BigDecimal cost, Integer quantity, Long targetId);

}