Examples of Currency


Examples of com.suarte.core.Currency

    public String edit() {
        if (id != null) {
            currency = currencyManager.get(id);
        } else {
            currency = new Currency();
        }

        return "edit";
    }
View Full Code Here

Examples of com.sun.bookstore1.util.Currency

        if (bookId != null) {
            // and the information about the book
            try {
                Book bd = bookDB.getBook(bookId);
                Currency c = (Currency) session.getAttribute("currency");

                if (c == null) {
                    c = new Currency();
                    c.setLocale(request.getLocale());
                    session.setAttribute("currency", c);
                }

                c.setAmount(bd.getPrice());

                //Print out the information obtained
                out.println(
                        "<h2>" + bd.getTitle() + "</h2>" + "&nbsp;"
                        + messages.getString("By") + " <em>"
                        + bd.getFirstName() + " " + bd.getSurname()
                        + "</em> &nbsp; &nbsp; " + "(" + bd.getCalendar_year()
                        + ")<br> &nbsp; <br>" + "<h4>"
                        + messages.getString("Critics") + "</h4>"
                        + "<blockquote>" + bd.getDescription()
                        + "</blockquote>" + "<h4>"
                        + messages.getString("Price") + c.getFormat() + "</h4>"
                        + "<p><strong><a href=\""
                        + response.encodeURL(
                                request.getContextPath()
                                + "/bookcatalog?bookId=" + bookId) + "\">"
                        + messages.getString("CartAdd")
View Full Code Here

Examples of com.tll.model.Currency

    return SalesTax.class;
  }

  @Override
  public void doPersistDependentEntities() {
    final Currency currency = createAndPersist(Currency.class, true);
    pkC = currency.getId();

    Asp account = create(Asp.class, true);
    account.setCurrency(currency);
    account = persist(account);
    pkA = account.getId();
View Full Code Here

Examples of com.tll.model.test.Currency

    return true;
  }

  @Override
  public void doPersistDependentEntities() {
    Currency currency = create(Currency.class, true);
    currency = persist(currency);
    pkCurrency = currency.getId();

    NestedEntity nestedEntity = create(NestedEntity.class, true);
    nestedEntity = persist(nestedEntity);
    pkNestedEntity = nestedEntity.getId();
View Full Code Here

Examples of com.worldpay.util.Currency

        // create the currency amount
        double orderTotal = orderHeader.getDouble("grandTotal").doubleValue();
        CurrencyAmount currencyAmount = null;
        try {
            Currency currency = SelectCurrency.getInstanceByISOCode(defCur);
            currencyAmount = new CurrencyAmount(orderTotal, currency);
        } catch (ArgumentException ae) {
            Debug.logError(ae, "Problems building CurrencyAmount", module);
            request.setAttribute("_ERROR_MESSAGE_", "<li>Merchant Configuration Error, please contact customer service.");
            return "error";
View Full Code Here

Examples of java.util.Currency

    /**
     * Adjusts the minimum and maximum fraction digits to values that
     * are reasonable for the currency's default fraction digits.
     */
    void adjustForCurrencyDefaultFractionDigits() {
        Currency currency = symbols.getCurrency();
        if (currency == null) {
            try {
                currency = Currency.getInstance(symbols.getInternationalCurrencySymbol());
            } catch (IllegalArgumentException e) {
            }
        }
        if (currency != null) {
            int digits = currency.getDefaultFractionDigits();
            if (digits != -1) {
                int oldMinDigits = getMinimumFractionDigits();
                // Common patterns are "#.##", "#.00", "#".
                // Try to adjust all of them in a reasonable way.
                if (oldMinDigits == getMaximumFractionDigits()) {
View Full Code Here

Examples of java.util.Currency

                if (numberType.equalsIgnoreCase("Currency"))
                {
                    String currencyCode = StringUtils.toString(column.getAttribute(InputControl.CURRENCY_CODE_ATTRIBUTE));
                    if (currencyCode!=null)
                    {   // nf = NumberFormat.getCurrencyInstance(locale);
                        Currency currency = Currency.getInstance(currencyCode);
                        return (currency!=null) ? currency.getSymbol() : null;
                    }
                } else if (numberType.equalsIgnoreCase("Percent"))
                {
                    return "%";
                }
View Full Code Here

Examples of java.util.Currency

                if (numberType.equalsIgnoreCase("Currency"))
                {
                    String currencyCode = StringUtils.toString(column.getAttribute(InputControl.CURRENCY_CODE_ATTRIBUTE));
                    if (currencyCode!=null)
                    {   // nf = NumberFormat.getCurrencyInstance(locale);
                        Currency currency = Currency.getInstance(currencyCode);
                        return (currency!=null) ? currency.getSymbol() : null;
                    }
                } else if (numberType.equalsIgnoreCase("Percent"))
                {
                    return "%";
                }
View Full Code Here

Examples of java.util.Currency

        }


        // if still none we will use the default for whatever locale we can get...
        if (iso == null) {
            Currency cur = Currency.getInstance(getLocale(session));
            iso = cur.getCurrencyCode();
        }

        return iso;
    }
View Full Code Here

Examples of java.util.Currency

    public void test() throws IOException {
       
        GlobalProperties.put("classes", DPerson.class.toString());
       
        Currency NZD = Currency.getInstance("NZD");
       
        DPerson p = new DPerson();
        p.setFirstName("first");
        p.setLastName("last");
        p.setSalary(new Money("12200"));
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.