Top Description Fields Constructors Methods
javax.money.convert

public final Class ConversionQuery

extends AbstractQuery
implements CurrencySupplier
Class Inheritance
All Implemented Interfaces
javax.money.CurrencySupplier
Imports
javax.money.AbstractQuery, .CurrencySupplier, .CurrencyUnit, java.util.*

Query for accessing javax.money.convert.CurrencyConversion instances. If not properties are set the query should returns the default currencies.

This class is immutable, serializable and thread-safe.

Field Summary

Modifier and TypeField and Description
pack-priv static final String
KEY_BASE_CURRENCY

THe key used for the base currency attribute.

pack-priv static final String
KEY_RATE_TYPES

THe key used for the rate types attribute.

pack-priv static final String
KEY_TERM_CURRENCY

THe key used for the term currency attribute.

private static final long
Inherited from javax.money.AbstractQuery:
KEY_QUERY_PROVIDERSKEY_QUERY_TARGET_TYPEKEY_QUERY_TIMESTAMP

Constructor Summary

AccessConstructor and Description
pack-priv
ConversionQuery(ConversionQueryBuilder
the corresponding builder, not null.
builder
)

Constructor, used from the ConversionQueryBuilder.

Method Summary

Modifier and TypeMethod and Description
public CurrencyUnit

Returns:

the base CurrencyUnit, or null.
getBaseCurrency
()

Get the base currency.

public CurrencyUnit

Returns:

the terminating CurrencyUnit, or null.
getCurrency
()

Implements javax.money.CurrencySupplier.getCurrency.

Get the terminating currency.
public Set<RateType>

Returns:

the rate types set, or an empty array, but never null.
getRateTypes
()

Get the rate types set.

public ConversionQueryBuilder

Returns:

a new Builder, never null.
toBuilder
()

Creates a new Builder preinitialized with values from this instance.

Inherited from javax.money.AbstractQuery:
getProviderNamesgetTargetType

Field Detail

KEY_BASE_CURRENCYback to summary
pack-priv static final String KEY_BASE_CURRENCY

THe key used for the base currency attribute.

KEY_RATE_TYPESback to summary
pack-priv static final String KEY_RATE_TYPES

THe key used for the rate types attribute.

KEY_TERM_CURRENCYback to summary
pack-priv static final String KEY_TERM_CURRENCY

THe key used for the term currency attribute.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides javax.money.AbstractQuery.serialVersionUID.

serialVersionUID.

Constructor Detail

ConversionQueryback to summary
pack-priv ConversionQuery(ConversionQueryBuilder builder)

Constructor, used from the ConversionQueryBuilder.

Parameters
builder:ConversionQueryBuilder

the corresponding builder, not null.

Method Detail

getBaseCurrencyback to summary
public CurrencyUnit getBaseCurrency()

Get the base currency. This attribute is optional, when a javax.money.convert.CurrencyConversion is accessed. It is optional if accessing instances of javax.money.convert.ExchangeRateProvider. If set it can constraint a javax.money.convert.CurrencyConversion or javax.money.convert.ExchangeRateProvider to only support one type of base currency. By default it is not set, hereby determining the base currency by the amount onto which the conversion is applied.

Returns:CurrencyUnit

the base CurrencyUnit, or null.

getCurrencyback to summary
public CurrencyUnit getCurrency()

Implements javax.money.CurrencySupplier.getCurrency.

Get the terminating currency. This attribute is required, when a javax.money.convert.CurrencyConversion is accessed. It is optional if accessing instances of javax.money.convert.ExchangeRateProvider.

Returns:CurrencyUnit

the terminating CurrencyUnit, or null.

getRateTypesback to summary
public Set<RateType> getRateTypes()

Get the rate types set.

Returns:Set<RateType>

the rate types set, or an empty array, but never null.

Annotations
@SuppressWarnings:unchecked
toBuilderback to summary
public ConversionQueryBuilder toBuilder()

Creates a new Builder preinitialized with values from this instance.

Returns:ConversionQueryBuilder

a new Builder, never null.