Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.mx.ipn.escom.testerRest.dao;
- import java.sql.ResultSet;
- import java.sql.SQLException;
- import java.util.ArrayList;
- import java.util.List;
- import com.mx.ipn.escom.testerRest.db.Connector;
- import com.mx.ipn.escom.testerRest.modelo.Tema;
- public class TemaDao extends Connector {
- public List<Tema> getTemas() throws SQLException{
- List<Tema> temas=new ArrayList<Tema>();
- String query="select * from tema;";
- ResultSet temp= ejecutarSelect(query);
- while(temp.next()){
- Integer id=temp.getInt(1);
- String nb = temp.getString(2);
- String ds = temp.getString(3);
- temas.add(new Tema(id, nb, ds));
- }
- return temas;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement