<commit_before>package org.sanelib.ils.core.dao.read.admin.mapper;


import org.sanelib.ils.core.dao.read.DataResultSet;
import org.sanelib.ils.core.dao.read.ViewMapper;
import org.sanelib.ils.core.domain.view.admin.AccessionSeriesView;
import org.sanelib.ils.core.enums.AccessionSeriesType;
import org.springframework.stereotype.Component;

import java.sql.SQLException;

@Component
public class AccessionSeriesMapper implements ViewMapper<AccessionSeriesView> {

    @Override
    public AccessionSeriesView map(DataResultSet rs) throws SQLException {

        final String accession_series = "accession_series";

        final AccessionSeriesView accessionSeriesView = new AccessionSeriesView();

        accessionSeriesView.setLibraryId(rs.getInt(accession_series, "library_id"));
        accessionSeriesView.setSeriesName(rs.getString(accession_series, "series_name"));
        accessionSeriesView.setAccessionSeriesType(AccessionSeriesType.getByValue(rs.getString(accession_series , "fixed_variable")));
        accessionSeriesView.setPrefix(rs.getString(accession_series, "prefix"));
        accessionSeriesView.setMaxNumber(rs.getInt(accession_series, "max_number"));
        accessionSeriesView.setMaxZero(rs.getInt(accession_series, "max_zero"));

        return accessionSeriesView;
    }<commit_msg>Correcting variable name to follow variable naming conventions.<commit_after>package org.sanelib.ils.core.dao.read.admin.mapper;


import org.sanelib.ils.core.dao.read.DataResultSet;
import org.sanelib.ils.core.dao.read.ViewMapper;
import org.sanelib.ils.core.domain.view.admin.AccessionSeriesView;
import org.sanelib.ils.core.enums.AccessionSeriesType;
import org.springframework.stereotype.Component;

import java.sql.SQLException;

@Component
public class AccessionSeriesMapper implements ViewMapper<AccessionSeriesView> {

    @Override
    public AccessionSeriesView map(DataResultSet rs) throws SQLException {

        final String accessionSeries = "accession_series";

        final AccessionSeriesView accessionSeriesView = new AccessionSeriesView();

        accessionSeriesView.setLibraryId(rs.getInt(accessionSeries, "library_id"));
        accessionSeriesView.setSeriesName(rs.getString(accessionSeries, "series_name"));
        accessionSeriesView.setAccessionSeriesType(AccessionSeriesType.getByValue(rs.getString(accessionSeries , "fixed_variable")));
        accessionSeriesView.setPrefix(rs.getString(accessionSeries, "prefix"));
        accessionSeriesView.setMaxNumber(rs.getInt(accessionSeries, "max_number"));
        accessionSeriesView.setMaxZero(rs.getInt(accessionSeries, "max_zero"));

        return accessionSeriesView;
    }
{'fraction_non_alphanumeric': 0.09568480300187618, 'fraction_numerical': 0.0, 'mean_word_length': 5.615384615384615, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6748083', 'n_tokens_mistral': 773, 'n_tokens_neox': 764, 'n_words': 107}