Examples of createSQLQuery()


Examples of org.hibernate.Session.createSQLQuery()

    }


    public List pesquisarTipoDeficienciaTodos(){
        Session session = factory.openSession();
        SQLQuery query = session.createSQLQuery("SELECT {tipo_deficiencia.*} FROM tipo_deficiencia {tipo_deficiencia}");

        query.addEntity("tipo_deficiencia", TipoDeficiencia.class);

        List df = query.list();

View Full Code Here

Examples of org.hibernate.Session.createSQLQuery()

    }


    public TipoSitOcupacional pesquisarTipoSitOcupacionalPorCodigo(int cod){
        Session session = factory.openSession();
        SQLQuery query = session.createSQLQuery("SELECT {tipo_sit_ocupacional.*} FROM tipo_sit_ocupacional {tipo_sit_ocupacional} WHERE cod_tipo_sit_ocupacional = "+cod);

        query.addEntity("tipo_sit_ocupacional", TipoSitOcupacional.class);

        TipoSitOcupacional to = null;
        if(query.list().size() > 0){
View Full Code Here

Examples of org.hibernate.Session.createSQLQuery()

        return to;
    }

    public TipoSitOcupacional pesquisarTipoSitOcupacionalPorDescricao(String desc){
        Session session = factory.openSession();
        SQLQuery query = session.createSQLQuery("SELECT {tipo_sit_ocupacional.*} FROM tipo_sit_ocupacional {tipo_sit_ocupacional} WHERE descricao like '"+desc+"'");

        query.addEntity("tipo_sit_ocupacional", TipoSitOcupacional.class);

        TipoSitOcupacional to = null;
        if(query.list().size() > 0){
View Full Code Here

Examples of org.hibernate.Session.createSQLQuery()

    }


    public List pesquisarTipoSitOcupacionalTodos(){
        Session session = factory.openSession();
        SQLQuery query = session.createSQLQuery("SELECT {tipo_sit_ocupacional.*} FROM tipo_sit_ocupacional {tipo_sit_ocupacional}");

        query.addEntity("tipo_sit_ocupacional", TipoSitOcupacional.class);

        List to = query.list();

View Full Code Here

Examples of org.hibernate.Session.createSQLQuery()

    }


    public Familia pesquisarFamiliaPorCodigo(int cod){
        Session session = factory.openSession();
        SQLQuery query = session.createSQLQuery("SELECT {familia.*} FROM familia {familia} WHERE cod_familia = "+cod);

        query.addEntity("familia", Familia.class);

        Familia fm = null;
        if(query.list().size() > 0){
View Full Code Here

Examples of org.hibernate.Session.createSQLQuery()

    }


    public List pesquisarFamiliaTodos(){
        Session session = factory.openSession();
        SQLQuery query = session.createSQLQuery("SELECT {familia.*} FROM familia {familia}");

        query.addEntity("familia", Familia.class);

        List fm = query.list();

View Full Code Here

Examples of org.hibernate.Session.createSQLQuery()

    }


    public Logradouro pesquisarLogradouroPorCodigo(int cod){
        Session session = factory.openSession();
        SQLQuery query = session.createSQLQuery("SELECT {logradouro.*} FROM logradouro {logradouro} WHERE cod_logradouro = "+cod);

        query.addEntity("logradouro", Logradouro.class);

        Logradouro lg = null;
        if(query.list().size() > 0){
View Full Code Here

Examples of org.hibernate.Session.createSQLQuery()

        return lg;
    }

    public Logradouro pesquisarLogradouroPorNome(String nome){
        Session session = factory.openSession();
        SQLQuery query = session.createSQLQuery("SELECT {logradouro.*} FROM logradouro {logradouro} WHERE nome like '"+nome+"'");

        query.addEntity("logradouro", Logradouro.class);

        Logradouro lg = null;
        if(query.list().size() > 0){
View Full Code Here

Examples of org.hibernate.Session.createSQLQuery()

    }


    public List pesquisarLogradouroTodos(){
        Session session = factory.openSession();
        SQLQuery query = session.createSQLQuery("SELECT {logradouro.*} FROM logradouro {logradouro}");

        query.addEntity("logradouro", Logradouro.class);

        List lg = query.list();

View Full Code Here

Examples of org.hibernate.Session.createSQLQuery()

    }


    public Org pesquisarOrgPorCodigo(int cod){
        Session session = factory.openSession();
        SQLQuery query = session.createSQLQuery("SELECT {org.*} FROM org {org} WHERE cod_org = "+cod);

        query.addEntity("org", Org.class);

        Org org = null;
        if(query.list().size() > 0){
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.