@Override
    public boolean equals(Object obj) {
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        if (this == obj)
            return true;
        final BaseEntity other = (BaseEntity) obj;
        if ((null != id) && (null == other.getId()))
            return false;
        if ((null == id) && (null != other.getId()))
            return false;
        if (id.longValue() != other.getId().longValue())
            return false;
        return true;
    }