Example usage for org.hibernate Criteria uniqueResult

List of usage examples for org.hibernate Criteria uniqueResult

Introduction

In this page you can find the example usage for org.hibernate Criteria uniqueResult.

Prototype

public Object uniqueResult() throws HibernateException;

Source Link

Document

Convenience method to return a single instance that matches the query, or null if the query returns no results.

Usage

From source file:br.com.bb.intranet.supermt.governo.sbg.repository.DadosGovernoRepositorio.java

public DadosGoverno porCodigoIBGE(String codigoIBGE) {
    Criteria criteria = criarCriteria();

    criteria.add(Restrictions.eq("codigoIBGE", codigoIBGE));

    return (DadosGoverno) criteria.uniqueResult();
}

From source file:br.com.bb.intranet.supermt.governo.sbg.repository.EvolucaoEmpregosDiretoRepositorio.java

public EvolucaoEmpregosDireto porCodigoIBGE(String codigoIBGE) {
    Criteria criteria = criarCriteria();
    criteria.add(Restrictions.eq("codigoIBGE", codigoIBGE));
    return (EvolucaoEmpregosDireto) criteria.uniqueResult();
}

From source file:br.com.bb.intranet.supermt.governo.sbg.repository.IbamRepositorio.java

public Ibam porCodigoIBGE(String codigoIBGE) {
    Criteria criteria = criarCriteria();
    criteria.add(Restrictions.eq("codigoIBGE", codigoIBGE));
    return (Ibam) criteria.uniqueResult();
}

From source file:br.com.bb.intranet.supermt.governo.sbg.repository.IfdmRepositorio.java

public Ifdm porCodigoIBGE(String codigoIBGE) {
    Criteria criteria = criarCriteria();
    criteria.add(Restrictions.eq("codigoIBGE", codigoIBGE));
    return (Ifdm) criteria.uniqueResult();
}

From source file:br.com.bb.intranet.supermt.governo.sbg.repository.PibRepositorio.java

public Pib porCodigoIBGE(String codigoIBGE) {
    Criteria criteria = criarCriteria();
    criteria.add(Restrictions.eq("codigoIBGE", codigoIBGE));

    return (Pib) criteria.uniqueResult();
}

From source file:br.com.bb.intranet.supermt.governo.sbg.repository.PosseDeProdutosAbril2016Repositorio.java

public PosseDeProdutosAbril2016 porCodigoIBGE(String codigoIBGE) {
    Criteria criteria = criarCriteria();
    criteria.add(Restrictions.eq("codigoIBGE", codigoIBGE));

    return (PosseDeProdutosAbril2016) criteria.uniqueResult();
}

From source file:br.com.bb.intranet.supermt.governo.sbg.repository.PosseDeProdutosRepositorio.java

public PosseDeProdutos porCodigoIBGE(String codigoIBGE) {
    Criteria criteria = criarCriteria();
    criteria.add(Restrictions.eq("ibge", codigoIBGE));
    return (PosseDeProdutos) criteria.uniqueResult();
}

From source file:br.com.bb.intranet.supermt.governo.sbg.repository.RadarDeNegociosGPMunicipiosRepositorio.java

public RadarDeNegociosGPMunicipios porCodigoIBGE(String codigoIBGE) {
    Criteria criteria = criarCriteria();
    criteria.add(Restrictions.eq("codigoIBGE", codigoIBGE));
    return (RadarDeNegociosGPMunicipios) criteria.uniqueResult();
}

From source file:br.com.bb.intranet.supermt.governo.sbg.repository.RppsRepositorio.java

public Rpps porCodigoIBGE(String codigoIBGE) {
    Criteria criteria = criarCriteria();
    criteria.add(Restrictions.eq("codigoIBGE", codigoIBGE));
    return (Rpps) criteria.uniqueResult();
}

From source file:br.com.bb.intranet.supermt.governo.sbg.repository.SitesPrefeiturasRepositorio.java

public SitesPrefeituras porCodigoIBGE(String codigoIBGE) {
    Criteria criteria = criarCriteria();
    criteria.add(Restrictions.eq("codigoIBGE", codigoIBGE));
    return (SitesPrefeituras) criteria.uniqueResult();
}