Examples of InvoiceId


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

                        }

                        ClearableDynaValidatorActionForm f = (ClearableDynaValidatorActionForm)form;
                        String message = f.getString(Params.LICENSE.PARAMS.MESSAGE);
                       
                        InvoiceId id = ServiceFactory.getInvoiceIdService().newStandardIdent(message);
                        ServiceFactory.getInvoiceIdService().validateIdent(id);
                        request.setAttribute(Params.LICENSE.REQUEST.LICENSE_CREATED, id);
                       
                        f.remove(Params.LICENSE.PARAMS.MESSAGE);
                        retrieveLastLicenses(request);
View Full Code Here

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

   
    /* (non-Javadoc)
     * @see org.jayasoft.woj.portal.data.dao.hibernate.DefaultHibernateWOJDao#doFind(org.jayasoft.woj.common.model.WOJObject)
     */
    protected WOJObject doFind(WOJObject object) {
        InvoiceId foundId = null;
        if (object instanceof InvoiceId) {
            final InvoiceId id = (InvoiceId)object;

            HibernateTemplate t = new HibernateTemplate(getSessionFactory());

            foundId = (InvoiceId) t.execute(
                new HibernateCallback() {
                    public Object doInHibernate(Session s) throws HibernateException, SQLException {
                        return s.createCriteria(getHandledClass()).add(Restrictions.eq("ident", id.getIdent())).uniqueResult();
                    }
                }
            );
           
        }
View Full Code Here

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

                LOGGER.warn("impossible to create a new invoice for an order that has already an invoice");
                return o.getInvoice();
            }
            InvoiceIdService idService = ServiceFactory.getInvoiceIdService();
           
            InvoiceId invId = idService.newWOJIdent(o);
            idService.validateIdent(invId);

            Invoice i = (Invoice)DaoFactory.getInvoiceDao().newHandledObject();
            o.setInvoice(i);
            i.setPdf(InvoiceBuilderFactory.getBuilder().buildInvoicePDF(o, p, invId.getIdent()));
            i.setIdent(invId.getIdent());
           
            DaoFactory.getInvoiceDao().save(i);
            DaoFactory.getOrderDao().save(o);

            LOGGER.info(MessageFormat.format("new invoice[{0}] created for user[{1}]", new Object[] {new Long(i.getId()), o.getBuyer().getLogin()}));
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.