Example usage for org.hibernate Session load

List of usage examples for org.hibernate Session load

Introduction

In this page you can find the example usage for org.hibernate Session load.

Prototype

void load(Object object, Serializable id);

Source Link

Document

Read the persistent state associated with the given identifier into the given transient instance.

Usage

From source file:br.com.sescacre.controleAcesso.dao.UsuariosDao.java

public Usuarios pesquisaPorId(String id) {
    Session s = HibernateUtil.getSession();
    return (Usuarios) s.load(Usuarios.class, id);
}

From source file:br.com.sescacre.dao.AlunosDAO.java

public Alunos pesquisaPorId(Integer id) {
    Session s = HibernateUtil.getSession();
    Alunos a = (Alunos) s.load(Alunos.class, id);
    s.close();/*from   www  . ja v  a 2s .  co  m*/
    return a;
}

From source file:br.com.sescacre.dao.CidadesDAO.java

public Cidades pesquisaPorId(Integer id) {
    Session s = HibernateUtil.getSession();
    Cidades c = (Cidades) s.load(Cidades.class, id);
    s.close();/*  ww  w.  j  a  v  a2  s. c o m*/
    return c;
}

From source file:br.com.sescacre.dao.ContatosDAO.java

public Contatos pesquisaPorId(Integer id) {
    Session s = HibernateUtil.getSession();
    Contatos c = (Contatos) s.load(Contatos.class, id);
    s.close();/* w ww  .j  a  v  a2 s.  co  m*/
    return c;
}

From source file:br.com.sescacre.dao.EnderecosDAO.java

public Enderecos pesquisaPorId(Integer id) {
    Session s = HibernateUtil.getSession();
    Enderecos end = (Enderecos) s.load(Enderecos.class, id);
    s.close();/*from w w w  .  j ava2  s  .com*/
    return end;
}

From source file:br.com.sescacre.dao.EstadosDAO.java

public Estados pesquisaPorId(Integer id) {
    Session s = HibernateUtil.getSession();
    //Estados e = (Estados) s.load(Estados.class, id);
    return (Estados) s.load(Estados.class, id);
    //        s.close();
    //      return e;
}

From source file:br.com.sescacre.dao.ExerciciosDAO.java

public Exercicios pesquisaPorId(Integer id) {
    Session s = HibernateUtil.getSession();
    Exercicios ex = (Exercicios) s.load(Exercicios.class, id);
    s.close();//from w w w . jav  a  2s.c  o  m
    return ex;
}

From source file:br.com.sescacre.dao.ExerciciosDoTreinoDAO.java

public ExerciciosDoTreino pesquisaPorId(Integer id) {
    Session s = HibernateUtil.getSession();
    ExerciciosDoTreino ext = (ExerciciosDoTreino) s.load(ExerciciosDoTreino.class, id);
    s.close();/*from  w  w  w .  j  ava2s . c  o  m*/
    return ext;
}

From source file:br.com.sescacre.dao.PessoasDAO.java

public Pessoas pesquisaPorId(Integer id) {
    Session s = HibernateUtil.getSession();
    return (Pessoas) s.load(Pessoas.class, id);
    //s.close();//from  w  w w  .  j  a v a2s  .  c o  m
    //return p;
}

From source file:br.com.sescacre.dao.PilaresDAO.java

public Pilares pesquisaPorId(Integer id) {
    Session s = HibernateUtil.getSession();
    Pilares p = (Pilares) s.load(Pilares.class, id);
    s.close();//from w  w  w .ja  v  a  2 s  .  c o m
    return p;
}