Package br.gov.serpro.ouvidoria.model

Examples of br.gov.serpro.ouvidoria.model.Protocolo


     * @return Integer com o número do protocolo a ser usado
     * @throws DaoException
     */
    public synchronized Integer obterNumeroProtocolo() throws DaoException {
       
        Protocolo protocolo = (Protocolo) protocoloDao.get(new Long(1));
       
        if (protocolo == null) {
            protocolo = new Protocolo();
            protocolo.setNumeroProtocolo(new Integer(1));
            protocoloDao.save(protocolo);
        } else {
            protocolo.setNumeroProtocolo(new Integer(protocolo
                    .getNumeroProtocolo().intValue() + 1));
            protocoloDao.save(protocolo);
        }
       
        return protocolo.getNumeroProtocolo();
       
    }
View Full Code Here

TOP

Related Classes of br.gov.serpro.ouvidoria.model.Protocolo

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.