Skip to content

Instantly share code, notes, and snippets.

@charles-silva
Last active November 30, 2020 18:53
Show Gist options
  • Save charles-silva/6d38b6f17b7c3c86bdc426a259054a9f to your computer and use it in GitHub Desktop.
Save charles-silva/6d38b6f17b7c3c86bdc426a259054a9f to your computer and use it in GitHub Desktop.
[Consulta java]#java
@Override
public List<Usuar> findAll() {
StringBuilder sql = new StringBuilder();
sql.append(" SELECT Isn,Nome_Login,Nome_Completo,Bloqueado,Administrador,Cod_Funcionario,Senha_Hash,Senha1 FROM USUAR");
try {
List<Usuar> usuars = db.query(sql.toString(), new UsuarRowMapper());
return !usuars.isEmpty() ? usuars : null;
} catch (EmptyResultDataAccessException e) {
return null;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment