@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof AssetVocabulary)) { return false; } AssetVocabulary assetVocabulary = (AssetVocabulary) obj; long primaryKey = assetVocabulary.getPrimaryKey(); if (getPrimaryKey() == primaryKey) { return true; } else { return false; } }