Package org.jayasoft.woj.portal.model.commercial

Examples of org.jayasoft.woj.portal.model.commercial.InvoiceIdImpl


                count.setYear(year);
            }
            id = count.getCounter() + 1;
            count.setCounter(id);
           
            InvoiceIdImpl invId = (InvoiceIdImpl)DaoFactory.getInvoiceIdDao().newHandledObject();
            invId.setReason(message);
            invId.setIdent(formatIdent(id, year, month));
           
            DaoFactory.getInvoiceIdCounterDao().save(count);
            DaoFactory.getInvoiceIdDao().save(invId);
           
            LOGGER.info("new invoice ident generated : " + invId);
View Full Code Here


    public void validateIdent(InvoiceId id) throws ServiceException {
        if (id==null) {
            throw new NullPointerException("invoice identifier cannot be null");
        }
        try {
            InvoiceIdImpl idInBase = (InvoiceIdImpl)DaoFactory.getInvoiceIdDao().find(id);
            if (idInBase==null) {
                throw new ServiceException("invoice identifier " + id.getIdent() + " cannot be found in database");
            }
            idInBase.setValid(true);
            DaoFactory.getInvoiceIdDao().save(idInBase);
        } catch (DaoException e) {
            LOGGER.warn("cannot validate invoice identifier " + id);
            throw new ServiceException("cannot validate invoice identifier");
        }
View Full Code Here

    public HibernateInvoiceIdDao(DaoHelper helper) {
        super(helper, InvoiceIdImpl.class);
    }
   
    public WOJObject newHandledObject() {
        return new InvoiceIdImpl();
    }
View Full Code Here

TOP

Related Classes of org.jayasoft.woj.portal.model.commercial.InvoiceIdImpl

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.