public int[] getCadeiras(int id) throws NumeroInvalidoException, PeriodoNaoExisteException { int[] cadeiras2 = null; String check = id + ""; if (!check.matches("^[0-9]{1,45}$")) { throw new NumeroInvalidoException(); } else if (this.rep.isItReal(id)) { Periodo p = this.rep.searchPeriodo(id); cadeiras2 = p.getCadeiras(); } return cadeiras2; }