public void update() throws ESellException
	{
		if (id == null) // User wurde noch nicht mit der DB abgeglichen.
		{
			throw new ESellException(ESellException.ErrorCode.NO_ENTRY_ERR);
		}
		
		makeConnection();
    	PreparedStatement preparedStatement = null;
    	
        if(conn != null)
        {
            try {
            	//Statement vorbereiten
                String sql = "UPDATE users SET username = ?, firstname = ?, lastname = ?, email = ?, password = ? WHERE id = ?";
                preparedStatement = conn.prepareStatement(sql);
                preparedStatement.setString(1, getUsername());
                preparedStatement.setString(2, getFirstname());
                preparedStatement.setString(3, getLastname());
                preparedStatement.setString(4, getEmailadress());
                preparedStatement.setString(5, getPassword());
                preparedStatement.setInt(6, id);
                
                //Statement absetzen
                int affectedRows = preparedStatement.executeUpdate();
                
                if(affectedRows > 0) 
                	return;
                else 
                {
        			throw new ESellException(ESellException.ErrorCode.UPDATE_ERR);
                }

            } catch (SQLException e) {
                //e.printStackTrace();
            	throw new ESellException(ESellException.ErrorCode.DB_ERR);
            }
        }
        else
        	throw new ESellException(ESellException.ErrorCode.DB_ERR);
	}