-
Clique no botão Code
-
Clique na ultima opção Download ZIP
Service<Paciente> service = new Service(Paciente.class);
List<Paciente> modelos = service.list();
SELECT * FROM tabela WHERE id = 1;
Service<Paciente> service = new Service(Paciente.class);
Paciente paciente = service.find(1);
INSERT INTO (nome, endereco, etc) paciente VALUES ("Nome do paciente", "Endereco", "etc");
Service<Paciente> service = new Service(Paciente.class);
Paciente paciente = new Paciente();
paciente.setName("Nome do Paciente");
paciente.setESaude(true);
service.create(paciente);
UPDATE paciente SET nome = "Novo nome do paciente" WHERE id = 1;
Service<Paciente> service = new Service(Paciente.class);
Paciente paciente = new Paciente();
paciente.setId(1);
paciente.setName("Novo nome do paciente");
service.update(paciente);
DELETE FROM paciente WHERE id = 1;
Service<Paciente> service = new Service(Paciente.class);
int Id_do_paciente = 1;
service.delete(Id_do_paciente);