@Override public void update(Context context, MetadataValue metadataValue) throws SQLException { metadataValueDAO.save(context, metadataValue); log.info(LogManager.getHeader(context, "update_metadatavalue", "metadata_value_id=" + metadataValue.getID())); }
@Override public int hashCode() { int hash = 7; hash = 47 * hash + this.id; hash = 47 * hash + this.getID(); hash = 47 * hash + this.getDSpaceObject().getID().hashCode(); return hash; }
@Override public void delete(Context context, MetadataValue metadataValue) throws SQLException { log.info(LogManager.getHeader(context, "delete_metadata_value", " metadata_value_id=" + metadataValue.getID())); metadataValueDAO.delete(context, metadataValue); }
/** * Return <code>true</code> if <code>other</code> is the same MetadataValue * as this object, <code>false</code> otherwise * * @param obj object to compare to * @return <code>true</code> if object passed in represents the same * MetadataValue as this object */ @Override public boolean equals(Object obj) { if (obj == null) { return false; } Class<?> objClass = HibernateProxyHelper.getClassWithoutInitializingProxy(obj); if (getClass() != objClass) { return false; } final MetadataValue other = (MetadataValue) obj; if (this.id != other.id) { return false; } if (this.getID() != other.getID()) { return false; } if (this.getDSpaceObject().getID() != other.getDSpaceObject().getID()) { return false; } return true; }