Examples of Noticia


Examples of banco_imobiliario.model.Noticia

    public ArrayList<Noticia> getAllCartas() {
   
        int id;
        double valor;
        String titulo, texto;
        Noticia carta;
        ArrayList<Noticia> cartas = new ArrayList<Noticia>();
       
        String sqlQuery = "SELECT id, titulo, texto, valor FROM carta";


        try {

            conexaoBanco = DAOConection.getConnection();
            preparedStatement = conexaoBanco.prepareStatement(sqlQuery);

            resultadoConsulta = preparedStatement.executeQuery();

            while(resultadoConsulta.next()){

                carta = new Noticia();

                id = Integer.valueOf(resultadoConsulta.getString("id"));
                titulo = resultadoConsulta.getString("titulo");
                texto = resultadoConsulta.getString("texto");
                valor = Double.valueOf(resultadoConsulta.getString("valor"));

                carta.setId(id);
                carta.setTitulo(titulo);
                carta.setTexto(texto);
                carta.setValor(valor);

                cartas.add(carta);

            }
View Full Code Here

Examples of br.com.boardnaveia.dao.bean.Noticia

  }
 
  public String retroceder(){
   
    getIndice().diminuir();
    Noticia noticia = carregarNoticiaIndice();
    setCodigo(noticia.getCodigo().toString());
    setTitulo(noticia.getTitulo());
   
    return div();
   
  }
View Full Code Here

Examples of br.com.boardnaveia.dao.bean.Noticia

   
  }
 
  public String carregar(){
    if(isEmpty(getCodigo())){
      Noticia noticia = carregarNoticiaIndice();
      if(noticia != null){
        setCodigo(noticia.getCodigo().toString());
        setTitulo(noticia.getTitulo());
      }
    }
    return SUCCESS;
  }
View Full Code Here

Examples of br.com.boardnaveia.dao.bean.Noticia

 
  public String div(){

    if(isEmpty(getCodigo())){
      indice.aumentar();
      Noticia noticia = carregarNoticiaIndice();
      if(noticia != null) {
        setCodigo(noticia.getCodigo().toString());
        setTitulo(noticia.getTitulo());
      }
    }
    return "div";
  }
View Full Code Here

Examples of br.com.boardnaveia.dao.bean.Noticia

    return INPUT;
  }
 
  private Noticia carregarNoticiaIndice(){
   
    Noticia noticia = noticiaDAO.pesquisarIndice(getIndice().getPosicao());
   
    if(noticia == null && getIndice().getPosicao().compareTo(0) > 0) {
      getIndice().zerar();
      return carregarNoticiaIndice();
    }
View Full Code Here

Examples of br.com.boardnaveia.dao.bean.Noticia

    if(validacao())
      return INPUT;
   
    InputStream inputStream = IOUtils.toInputStream(getArquivo(), "ISO-8859-1");
   
    Noticia noticia = new Noticia(IOUtils.toByteArray(inputStream));
    noticia.setTitulo(getTitulo());
    noticia.setDescricao(getDescricao());
    noticia.setLogin(getUsuario().getEmail());
    noticia.setCanal(CanalNoticia.getCanal(getCanalNoticia()));
   
    noticiaDAO.gravar(noticia);
   
    setCodigo(noticia.getCodigo().toString());
   
    return SUCCESS;
  }
View Full Code Here

Examples of br.com.boardnaveia.dao.bean.Noticia

    return SUCCESS;
  }

  public String detalhe(){
   
    Noticia noticia = noticiaDAO.pesquisar(Noticia.class, Long.parseLong(getCodigo()));
    setCodigo(noticia.getCodigo().toString());
    setTitulo(noticia.getTitulo());
    setDescricao(noticia.getDescricao());
   
    return "detalhe";
  }
View Full Code Here

Examples of br.com.boardnaveia.dao.bean.Noticia

    return "detalhe";
  }
 
  public String arquivo(){
   
    Noticia  noticia = noticiaDAO.pesquisar(Noticia.class, Long.parseLong(getCodigo()));
   
    setStream(noticia.getInputStream());
       
    return "arquivo";
  }
View Full Code Here

Examples of br.com.boardnaveia.dao.bean.Noticia

  }
 
  public String avancar(){
   
    getIndice().aumentar();
    Noticia noticia = carregarNoticiaIndice();
    setCodigo(noticia.getCodigo().toString());
    setTitulo(noticia.getTitulo());
   
    return div();
  }
View Full Code Here

Examples of br.com.granja.dominio.Noticia

        super(dao);
    }

    @Override
    public void validate(Noticia entity) throws ServiceBusinessException {
      Noticia entityToValidate = new Noticia();
        entityToValidate.setTitulo(entity.getTitulo());
        entityToValidate.setId(entity.getId());
        entityToValidate.setAtivo(true);
       
        ServiceUniqueEntityValidator<Noticia, NoticiaDao> uniqueEntityValidator = ServiceUniqueEntityValidator.create(dao);
        uniqueEntityValidator.validate(entityToValidate, String.format("A Noticia com o título informado (%s) já está cadastrado", entityToValidate.getTitulo()));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.