Examples of Payment


Examples of net.virtuemart.www.externalsales.Payment

    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof Payment)) {
            return false;
        }
        Payment other = (Payment) obj;
        if (obj == null) {
            return false;
        }
        if (this == obj) {
            return true;
        }
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true &&
                this.amount == other.getAmount() &&
                ((this.paymentType == null && other.getPaymentType() == null) ||
                (this.paymentType != null &&
                this.paymentType.equals(other.getPaymentType())));
        __equalsCalc = null;
        return _equals;
    }
View Full Code Here

Examples of org.blueoxygen.pedimedi.Payment

      log.setCreateBy(credentials.getCurrentUser().getId());
      log.setCreateDate(new Timestamp(System.currentTimeMillis()));
      getPayment().setId(null);

    } else {
      Payment category = getPayment();
      setPayment((Payment) manager.getById(Payment.class, getPayment()
          .getId()));
      log = getPayment().getLogInformation();
      try {
        PropertyUtils.copyProperties(getPayment(), category);
View Full Code Here

Examples of org.jabusuite.transaction.Payment

     */
    protected boolean paymentExists(Payment payment, Set<Payment> payments) {
        boolean found = false;
        Iterator<Payment> it = payments.iterator();
        while ((!found) && (it.hasNext())) {
            Payment exPayment = it.next();
            if (exPayment.getId() == payment.getId())
                found = true;
        }
        return found;
    }
View Full Code Here

Examples of org.jabusuite.transaction.Payment

     * @param payments
     */
    protected void deleteOldPayments(EntityManager manager, Invoice invoice, Set<Payment> payments) {
        Iterator<Payment> it = payments.iterator();
        while (it.hasNext()) {
            Payment payment = it.next();
            if (!paymentExists(payment, invoice.getPayments())) {
                if (logger.isDebugEnabled())
                    logger.debug("Deleting no longer existing payment "+payment.getId());
                manager.remove(payment);
            }
        } //while
    }
View Full Code Here

Examples of org.jboss.seam.example.quartz.Payment

    public String saveAndSchedule()
    {
        String result = persist();
       
        Payment payment = getInstance();
       
        log.info("scheduling instance #0", payment);
        QuartzTriggerHandle handle = processor.schedulePayment(payment.getPaymentDate(),
                                                payment.getPaymentFrequency().getInterval(),
                                                payment.getPaymentEndDate(),
                                                payment);
       
        payment.setQuartzTriggerHandle( handle );

        return result;
    }
View Full Code Here

Examples of org.jboss.seam.example.quartz.Payment

    public String saveAndScheduleCron()
    {
        String result = persist();
       
        Payment payment = getInstance();
        log.info("scheduling instance #0", payment);

        QuartzTriggerHandle handle = processor.schedulePayment(payment.getPaymentDate(),
                                                payment.getPaymentCron(),
                                                payment.getPaymentEndDate(),
                                                payment);
       
        payment.setQuartzTriggerHandle( handle );

        return result;
    }
View Full Code Here

Examples of org.jboss.seam.example.quartz.Payment

        return paymentId;
    }

    @Transactional
    public void cancel() {
        Payment payment = getInstance();
       
        QuartzTriggerHandle handle = payment.getQuartzTriggerHandle();
        payment.setQuartzTriggerHandle(null);
        payment.setActive(false);
       
        try
        {
            handle.cancel();
        }
View Full Code Here

Examples of org.jboss.seam.example.quartz.Payment

                {
                    // schedule a the repeating job and immediately pause it
                    // this allows you to carefully control how long the timer
                    // runs for
                    assert "persisted".equals(invokeMethod("#{paymentHome.saveAndSchedule}"));
                    Payment payment = (Payment) getValue("#{newPayment}");
                    quartzTriggerHandle = payment.getQuartzTriggerHandle();
                    quartzTriggerHandle.pause();
                }
   
                @Override
                protected void renderResponse() throws Exception
                {
                    // Check the job exists
                    assert ((Boolean)getValue("#{accountHome.idDefined}"));               
                    Account account = (Account) getValue("#{selectedAccount}");               
                    assert account !=null;
                    assert account.getId() == 1;
                    assert account.getPayments().size() == 1;           
                   
                    Payment payment = (Payment) getValue("#{newPayment}");
                    assert payment.getPayee().equals("IRS");
                    assert payment.getAmount().equals(new BigDecimal("110.00"));
                    assert payment.getAccount() != null;
                    assert payment.getAccount().getId() == 1;
                    assert payment.getActive();
                }
               
            }.run();
           
            // Start the triggerHandle, wait a lot shorter than the job takes
            // At this point the job should have executed once exactly
            quartzTriggerHandle.resume();
            pause((long) (REPEATING.getInterval() * 0.1));
            quartzTriggerHandle.pause();
           
            new FacesRequest("/search.xhtml", id)
            {
   
                @Override
                protected void beforeRequest()
                {
                    setParameter("accountId", "1");
                }
               
                @Override
                protected void renderResponse() throws Exception
                {
                    assert ((Boolean)getValue("#{accountHome.idDefined}"));               
                    Account account = (Account) getValue("#{selectedAccount}");               
                    assert account !=null;
                    assert account.getId() == 1;
                    assert account.getPayments().size() == 1;
                    Payment payment = account.getPayments().get(0);
                    assert new BigDecimal("110.00").equals(payment.getAmount());
                    assert payment.getActive();
                    assert REPEATING.equals(payment.getPaymentFrequency());
                   
                    assert new BigDecimal("891.46").equals(account.getBalance());
                }
               
            }.run();
           
            // Start the triggerHandle, wait until some short time after the
            // job triggers once
            quartzTriggerHandle.resume();
            pause(REPEATING.getInterval());
            quartzTriggerHandle.pause();
           
           
            new FacesRequest("/search.xhtml", id)
            {
   
                @Override
                protected void beforeRequest()
                {
                    setParameter("accountId", "1");
                }
               
                @Override
                protected void renderResponse() throws Exception
                {

                    // Job should have run twice
                    assert ((Boolean)getValue("#{accountHome.idDefined}"));               
                    Account account = (Account) getValue("#{selectedAccount}");

                    assert account !=null;
                    assert account.getId() == 1;
                    assert account.getPayments().size() == 1;
                    Payment payment = account.getPayments().get(0);
                    assert new BigDecimal("110.00").equals(payment.getAmount());
                    assert payment.getActive();
                    assert REPEATING.equals(payment.getPaymentFrequency());
                    assert payment.getLastPaid() != null;
                    assert new BigDecimal("781.46").equals(account.getBalance());
                    paymentId = payment.getId();
                }
               
            }.run();
           
            new FacesRequest("/search.xhtml", id)
            {
   
                @Override
                protected void beforeRequest()
                {
                    setParameter("accountId", "1");
                    setParameter("paymentId", paymentId.toString());
                }
               
                @Override
                protected void invokeApplication() throws Exception
                {
                    // Resume the job, then cancel it
                    quartzTriggerHandle.resume();
                    invokeMethod("#{paymentHome.cancel}");
                }
               
                @Override
                protected void renderResponse() throws Exception
                {

                    assert ((Boolean)getValue("#{accountHome.idDefined}"));               
                    Account account = (Account) getValue("#{selectedAccount}");

                    assert account !=null;
                    assert account.getId() == 1;
                    assert account.getPayments().size() == 1;
                    Payment payment = account.getPayments().get(0);
                    assert new BigDecimal("110.00").equals(payment.getAmount());
                    assert !payment.getActive();
                    assert payment.getLastPaid() != null;
                    assert new BigDecimal("781.46").equals(account.getBalance());
                }
               
            }.run();
           
View Full Code Here

Examples of org.jboss.seam.example.quartz.Payment

                protected void invokeApplication() throws Exception
                {
                    // schedule a the repeating job and immediately pause it
                    // this allows you to carefully control how long the timer
                    // runs for
                    Payment payment = (Payment) getValue("#{newPayment}");
                    payment.setPaymentDate(new java.sql.Timestamp( System.currentTimeMillis() + REPEATING.getInterval()));
                    payment.setPaymentEndDate(new java.sql.Timestamp( (long) (System.currentTimeMillis() + (REPEATING.getInterval() * 2.5))));
                    assert "persisted".equals(invokeMethod("#{paymentHome.saveAndSchedule}"));
                    quartzTriggerHandle = payment.getQuartzTriggerHandle();
                    quartzTriggerHandle.pause();
                }
   
                @Override
                protected void renderResponse() throws Exception
                {
                    // Check the job exists
                    assert ((Boolean)getValue("#{accountHome.idDefined}"));               
                    Account account = (Account) getValue("#{selectedAccount}");               
                    assert account !=null;
                    assert account.getId() == 1;
                    assert account.getPayments().size() == 1;           
                   
                    Payment payment = (Payment) getValue("#{newPayment}");
                    assert payment.getPayee().equals("IRS");
                    assert payment.getAmount().equals(new BigDecimal("110.00"));
                    assert payment.getAccount() != null;
                    assert payment.getAccount().getId() == 1;
                    assert payment.getActive();
                }
               
            }.run();
           
            // Start the triggerHandle, wait a lot shorter than the job takes
            // At this point the job should have executed zero times
            quartzTriggerHandle.resume();
            pause((long) (REPEATING.getInterval() * 0.1));
            quartzTriggerHandle.pause();
           
            new FacesRequest("/search.xhtml", id)
            {
   
                @Override
                protected void beforeRequest()
                {
                    setParameter("accountId", "1");
                }
               
                @Override
                protected void renderResponse() throws Exception
                {
                    assert ((Boolean)getValue("#{accountHome.idDefined}"));               
                    Account account = (Account) getValue("#{selectedAccount}");               
                    assert account !=null;
                    assert account.getId() == 1;
                    assert account.getPayments().size() == 1;
                    Payment payment = account.getPayments().get(0);
                    assert new BigDecimal("110.00").equals(payment.getAmount());
                    assert payment.getActive();
                    assert new BigDecimal("1001.46").equals(account.getBalance());
                }
               
            }.run();
           
            // Start the triggerHandle, wait until some short time after the
            // job triggers once
            quartzTriggerHandle.resume();
            pause(REPEATING.getInterval());
            quartzTriggerHandle.pause();
           
           
            new FacesRequest("/search.xhtml", id)
            {
   
                @Override
                protected void beforeRequest()
                {
                    setParameter("accountId", "1");
                }
               
                @Override
                protected void renderResponse() throws Exception
                {

                    // Job should have run twice
                    assert ((Boolean)getValue("#{accountHome.idDefined}"));               
                    Account account = (Account) getValue("#{selectedAccount}");

                    assert account !=null;
                    assert account.getId() == 1;
                    assert account.getPayments().size() == 1;
                    Payment payment = account.getPayments().get(0);
                    assert new BigDecimal("110.00").equals(payment.getAmount());
                    assert payment.getActive();
                    assert new BigDecimal("891.46").equals(account.getBalance());
                    paymentId = payment.getId();
                }
               
            }.run();
           
            // Start the triggerHandle, wait until some short time after the
            // job triggers once
            quartzTriggerHandle.resume();
            pause(REPEATING.getInterval());
            // Thats the last job so need to pause
           
            new FacesRequest("/search.xhtml", id)
            {
   
                @Override
                protected void beforeRequest()
                {
                    setParameter("accountId", "1");
                }
               
                @Override
                protected void renderResponse() throws Exception
                {

                    // Job should have run twice
                    assert ((Boolean)getValue("#{accountHome.idDefined}"));               
                    Account account = (Account) getValue("#{selectedAccount}");

                    assert account !=null;
                    assert account.getId() == 1;
                    assert account.getPayments().size() == 1;
                    Payment payment = account.getPayments().get(0);
                    assert new BigDecimal("110.00").equals(payment.getAmount());
                    assert payment.getActive();
                    assert new BigDecimal("781.46").equals(account.getBalance());
                    paymentId = payment.getId();
                }
               
            }.run();
           
            // Start the triggerHandle, wait until some short time after the
            // job would trigger again - we should be way beyond the expiry now
            pause(REPEATING.getInterval());
           
            new FacesRequest("/search.xhtml", id)
            {
   
                @Override
                protected void beforeRequest()
                {
                    setParameter("accountId", "1");
                }
               
                @Override
                protected void renderResponse() throws Exception
                {

                    assert ((Boolean)getValue("#{accountHome.idDefined}"));               
                    Account account = (Account) getValue("#{selectedAccount}");

                    assert account !=null;
                    assert account.getId() == 1;
                    assert account.getPayments().size() == 1;
                    Payment payment = account.getPayments().get(0);
                    assert new BigDecimal("110.00").equals(payment.getAmount());
                    assert payment.getActive();
                    assert payment.getLastPaid() != null;
                    assert new BigDecimal("781.46").equals(account.getBalance());
                }
               
            }.run();
           
View Full Code Here

Examples of org.jboss.seam.example.quartz.Payment

                    assert ((Boolean)getValue("#{accountHome.idDefined}"));               
                    Account account = (Account) getValue("#{selectedAccount}");               
                    assert account !=null;
                    assert account.getId() == 1;
                    assert account.getPayments().size() == 1;
                    Payment payment = account.getPayments().get(0);
                    assert new BigDecimal("110.00").equals(payment.getAmount());
                    //assert !payment.getActive();
                    //assert payment.getLastPaid() != null;
                    assert new BigDecimal("891.46").equals(account.getBalance());
                }
               
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.