Package org.broadleafcommerce.profile.core.domain

Examples of org.broadleafcommerce.profile.core.domain.CustomerPayment


    @Override
    public CustomerPayment readCustomerPaymentByToken(String token) {
        Query query = em.createNamedQuery("BC_READ_CUSTOMER_PAYMENT_BY_TOKEN");
        query.setParameter("token", token);
        CustomerPayment payment = null;
        try{
            payment = (CustomerPayment) query.getSingleResult();
        } catch (NoResultException e) {
           //do nothing
        }
View Full Code Here


        return (CustomerPayment) em.find(CustomerPaymentImpl.class, customerPaymentId);
    }

    @Override
    public void deleteCustomerPaymentById(Long customerPaymentId) {
        CustomerPayment customerPayment = readCustomerPaymentById(customerPaymentId);
        if (customerPayment != null) {
            em.remove(customerPayment);
        }
    }
View Full Code Here

    }

    @Override
    @Transactional("blTransactionManager")
    public CustomerPayment setAsDefaultPayment(CustomerPayment payment) {
        CustomerPayment oldDefault = findDefaultPaymentForCustomer(payment.getCustomer());
        if (oldDefault != null) {
            oldDefault.setDefault(false);
            saveCustomerPayment(oldDefault);
        }
        payment.setDefault(true);
        return saveCustomerPayment(payment);
    }
View Full Code Here

TOP

Related Classes of org.broadleafcommerce.profile.core.domain.CustomerPayment

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.