public final class ConversionQueryBuilder extends AbstractQueryBuilder<ConversionQueryBuilder,ConversionQuery>
ConversionQuery
adding detailed
information about a CurrencyConversion
instance.
Note this class is NOT thread-safe.
Modifier and Type | Method and Description |
---|---|
ConversionQuery |
build()
Creates a new instance of
ConversionQuery . |
static ConversionQueryBuilder |
of()
Creates a new
ConversionQueryBuilder instance. |
static ConversionQueryBuilder |
of(ConversionQuery query)
Creates a new
ConversionQueryBuilder instance. |
ConversionQueryBuilder |
setBaseCurrency(CurrencyUnit currency)
Sets the base currency.
|
ConversionQueryBuilder |
setBaseCurrency(String currencyCode)
Sets the base currency.
|
ConversionQueryBuilder |
setRateTypes(RateType... rateTypes)
Set the providers to be considered.
|
ConversionQueryBuilder |
setRateTypes(Set<RateType> rateTypes)
Set the providers to be considered.
|
ConversionQueryBuilder |
setTermCurrency(CurrencyUnit currency)
Sets the term currency.
|
ConversionQueryBuilder |
setTermCurrency(String currencyCode)
Sets the term currency.
|
set, setProviderName, setProviderNames, setProviderNames, setTargetType
importContext, importContext, removeAttributes, set, set, set, set, set, set, set, set, set, toString
public ConversionQueryBuilder setRateTypes(RateType... rateTypes)
Currency
is used.rateTypes
- the rate types to use, not null.public ConversionQueryBuilder setRateTypes(Set<RateType> rateTypes)
Currency
is used.rateTypes
- the rate types to use, not null.public ConversionQueryBuilder setBaseCurrency(CurrencyUnit currency)
currency
- the base currencypublic ConversionQueryBuilder setBaseCurrency(String currencyCode)
currencyCode
- the currency code, resolvable through .MonetaryCurrencies#getCurrency(String, String...)
, not null.public ConversionQueryBuilder setTermCurrency(CurrencyUnit currency)
currency
- the base currencypublic ConversionQueryBuilder setTermCurrency(String currencyCode)
currencyCode
- the currency code, resolvable through .MonetaryCurrencies#getCurrency(String, String...)
, not null.public ConversionQuery build()
ConversionQuery
.build
in class AbstractQueryBuilder<ConversionQueryBuilder,ConversionQuery>
ConversionQuery
instance.public static ConversionQueryBuilder of()
ConversionQueryBuilder
instance.ConversionQueryBuilder
instance, never null.public static ConversionQueryBuilder of(ConversionQuery query)
ConversionQueryBuilder
instance.query
- the ConversionQuery
instance to be used as a template.ConversionQueryBuilder
instance, never null.Copyright © 2012–2016 JSR 354 - Expert Group. All rights reserved.