added equals() and hashCode() method to all entities

resolve #46