package _VisualDVM.GlobalData.EnvironmentValue;
import Common.Database.Tables.iDBTable;
import Common.Visual.DataSetControlForm;
import _VisualDVM.GlobalData.EnvironmentValue.UI.EnvironmentsValuesForm;

import javax.swing.*;
public class EnvironmentValuesDBTable extends iDBTable<EnvironmentValue> {
    public EnvironmentValuesDBTable() {
        super(EnvironmentValue.class);
    }
    @Override
    public String getSingleDescription() {
        return "переменная окружения";
    }
    @Override
    public String getPluralDescription() {
        return "переменные окружения";
    }
    @Override
    protected DataSetControlForm createUI(JPanel mountPanel) {
        return new EnvironmentsValuesForm(this, mountPanel);
    }
    public EnvironmentValue getEnvByName(String name_in) {
        for (EnvironmentValue environmentValue : Data.values())
            if (environmentValue.name.equalsIgnoreCase(name_in)) return environmentValue;
        return null;
    }
}
