@Override public boolean equals(Object obj) { if (!(obj instanceof GlusterVolumeOptionEntity)) { return false; } GlusterVolumeOptionEntity option = (GlusterVolumeOptionEntity) obj; return (getId().equals(option.getId()) && (volumeId != null && volumeId.equals(option.getVolumeId())) && key.equals(option.getKey()) && value.equals(option.getValue())); }
/** * Remove the volume option in DB. If the option with given key already exists for the volume, * <br> * it will be deleted. * * @param option */ private void removeOptionInDb(GlusterVolumeOptionEntity option) { getGlusterOptionDao().removeVolumeOption(option.getId()); }