public User insert(User user) {
		if (user == null)
			return null;

		try {

			Connection connection = DataSourceUtils.getConnection(dataSource);

			PreparedStatement statement = connection.prepareStatement(
					"INSERT INTO usuario (name, last_name,email, password,admin) "
							+ "VALUES (?, ?, ?, ?, ?)",
					Statement.RETURN_GENERATED_KEYS);

			statement.setString(1, user.getName());
			statement.setString(2, user.getlastName());
			statement.setString(3, user.getEmail());
			statement.setString(4, user.getPassword());
			statement.setBoolean(5, user.getAdmin());

			statement.executeUpdate();

			ResultSet resultSet = statement.getGeneratedKeys();

			if (resultSet != null && resultSet.next())
				user.setId(resultSet.getInt(1));
			//connection.close();
		} catch (SQLException e) {
			throw new RuntimeException(e);
		}

		return user;
	}