/** * Reload an entity from the database into the cache. This method will return a reference to the "attached" * entity. This means changes to the entity will be tracked and persisted to the database. * * @param entity The entity to reload * @param <E> The class of the enity. The entity must implement the {@link ReloadableEntity} interface. * @return A (possibly) <b>NEW</b> reference to the entity that should be used for further processing. * @throws SQLException When reloading the entity from the database fails. */ @SuppressWarnings("unchecked") public <E extends ReloadableEntity> E reloadEntity(E entity) throws SQLException { return (E) dbConnection.reloadEntity(entity); }