Java tutorial
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package br.edu.claudivan.controledegastos.domain; import java.io.Serializable; import org.apache.commons.lang3.builder.ReflectionToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; /** * * @author Claudivan Moreira */ public class Category extends AbstractEntity implements Serializable { public enum CategoryType { EXPENSE, INCOME } private String name; private CategoryType type; public String getName() { return name; } public void setName(String name) { this.name = name; } public CategoryType getType() { return type; } public void setType(CategoryType type) { this.type = type; } @Override public String toString() { return ReflectionToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); } }