org.hibernate.test.sql.hand
Class MonetaryAmount

java.lang.Object
  extended by org.hibernate.test.sql.hand.MonetaryAmount
All Implemented Interfaces:
Serializable

public class MonetaryAmount
extends Object
implements Serializable

Represents a monetary amount as value and currency.

See Also:
Serialized Form

Constructor Summary
MonetaryAmount(BigDecimal value, Currency currency)
           
 
Method Summary
 int compareTo(Object o)
           
static MonetaryAmount convert(MonetaryAmount amount, Currency toConcurrency)
           
 boolean equals(Object o)
           
static MonetaryAmount fromString(String amount, String currencyCode)
           
 Currency getCurrency()
           
 BigDecimal getValue()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MonetaryAmount

public MonetaryAmount(BigDecimal value,
                      Currency currency)
Method Detail

getCurrency

public Currency getCurrency()

getValue

public BigDecimal getValue()

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(Object o)

fromString

public static MonetaryAmount fromString(String amount,
                                        String currencyCode)

convert

public static MonetaryAmount convert(MonetaryAmount amount,
                                     Currency toConcurrency)


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.