Package org.jabusuite.transaction.session

Examples of org.jabusuite.transaction.session.OffersRemote


     */
    @Override
    public List<JbsBaseObject> getDataFromServer(int startIndex,
            int resultCount) {
        try {
            OffersRemote offers = (OffersRemote)ClientTools.getRemoteBean(OffersRemote.class);
            return offers.getDatasets(this.getFilter(), this.getOrderFields(), this.getUser(), this.getCompany(), startIndex, resultCount);
        } catch (Exception e) {
            logger.error("Error fetching orders.", e);
            return null;
        }
    }
View Full Code Here


     * @see org.jabusuite.client.datalist.LiveJbsObjectList#getListSize()
     */
    @Override
    public int getListSize() {
        try {
            OffersRemote offers = (OffersRemote)ClientTools.getRemoteBean(OffersRemote.class);
            return (int) offers.getDatasetCount(this.getFilter(), this.getUser(), this.getCompany());
        } catch (Exception e) {
            logger.error("Error fetching offer-count.", e);
            return 0;
        }
    }
View Full Code Here

        Offer offer = (Offer) jbsBaseObject;
        //We have to get the positions from the database also
        if ((offer != null) && (this.getDlgState() == DlgState.dsEdit)) {
            logger.debug("Retrieving positions for offer " + offer.getId());
            try {
                OffersRemote offers = (OffersRemote) ClientTools.getRemoteBean(OffersRemote.class);
                Offer existingOffer = offers.findDataset(offer.getId(), true);
                offer = existingOffer;
            } catch (NamingException e) {
                logger.error("Error retrieving offer.", e);
            }
        }
View Full Code Here

    @Override
    public void doSave() throws EJbsObject {
        logger.debug("Saving data...");

        try {
            OffersRemote offers = (OffersRemote) ClientTools.getRemoteBean(OffersRemote.class);
            super.doSave();
            if ((this.getDlgState() == DlgState.dsInsert) || (this.getDlgState() == DlgState.dsCopy)) {
                offers.createDataset(this.getOffer(), ClientGlobals.getUser(), ClientGlobals.getCompany());
            } else if (this.getDlgState() == DlgState.dsEdit) {
                logger.debug("Saving existing entity " + this.getOffer().getId() + ".");
                offers.updateDataset(this.getOffer(), ClientGlobals.getUser());
            }
            logger.debug("Entity saved.");
        } catch (NamingException e) {
            logger.error("Error saving offer.", e);
        }
View Full Code Here

TOP

Related Classes of org.jabusuite.transaction.session.OffersRemote

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.