private long persistPhysical(Physical physical, String table)
			throws SQLException {

		Connection connection = null;
		PreparedStatement preparedStatement = null;

		String insertSQL = "INSERT INTO "
				+ table
				+ "(bank_account,name,surname,patronymic,passport_series,passport_number,phone) VALUES"
				+ "(?,?,?,?,?,?,?)";

		try {
			connection = provider.getConnection();
			preparedStatement = connection.prepareStatement(insertSQL,
					Statement.RETURN_GENERATED_KEYS);

			preparedStatement.setString(1, physical.getBankAccount());
			preparedStatement.setString(2, physical.getName());
			preparedStatement.setString(3, physical.getSurname());
			preparedStatement.setString(4, physical.getPatronymic());
			preparedStatement.setString(5, physical.getPassportSeries());
			preparedStatement.setString(6, physical.getPassportNumber());
			preparedStatement.setString(7, physical.getPhone());

			preparedStatement.executeUpdate();

			long lastInsertID = getLastInsertId(preparedStatement);
			return lastInsertID;

		} catch (SQLException e) {
			if (e.getSQLState().equals(IConnectionProvider.DUPLICATE_STATE)) {
				logger.warn("Duplicate entry. Keep working");
				return -1;
			} else {
				logger.error("SQL error during 'persistDetails'", e);
				throw e;

			}
		} finally {

			if (preparedStatement != null) {
				preparedStatement.close();
			}

			if (connection != null) {
				connection.close();
			}

		}

	}