Package br.com.fiapbank.persistencia.dao

Examples of br.com.fiapbank.persistencia.dao.DaoException


        .add( Restrictions.eq("numeroAgencia", conta.getNumeroAgencia()))
        .add( Restrictions.eq("senha", conta.getSenha()))
        .add( Restrictions.eq("fraseSecreta", conta.getFraseSecreta()))
        .uniqueResult();
    } catch (Exception e) {
      throw new DaoException(e);
    }
  }
View Full Code Here


              .add( Restrictions.eq("numero", conta.getNumero() ))
              .add( Restrictions.eq("numeroAgencia", conta.getNumeroAgencia()))
              .uniqueResult();
                     
    } catch (Exception e) {
      throw new DaoException(e);
    }
  }
View Full Code Here

      begin();
      getEntityManager().remove(find(t));
      commit();     
    } catch (Exception e){     
      rollback();     
      throw new DaoException(e);     
    }finally{     
      close();
    }   
  }
View Full Code Here

  @SuppressWarnings("unchecked")
  public T find( T t ) throws DaoException{   
    try {     
      return (T) getEntityManager().find(t.getClass(),t.getId());       
    } catch (Exception e) {
      throw new DaoException(e);
    }
  }
View Full Code Here

      getEntityManager().persist(t);
      commit();
      return t;           
    } catch (Exception e) {
      rollback();
      throw new DaoException(e);     
    }finally{     
      close();
    }   
  }
View Full Code Here

      t = getEntityManager().merge(t);
      commit();
      return t;
    } catch (Exception e) {
      rollback();
      throw new DaoException(e);     
    }finally{     
      close();
    }
  }   
View Full Code Here

      return (Funcionario) getSessionHibernate().createCriteria(Funcionario.class)
        .add(Restrictions.eq("senha", funcionario.getSenha()))
        .add(Restrictions.eq("login", funcionario.getLogin()))
        .uniqueResult();
    } catch (Exception e) {
      throw new DaoException(e);
    }
  }
View Full Code Here

TOP

Related Classes of br.com.fiapbank.persistencia.dao.DaoException

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.