7172737475767778798081
.andList(); } @Override public void atualizar(Aeronave aeronave) { new SqlStatementWrapper() .prepare() .with("update FLIGHT.AERONAVE AS AERONAVE set") .with("AERONAVE.NOME = ?", aeronave.getNome()) .with("where AERONAVE.ID = ?", aeronave.getId())
4344454647484950515253
return tabela.substring(0, 1) + "1000"; } } private GerarCodigoBuilder query() { return new SqlStatementWrapper() .prepare() .with("select concat('" + tabela.substring(0, 1) + "',max(ID)+1000) CODIGO") .with("from FLIGHT." + tabela)
8384858687888990919293
.andExecute(); } @Override public void deletar(int id) { new SqlStatementWrapper() .prepare() .with("delete from FLIGHT.AERONAVE") .with("where ID = ?", id)
3132333435363738394041
* */ public class UsuarioDAO implements Usuario.Jdbc { private SqlStatement query() { return new SqlStatementWrapper() .prepare() .with("select *") .with("from FLIGHT.USUARIO as USUARIO")
4647484950515253545556
} @Override public void criar(Usuario usuario) { PessoaFisica pessoaFisica = usuario.getPessoaFisica(); new SqlStatementWrapper() .prepare() .with("insert into FLIGHT.USUARIO") .with("(ID, PESSOAFISICA_ID, CODIGO, PERFIL, LOGIN, SENHA)")
103104105106107108109110111112113
.andGet(); } @Override public boolean atualizar(Usuario usuario) { boolean executed = new SqlStatementWrapper() .prepare() .with("update FLIGHT.USUARIO set") .with("PERFIL = ?,", usuario.getPerfil().ordinal())
121122123124125126127128129130131
return executed; } @Override public void deletar(int id) { new SqlStatementWrapper() .prepare() .with("delete from FLIGHT.USUARIO") .with("where ID = ?", id)