@Override
    public boolean equals(Object object) {
        if (!(object instanceof DescricaoPreco)) {
            return false;
        }
        DescricaoPreco other = (DescricaoPreco) object;
        if ((this.getCodigo() == null && other.getCodigo() != null) || (this.getCodigo() != null && !this.getCodigo().equals(other.getCodigo()))) {
            return false;
        }
        return true;
    }