private Map<String, Object> mapColumns(Product product) { Map<String, Object> params = new HashMap<>(); params.put("id", product.getId()); params.put("name", product.getName()); params.put("desc", product.getDescription()); params.put("price", product.getPrice()); params.put("seller_id", product.getSeller().getId()); params.put("reg_time", product.getRegisteredTime().format(formatter)); return params; }