Package org.jabusuite.address.customer

Examples of org.jabusuite.address.customer.Customer


        this.createDataset(manager, customer, user, user, user.getMainGroup(), company);
    }
   
    public void updateDataset(Customer customer, JbsUser changeUserthrows EJbsObject {
       
        Customer existingCustomer = manager.find(Customer.class, customer.getId());

        if (logger.isDebugEnabled()) {
            logger.debug("Letter-Count: " + existingCustomer.getLetters().size());
            logger.debug("Deleting letters that no longer exist.");
        }

        this.deleteOldAddressLetters(manager, customer, existingCustomer.getLetters());
       
        this.updateDataset(manager, customer, changeUser);
    }
View Full Code Here


        return this.findDataset(id,true);
    }
   
    public Customer findDataset(long id, boolean withAdditionalData) {
        logger.debug("Searching for customer "+id);
        Customer customer = manager.find(Customer.class, id);
        if ((customer!=null) && (withAdditionalData)) {
            int letterCount = customer.getLetters().size();
            logger.debug("Letters: "+letterCount);
        }
        return customer;
    }
View Full Code Here

        //JbsUsersLocal userManagement = (JbsUsersLocal) context.lookup("JbsUsersBean/local");
        JbsUser rootUser = userManagement.findUser("root");
       
        while (it.hasNext()) {
            Customer customer = it.next();
            Customer exCustomer = this.findDataset(customer.getId());
            if (exCustomer!=null) {
                logger.debug("Changing customer "+customer.getId());
                customer.setOwner(exCustomer.getOwner());
                customer.setGroup(exCustomer.getGroup());
                customer.setWriteGroup(exCustomer.isWriteGroup());
                customer.setWriteUser(exCustomer.isWriteUser());
                customer.setWriteOther(exCustomer.isWriteOther());
                customer.setReadGroup(exCustomer.isReadGroup());
                customer.setReadUser(exCustomer.isReadUser());
                customer.setReadOther(exCustomer.isReadOther());
                this.updateDataset(customer, rootUser);
            } else {
                logger.debug("Adding new customer "+customer.getId());
                this.createDataset(customer, rootUser, company);
            }
View Full Code Here

    private Logger logger = Logger.getLogger(PnCustomerEdit.class);
    protected PaymentTermSelectField sfPaymentTerm;
    //private Address parentAddress;

    public PnCustomerEdit() {
        super(DlgState.dsInsert, new Customer());
    }
View Full Code Here

        this.setJbsBaseObject(customer);
    }

    @Override
    public void setJbsBaseObject(JbsBaseObject jbsBaseObject) {
        Customer customer = (Customer) jbsBaseObject;
        //We have to get the positions from the database also
        if ((customer != null) && (this.getDlgState() == DlgState.dsEdit)) {
            logger.debug("Retrieving data for customer " + customer.getId());
            try {
                CustomersRemote customers = (CustomersRemote) ClientTools.getRemoteBean(CustomersRemote.class);
                Customer existingCustomer = customers.findDataset(customer.getId(), true);
                customer = existingCustomer;
            } catch (NamingException e) {
                logger.error("Error retrieving offer.", e);
            }
        }
View Full Code Here

        this.setPnEditJbsObject(new PnCustomerEdit(this.getState(), this.getCustomer()));
    }

    @Override
    public void createJbsBaseObject() {
        this.setJbsBaseObject(new Customer());
    }
View Full Code Here

TOP

Related Classes of org.jabusuite.address.customer.Customer

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.