use of it.cnr.ict.domain.Category in project cool-jconon by consiglionazionaledellericerche.
the class HelpdeskService method createCategoria.
public Integer createCategoria(Integer idPadre, String nome, String descrizione) {
Category category = new Category();
category.setIdPadre(Optional.ofNullable(idPadre).map(Long::valueOf).orElse(new Long(1)));
category.setNome(nome);
category.setDescrizione(descrizione);
return oilService.map(oil -> oil.addCategory(category).intValue()).orElse(null);
}
Aggregations