public static void inicializar(String repositoryType){
		switch(repositoryType){
		case "array":
			compras = new ManagerCompras(comprasArray);
			contas = new ManagerConta(contasArray);
			servicos = new ManagerServico(servicosArray);
			break;
		case "arquivo":
			String pathname = "planilha.xls"; //Guarda o caminho relativo ate a planilha.
			File file = new File(pathname);
			POIFSFileSystem fs;
			InputStream inputStream = null;
			try
			{
				if(file.exists()){ 
					inputStream = new FileInputStream (pathname); //Cria um InputStream e seta o WorkBook.
					fs = new POIFSFileSystem(inputStream);
					wb = new HSSFWorkbook(fs);
					contasArquivo = new RepositorioContasArquivo(wb);
					contas = new ManagerConta(contasArquivo);
					comprasArquivo = new RepositorioCompraArquivo(wb);
					compras = new ManagerCompras(comprasArquivo);
					servicosArquivo = new RepositorioServicoArquivo(wb);
					servicos = new ManagerServico(servicosArquivo);
				}else{
					file.createNewFile(); //Cria o arquivo planilha.xls.
					inputStream = new FileInputStream (new File("planilha.xls")); 
					FileOutputStream output = new FileOutputStream(new File(pathname));
					wb = new HSSFWorkbook(); //Seta o novo workBook e as workSheets padrao.
					wb.createSheet("contas");
					wb.createSheet("compras");
					wb.createSheet("servicos");
					wb.write(output);
					contasArquivo = new RepositorioContasArquivo(wb);
					contas = new ManagerConta(contasArquivo);
					comprasArquivo = new RepositorioCompraArquivo(wb);
					compras = new ManagerCompras(comprasArquivo);
					servicosArquivo = new RepositorioServicoArquivo(wb);
					servicos = new ManagerServico(servicosArquivo);
					
				}
			}
			catch (FileNotFoundException e)
			{
				System.out.println ("File not found in the specified path.");
				e.printStackTrace ();
			} catch (IOException e) {
				e.printStackTrace();
			}



			try {
				inputStream.close(); //Fechamos um input para utilizarmos o output.
			} catch (IOException e) {
				e.printStackTrace();
			}

			FileOutputStream stream = null;
			try {
				stream = new FileOutputStream("planilha.xls"); 
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			}



			try {
				wb.write(stream); //Executar as modificacoes de fato.
				stream.close();
			} catch (IOException e) {
				e.printStackTrace();
			}


			break;
		case "lista": //IF HE CHOOSES TO USE LISTS INSTEAD.

			RepositorioComprasLista comprasLista = new RepositorioComprasLista();
			RepositorioContasLista 	contasLista = new RepositorioContasLista();
			RepositorioServicoLista servicosLista = new RepositorioServicoLista();
			compras = new ManagerCompras(comprasLista);
			contas = new ManagerConta(contasLista);
			servicos = new ManagerServico(servicosLista);


			break;
		}


	}