<commit_before>package nuclibook.models;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;
import nuclibook.server.Renderable;

import java.util.HashMap;

@DatabaseTable(tableName = "staff_availabilities")
public class StaffAvailability implements Renderable {

    @DatabaseField(generatedId = true)
    private Integer id;

    @DatabaseField(canBeNull = false, foreign = true, columnName = "staff_id", foreignAutoRefresh = true)
    private Staff staff;

    @DatabaseField
    private int day;

    @DatabaseField(columnName = "start_time")
    private int startTime;

    @DatabaseField(columnName = "end_time")
    private int endTime;

    public StaffAvailability() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Staff getStaff() {
        return staff;
    }

    public void setStaff(Staff staff) {
        this.staff = staff;
    }

    public int getDay() {
        return day;
    }

    public void setDay(int day) {
        this.day = day;
    }

    public TimeOfDay getStartTime() {
        try {
            return new TimeOfDay(startTime);
        } catch (InvalidTimeOfDayException e) {
            e.printStackTrace();
            return null;
        }
    }

    public void setStartTime(TimeOfDay startTime) {
        this.startTime = startTime.getSecondsPastMidnight();
    }

    public TimeOfDay getEndTime() {
        try {
            return new TimeOfDay(endTime);
        } catch (InvalidTimeOfDayException e) {
            e.printStackTrace();
            return null;
        }
    }

    public void setEndTime(TimeOfDay endTime) {
        this.endTime = endTime.getSecondsPastMidnight();
    }

    @Override
    public HashMap<String, String> getHashMap() {
        String[] dayLabels = new String[] {"", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"};
        return new HashMap<String, String>() {{
            put("id", getId().toString());
            put("day-of-week", getDay() + "");
            put("day-of-week-label", dayLabels[getDay()]);
            put("start-time", getStartTime().getHour() + ":" + getStartTime().getMinute());
            put("end-time", getEndTime().getHour() + ":" + getEndTime().getMinute());
        }};
    }
}<commit_msg>added <NAME>  sujestun<commit_after>package nuclibook.models;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;
import nuclibook.server.Renderable;

import java.util.HashMap;

@DatabaseTable(tableName = "staff_availabilities")
public class StaffAvailability implements Renderable {

    @DatabaseField(generatedId = true)
    private Integer id;

    @DatabaseField(canBeNull = false, foreign = true, columnName = "staff_id", foreignAutoRefresh = true)
    private Staff staff;

    @DatabaseField
    private int day;

    @DatabaseField(columnName = "start_time")
    private int startTime;

    @DatabaseField(columnName = "end_time")
    private int endTime;

    public StaffAvailability() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Staff getStaff() {
        return staff;
    }

    public void setStaff(Staff staff) {
        this.staff = staff;
    }

    public int getDay() {
        return day;
    }

    public void setDay(int day) {
        this.day = day;
    }

    public TimeOfDay getStartTime() {
        try {
            return new TimeOfDay(startTime);
        } catch (InvalidTimeOfDayException e) {
            e.printStackTrace();
            return null;
        }
    }

    public void setStartTime(TimeOfDay startTime) {
        this.startTime = startTime.getSecondsPastMidnight();
    }

    public TimeOfDay getEndTime() {
        try {
            return new TimeOfDay(endTime);
        } catch (InvalidTimeOfDayException e) {
            e.printStackTrace();
            return null;
        }
    }

    public void setEndTime(TimeOfDay endTime) {
        this.endTime = endTime.getSecondsPastMidnight();
    }

    @Override
    public HashMap<String, String> getHashMap() {
        String[] dayLabels = new String[]{"", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"};
        return new HashMap<String, String>() {{
            put("id", getId().toString());
            put("day-of-week", getDay() + "");
            put("day-of-week-label", dayLabels[getDay()]);
            put("start-time", (getStartTime().getHour() < 10 ? "0" : "") + getStartTime().getHour() + ":" + (getStartTime().getMinute() < 10 ? "0" : "") + getStartTime().getMinute());
            put("end-time", (getEndTime().getHour() < 10 ? "0" : "") + getEndTime().getHour() + ":" + (getEndTime().getMinute() < 10 ? "0" : "") + getEndTime().getMinute());
        }};
    }
}
{'fraction_non_alphanumeric': 0.13039934800325997, 'fraction_numerical': 0.004889975550122249, 'mean_word_length': 2.549530007230658, 'pattern_counts': {'":': 4, '<': 12, '<?xml version=': 0, '>': 8, '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': '7482949', 'n_tokens_mistral': 1523, 'n_tokens_neox': 1434, 'n_words': 318}