Package br.com.sistelecom.entity

Examples of br.com.sistelecom.entity.Cidade


    try{
      ps = conn.prepareStatement("select * from cidade");
      rs = ps.executeQuery();
      List<Cidade> list = new ArrayList<Cidade>();
      while(rs.next()) {
        list.add(new Cidade(rs.getInt(1), rs.getInt(2), rs.getString(3)));
      }
      return list;
    } catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here


      ps = conn.prepareStatement("select idcidade, nome_cidade from cidade inner join estado on estado.idestado = cidade.uf where estado.idestado = ?");
      ps.setInt(1, id);
      rs = ps.executeQuery();
      List<Cidade> list = new ArrayList<Cidade>();
      while(rs.next()) {
        final Cidade cidade = new Cidade();
        cidade.setUf(rs.getInt(1));
        cidade.setNomeCidade(rs.getString(2));
        list.add(cidade);
      }
      return list;
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

  /**
   * @return the Cidade
   */
  public Cidade getCidade() {
    if (this.cidade == null) {
      this.cidade = new Cidade();
    }
    return cidade;
  }
View Full Code Here

TOP

Related Classes of br.com.sistelecom.entity.Cidade

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.