<commit_before>package ru.apetrov.dao;

import ru.apetrov.models.Role;

import java.util.Set;

public class RoleImpl extends ModelBaseDAO<Role,Long> {

    @Override
    public void create(Role role) {

    }

    @Override
    public Role getById(Long id) {
        return null;
    }

    @Override
    public Set<Role> getAll() {
        return null;
    }

    @Override
    public void update(Role role) {

    }

    @Override
    public void remove(Long id) {

    }
}
<commit_msg>TestTask-9: (реализация метода create у RpleImpl)<commit_after>package ru.apetrov.dao;

import ru.apetrov.models.Role;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.Set;

public class RoleImpl extends ModelBaseDAO<Role,Long> {

    @Override
    public void create(Role role) {
        Connection connection = super.getConnection();
        try (PreparedStatement statement = connection.prepareStatement("INSERT INTO roles(id, role) VALUES(?, ?)")) {
            statement.setInt(1, role.getId());
            statement.setString(2, role.getRoleType());
            statement.execute();
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }

    @Override
    public Role getById(Long id) {
        return null;
    }

    @Override
    public Set<Role> getAll() {
        return null;
    }

    @Override
    public void update(Role role) {

    }

    @Override
    public void remove(Long id) {

    }
}

{'fraction_non_alphanumeric': 0.10596914822266935, 'fraction_numerical': 0.002012072434607646, 'mean_word_length': 2.5271867612293146, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3401618', 'n_tokens_mistral': 467, 'n_tokens_neox': 454, 'n_words': 109}