@Override
    public Integer getIdFromDataBase() throws SQLException{
        Connection connection = ua.edu.odeku.pet.database.ConnectionDataBase.getConnection();
        Statement statement = connection.createStatement();
        if(nameDepartment == null || nameDepartment.isEmpty()){
            return null;
        } else if(idFaculty == null || idFaculty.getIdFaculty() == null){
            return null;
        }
        ResultSet rs = statement.executeQuery("Select id_department from Department "
                + "where name_department = '"+nameDepartment+"' and id_faculty = "+idFaculty.getIdFaculty()+";");
        if(rs.next()){
            Integer id = rs.getInt(1);
            return id;
        } else {
            return null;
        }
    }